[BUG] Shift+Tab intended to exit the Tab-triggered comment field instead cycles global permission mode and immediately executes the edit
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When an edit-approval prompt is showing, pressing Tab opens an inline field to leave a comment alongside the approve/reject decision. Shift+Tab is the natural key to back out of that field. Instead, Shift+Tab isn't scoped to the field — it's caught by the top-level handler as the global permission-mode cycle shortcut. It advances the session's permission mode (e.g., to "accept edits on"), and because that mode is now active, the pending edit is applied immediately, with no further confirmation.
What Should Happen?
Shift+Tab while the Tab-opened comment field has focus should close/back out of that field and return to the plain approve/reject prompt. The global mode-cycle shortcut should only fire when focus is at the top-level input, not while a nested prompt affordance is active. An edit should never be silently auto-applied as a side effect of trying to leave a text field.
Error Messages/Logs
None — no error is shown; the edit is simply applied without a review step.
Steps to Reproduce
- Ask Claude Code to make a file edit so the approve/reject prompt appears.
- Press Tab to open the comment field on that prompt.
- Press Shift+Tab, intending to leave the comment field and return to the plain prompt.
- Observe: the status bar mode changes (e.g., to "accept edits on") and the edit is applied immediately, without the chance to approve, reject, or comment.
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.222
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Independant of model.
Terminal: Ghostty / zsh