[Bug] Cmd+Enter to approve permission also sends in-progress message text
Summary
When a permission request appears while the user is actively typing a new message in Claude Code Desktop, pressing Cmd+Enter to approve the permission also submits the partially-typed message text. The sent message cannot be retracted, creating unintended instructions to the agent.
Steps to Reproduce
- Start a session in Claude Code Desktop (macOS).
- While the agent is running, begin typing a new message in the input box.
- Before finishing the message, a permission prompt appears (e.g. asking to approve a file write or bash command).
- Press Cmd+Enter to approve the permission prompt.
- Observe: The permission is approved AND the partial/unfinished message in the input box is submitted to the agent.
Expected Behavior
Pressing Cmd+Enter should approve the permission prompt only. The message being composed in the input box should remain unsent and editable.
Actual Behavior
Cmd+Enter both approves the permission prompt AND sends the in-progress message text. The user has no opportunity to retract the sent message, and the agent receives unintended/incomplete instructions.
Root Cause (suspected)
This appears to be a race condition / input focus issue. When the permission prompt appears, it captures the Cmd+Enter keypress for approval, but the keypress also propagates to (or is simultaneously received by) the message input field, triggering submission.
Environment
- Platform: macOS
- App: Claude Code Desktop (standalone, not VS Code extension)
- Reproducible: Yes, when a permission prompt appears while text is already in the input box
Impact
- Agent receives partial/unintended instructions it cannot be told to ignore mid-run
- User cannot retract or cancel the submitted message
- Particularly disruptive in long sessions where the user is preparing follow-up instructions while the agent is still working
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗