Permission prompts steal focus from message being typed
Bug
When a permission prompt appears (e.g. to approve a bash command), it hijacks keyboard input. If the user is typing a message and looking at the keyboard rather than the screen, hitting Enter approves the permission prompt instead of sending their message. The user has no idea the prompt appeared.
This is dangerous — in my case it resulted in an unintended rm command being approved, permanently deleting a file.
Steps to reproduce
- Claude generates a bash command that requires approval
- Permission prompt appears while user is mid-typing and looking at the keyboard
- User hits Enter intending to send their message
- Enter is captured by the permission prompt, approving the command
- Command executes without the user ever seeing or consciously approving it
Expected behaviour
Permission prompts should not override or steal focus from a message being typed. If the user is actively typing, the prompt should wait or be presented in a way that doesn't intercept keystrokes. At minimum, destructive commands like rm should require a different confirmation method than a single Enter press.
Environment
- Claude Code (Desktop app)
- macOS Darwin 24.6.0
- Claude Opus 4.6
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗