[BUG] VS Code extension: edited files open in Claude's tab panel instead of editor tabs when chat has focus
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 applies edits via the Edit tool, the extension returns focus to the chat input after each edit. This causes subsequent file opens to land in Claude's tab panel instead of the regular editor tab area, making edited files invisible within the normal editor workflow.
Steps to reproduce
- Open a project in VS Code with the Claude Code extension
- Have one or more files open in editor tabs
- Ask Claude to edit a file
- Claude applies the edit — focus is returned to the chat input automatically
- Claude opens the next file to read/edit → the file opens in Claude's tab panel instead of the editor tab area
Observed behavior
- If the user has focus on an editor tab when Claude opens a file, the file opens correctly in the editor tab area
- After each edit, the extension returns focus to the chat input
- From that point on, any file Claude opens lands in Claude's tab panel (not in the editor tabs)
- With multiple Claude instances open, Claude's tab panel fills up with file tabs, making the chat content invisible
Expected behavior
Files opened/edited by Claude should always open in the editor tab area, regardless of where focus currently is.
Additional context
Not reproducible in another Claude Code instance on a different project (PHP) with the exact same VS Code and extension version — suggesting the issue may be instance/workspace-specific or a focus management regression.
Environment
- OS: macOS Darwin arm64 25.5.0
- VS Code: 1.124.2 (Universal) — Commit: 6928394f91b684055b873eecb8bc281365131f1c
- Electron: 42.2.0 / Chromium: 148.0.7778.97 / Node.js: 24.15.0
- Claude Code extension: 2.1.175
What Should Happen?
Files opened or edited by Claude should always open in the regular editor tab area, regardless of which panel currently has focus. The extension should not transfer focus to the chat input after applying an edit.
Error Messages/Logs
Steps to Reproduce
- Open a project in VS Code with the Claude Code extension and have files open in editor tabs
- Ask Claude to edit a file
- Claude applies the edit — focus is automatically returned to the chat input
- Ask Claude to read or edit another file
- The file opens in Claude's tab panel instead of the editor tab area
Note: if the user manually clicks on an editor tab before step 4, the file opens correctly. The issue is that the extension steals focus from the editor after each edit.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.175
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_