[BUG] Permission prompt captures keystrokes while user is typing next prompt (VS Code extension)

Resolved 💬 3 comments Opened Mar 13, 2026 by MehdiJenab-oti Closed Mar 17, 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?

When Claude Code is processing a task in the VS Code extension (API mode), I often start typing my next prompt while waiting for the current operation to finish. If Claude triggers a permission prompt (e.g., "Do you want to proceed?") while I am actively typing, my keystrokes are immediately captured by the permission prompt instead of the input field. This results in unintended permission decisions — for example, accidentally approving or rejecting an action because a key I was pressing happens to match one of the prompt options.

There is no grace period, confirmation buffer, or input isolation between the text input area and the permission prompt. The prompt appears instantly and steals keyboard focus mid-keystroke.

Expected Behavior:
Permission prompts should not immediately capture keyboard input. At minimum, one of the following safeguards should be in place:

  • Input debounce: A short delay (e.g., 300–500ms) before the pop-up accepts keyboard input
  • Input isolation: Keystrokes directed at the prompt input field should not be forwarded to a permission prompt that appears mid-typing
  • Deliberate confirmation: Require a specific key combo or double-tap rather than a single keystroke

Impact:
This is a safety concern — accidental approval of file writes, command execution, or other sensitive operations undermines the purpose of the permission system entirely. This is especially problematic for fast typists who habitually pre-compose their next prompt while Claude is working.

Related: #23643 reports the identical issue in the JetBrains plugin — this appears to be a cross-platform UX problem affecting multiple IDE integrations.

Environment:

  • OS: Ubuntu Linux
  • Editor: VS Code
  • Mode: API mode

What Should Happen?

Permission prompts should not immediately capture keyboard input. At minimum, one of the following safeguards should be in place:

  • Input debounce: A short delay (e.g., 300–500ms) before the pop-up accepts keyboard input
  • Input isolation: Keystrokes directed at the prompt input field should not be forwarded to a permission prompt that appears mid-typing
  • Deliberate confirmation: Require a specific key combo or double-tap rather than a single keystroke

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code session in VS Code (API mode)
  2. Give Claude a task that will require multiple steps (some requiring permission)
  3. While Claude is working, start typing your next prompt in the input area
  4. A permission request appears mid-keystroke
  5. Observe that your keystrokes are captured by the permission prompt, potentially triggering an unintended approval or rejection

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.74

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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