[BUG] Mouse click to refocus terminal triggers permission prompt unintentionally
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 a permission prompt is displayed (Yes / Yes all / No) in the new fullscreen
TUI mode, clicking with the mouse to refocus the terminal window inadvertently
triggers one of the choices.
The scenario: another window is partially overlapping the terminal. The terminal
is still visible on the side or edge. Clicking the visible part of the terminal
to bring it back to focus lands on (or near) one of the permission options and
triggers it — without the user seeing or intending the selection.
The user's intent is only to restore focus, not to make a permission choice.
This can silently grant or deny a tool use the user never consciously confirmed.
Expected: the first click on an unfocused terminal should only restore focus,
not trigger any interactive element inside the TUI.
Suggested fix: ignore mouse input on the first click that restores focus to the
terminal window, or require keyboard confirmation for permission prompts.
Related issue (similar but distinct): #70178 — choices become unresponsive after
refocus (macOS). This bug is the opposite: the click triggers a choice
unintentionally on refocus (Linux, Warp terminal).
What Should Happen?
The first click on an unfocused terminal window should only restore focus,
not trigger any interactive element inside the TUI.
Error Messages/Logs
No errors
Steps to Reproduce
- Open Claude Code in fullscreen TUI mode.
- Wait for a permission prompt to appear (Yes / Yes all / No).
- Switch to another window so it partially overlaps the terminal.
- The terminal (and the prompt) is still partially visible on the side or edge.
- Click on the visible part of the terminal to bring it back to focus.
- Observe that the click inadvertently triggers one of the permission options.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.191 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗