[Bug] AskUserQuestion UI: Focus click triggers option selection
Status Open
Reported on v2.1.207
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Jul 11, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
AskUserQuestion option UI: clicking the terminal window just to give it
focus is interpreted as selecting an option. Focus-click and
option-click should be distinguished (e.g. ignore the first click that
focuses the window), or provide a setting to disable mouse input for
the question UI. Keyboard-only workaround exists but accidental
selections keep happening.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.207
- Feedback ID: b5e48d7a-bbec-4b83-ab8d-ce76b5f4ac73
Errors
[]Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
I keep running into this issue as well - VERY annoying.
Platform: Linux
Terminal: Konsole
This just recently started happening, and I'm not in full screen mode.
Setting env var
CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1fixes it, but according to the docs that is only necessary when in full screen mode.100% agree - I keep answering questions by accident when clicking to bring a terminal to the front!
This is the bug report I was just about to make:
Can we have the ability to disable clicking with the mouse as a way of selecting answers to questions.
Several times already I've ended up answering a question un-intentionally just by clicking on a terminal window to bring it to the front/focus. This is dangerous and annoying.
Plus, it's often much more useful to be able to _select text from questions to copy/paste_. Having it select an option when trying to highlight to copy isn't great.
We can already use number keys and arrow keys to select from options in the terminal. Can this at least be an option / opt-in / something we can disable per-user default?
It is useful to be able to click the cursor when entering text so I don't want to turn off mouse support entirely.
Confirmed — reproduced on Linux on the current release (tested 2.1.233/2.1.233-era latest). With an AskUserQuestion prompt visible, a single mouse click on an option row immediately selects and submits that option, and a click that arrives immediately after the terminal's window-focus event (i.e. the click you make just to focus the window) is not suppressed — it lands on the dialog and answers the question. So this isn't ghostty-specific; the question UI currently has no "focus click" suppression.
Two workarounds until this is improved:
CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1to disable click/drag/hover while keeping wheel scroll (available since 2.1.195), orCLAUDE_CODE_DISABLE_MOUSE=1to disable mouse input entirely — this is the setting you asked for.We agree the first click after window activation shouldn't activate an option, and are looking at consuming the focusing click.
🤖 Generated with Claude Code