[BUG] VSCode extension steals focus on workspace load
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 the VSCode workspace loads (either at startup or when switching project or reloading manually), the prompt input steals focus immediately. While this is desired if I were opening the Claude Code sidebar myself, it is not desired when the entire workspace is loading.
In my case, I hop between projects quite often, and often reach for keyboard shortcuts to immediately start looking for something. On many occasions, I find myself typing into project search, only to find half the word cut off and now I'm typing into the prompt. Sometimes I land up submitting that to Claude, and it naturally gets confused…
What Should Happen?
The UI should only take focus when starting a new session or when opening it directly (not on workspace load).
Error Messages/Logs
N/A
Steps to Reproduce
- Open VSCode
- Open Claude Code
- Reload the workspace or restart VSCode or switch projects
- Immediately invoke project search with the keyboard and type.
If you're quick enough, you'll find yourself typing into two input controls, one after the other. 🙃
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.49 (CLI); 2.1.59 (VSC Extension)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗