Permission prompts steal focus from message being typed

Resolved 💬 5 comments Opened Apr 5, 2026 by BSKapps Closed May 15, 2026

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

  1. Claude generates a bash command that requires approval
  2. Permission prompt appears while user is mid-typing and looking at the keyboard
  3. User hits Enter intending to send their message
  4. Enter is captured by the permission prompt, approving the command
  5. 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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗