[BUG] VSCode extension steals focus on workspace load

Status Closed — not planned
Reported on v2.1.49
Maintainer reply None cached
Activity 9 comments · opened Feb 26, 2026 · closed May 20, 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 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

  1. Open VSCode
  2. Open Claude Code
  3. Reload the workspace or restart VSCode or switch projects
  4. 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_

View original on GitHub ↗

9 Comments

mikerockett · 6 months ago

This is actually quite annoying. It seems to take focus TWICE during load.

mikerockett · 5 months ago

I hate to be that guy, but persisting in 2.1.85. I see lots of little UI improvements, and a fix for this would complement them.

barafael · 4 months ago

Confirming this also happens on Windows 11 (10.0.26100). On every VS Code launch / workspace load, the Claude Code panel steals focus from the console. A little disruptive to workflow, I've spammed "it status" and similar.

github-actions[bot] · 3 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

ansh-les · 3 months ago

Can confirm. Happening with me too on MacOS Tahoe 26.5
Super annoying!

ansh-les · 3 months ago

@mikerockett Did you find a workaround for this?

mikerockett · 3 months ago

@ansh-les Nope, moved to Zed.

ansh-les · 3 months ago

@mikerockett I tried zed, just couldn't get used to it. Too much muscle memory for vscode.

I found a workaround for this on vscode.
Add this to your user settings.json

"workbench.secondarySideBar.defaultVisibility": "hidden"

Keeps the secondary sidebar hidden on launch. No claude = no focus stealing :))

github-actions[bot] · 1 month ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.