[BUG] VS Code extension delayed input field focus causes invalid prompts
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?
Not sure if this is a bug - I find it quite annoying for my workflow, so I marked it as a bug.
When I open VS Code, I usually immediately open console (for example, changing Git branch) or random file, typing command with CTRL+P, or just start typing.
Claude extension (not CLI) has just enough delay, so that when it opens, it changes cursor focus to its input (prompt) field, causing some of my text appear in a different window than expected. As most commands are confirmed with "Enter", they of course cause extension to start processing some text not meant to be there at all.
<img width="2546" height="1282" alt="Image" src="https://github.com/user-attachments/assets/3a083f33-94d3-47c2-a169-606a8ff3fa86" />
What Should Happen?
Claude extension should not switch focus to its input field once initialized. This should be user decision, so things like this don't happen.
Error Messages/Logs
Steps to Reproduce
- Enable Claude extension (not CLI)
- Open new VS Code instance
- Immediately start typing in either terminal, new file, command prompt, or similar
- Claude Extension should initialize and change focus to its prompt field, causing user text to be written in not expected place
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.71 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Linux, Ubuntu 24
Claude extension version: 2.1.138
VS Code: 1.119.0 (x64)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗