AskUserQuestion dialog auto-submits on mouse click without confirmation

Status Open
Reported on v2.1.193
Maintainer reply None cached
Activity 11 comments · opened Jun 26, 2026

Description

When an AskUserQuestion dialog is shown, a single mouse click on one of the options immediately submits that option as the answer, without requiring the user to press Enter or click a separate confirm button.

The user did not intend to confirm — they only clicked into/onto the option (e.g. to focus or read it) and the answer was sent automatically.

Steps to reproduce

  1. Run Claude Code in a JetBrains integrated terminal.
  2. Have the assistant invoke AskUserQuestion with a Yes/No (or any) set of options.
  3. Click on one of the options with the mouse (do NOT press Enter).

Expected behavior

Clicking an option should focus/select it. Submission should require an explicit confirmation (Enter, or a separate Submit button/click).

Actual behavior

A single mouse click on an option immediately submits it as the final answer.

Environment

  • Claude Code version: 2.1.193
  • OS: Linux 6.8.0-124-generic (Ubuntu)
  • Terminal: JetBrains integrated terminal

Notes

Reproduced live in a session: the assistant asked a Yes/No test question, the user clicked once with the mouse (no Enter press), and "Yes" was submitted immediately.

View original on GitHub ↗

9 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/71468
  2. https://github.com/anthropics/claude-code/issues/71539
  3. https://github.com/anthropics/claude-code/issues/45374

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Liquidmasl · 2 months ago

Yes since claude fullscreen TUI captures mouse clicks I accept or decline requests on accident ALL THE TIME.
I just want to focus the terminal -> accept/denied
just click between panes -> accept/denied

its very annoying.
I wish i could switch off mouse capture for thsoe descision or maybe it should need a double click, or something. its not awesome right now anyway.

BTW this has nothing todo with jetbrains. Wezterm terminal has the same issue, iterm2 as well

Seldaek · 1 month ago

Having CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 in your env when running claude seems to disable this successfully (but leaves mouse scrolling functionality intact).

zanlucathiago · 1 month ago

Adding to @Seldaek's tip — you can also set this in ~/.claude/settings.json instead of the shell env:

{
  "env": {
    "CLAUDE_CODE_DISABLE_MOUSE_CLICKS": "true"
  }
}

Nice thing is it stays scoped to Claude Code (doesn't touch the rest of your shell env), it's version-controllable, and the same file works on both macOS and Linux.

drememynd · 1 month ago

I'm hitting this issue - I've accidently stopped several important actions, and allowed several I didn't want to have happen. This is a SERIOUS issue - having to disable mouse clicks is a work around, but that stops people who like to use the click to PICK the option, rather than using arrow keys. Clicking on an option should NOT submit.

Seldaek · 1 month ago

@drememynd don't get me wrong I was also frustrated by the accidental clicks I did - which is why I turned it off now. But at the same time I can see that if any other GUI application would ask me "are you sure?" on every click I do, it would drive me absolutely nuts. The problem I think is that we're simply not used to the fact that clicking anywhere on the terminal can have consequences, so we click it randomly to focus. I would never click randomly on my email client tho for the fear of hitting a button.

If anything, what could improve the situation is having a clearly visually delimited zone where the clickable options are when there is a multi-choice callout. That would highlight the fact that this is a zone you don't want to click in. Right now it is all just a bunch of text except some of the text is a minefield. Also great would be to disallow clicks if the click was also focusing the terminal app, but I somehow doubt this is a distinction you can make.

drememynd · 1 month ago

@Seldaek I was considering, after I wrote my comment, requiring either two clicks or a double click.

A) Single click highlights the option, then if you click on it again, it's submitted. Doesn't stop single clicks submitting, necessarily, though, if there is a default highlighted option.

B) Requiring a double click to submit, which wouldn't require hitting enter, and bypasses the "i accidently hit it with my mouse" issue.

Having a highly visible zone where the question was might help, although honestly I'm not sure I'd even notice it in my workflow. I'm usually looking somewhere else and clicking on the terminal based on peripheral vision, before turning my attention to it fully.

drememynd · 1 month ago

One other thing, with mouse turned off, I can't copy from my terminal, because I can't highlight a section. Oddly, right mouse click on the typing area still pastes. :-S

rene-hermenau · 1 month ago

That bug is crazy annoying. When will this be fixed?
On macOS it happens, too.

Showing cached comments. Read the full discussion on GitHub ↗