[BUG] Mouse click to refocus terminal triggers permission prompt unintentionally

Open 💬 9 comments Opened Jun 26, 2026 by quenti77

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

  1. Open Claude Code in fullscreen TUI mode.
  2. Wait for a permission prompt to appear (Yes / Yes all / No).
  3. Switch to another window so it partially overlaps the terminal.
  4. The terminal (and the prompt) is still partially visible on the side or edge.
  5. Click on the visible part of the terminal to bring it back to focus.
  6. 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_

View original on GitHub ↗

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