[BUG] Tool approval prompts hijack focus mid-typing, causing unintended actions and blocking response visibility

Resolved 💬 4 comments Opened Feb 11, 2026 by cjromb Closed Mar 11, 2026

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?

Description:

When Claude responds with a tool use that requires approval, the approval prompt steals keyboard focus while the user is actively typing their message. This causes several critical UX issues:

Environment:

VSCode Claude Code Extension
macOS [or your OS]

What Should Happen?

Approval prompts should NOT steal focus from active text input
User should be able to finish typing their current message
Claude's response should remain readable while approval is pending
Keyboard input should only affect the prompt after explicit user interaction (click/tab to it)
Impact:

Unintended tool executions from accidental keystroke capture
Cannot read Claude's response to make informed approval decision
Severely disrupts typing flow and causes frustration

Steps to Reproduce

Start typing a message to Claude in the chat input
Claude responds with a tool use (e.g., file edit) before you finish typing
Tool approval prompt appears while you're still typing
Continue typing without noticing the focus change
Actual Behavior:

Keyboard focus is hijacked mid-keystroke to the approval prompt
Continued typing gets interpreted as input to the approval prompt
Default action may execute unintentionally from buffered keystrokes
Claude's response becomes greyed out and unreadable while prompt is showing
ESC key to refocus doesn't help - the interruption already happened

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.39 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code Extension

Additional Information

I am using the VS Code extension, with the side chat window. See how the permissions window is over the top of the input window? See how the text behind it is greyed out? If I'm actually typing at the particular moment (which is VERY often, as I'm in a conversation flow), and that window pops up, I can't read what's behind it anymore to see if I actually WANT it to do the thing it's asking for permission to do, AND I can't continue my text that I was typing until I dismiss this window...and then I have to get it to show me that window again if I actually want it to do the thing it was requesting permission for. Makes for a very poor workflow.

<img width="685" height="1024" alt="Image" src="https://github.com/user-attachments/assets/51932717-393d-4427-9400-a0d76428be2d" />

View original on GitHub ↗

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