Summary
When Claude Code creates or edits files via the Write/Edit tools in the VS Code extension, the affected files are automatically opened as new editor tabs. There is currently no way to disable this behavior.
Problem
This causes two issues:
-
Tab clutter: During longer sessions, Claude often creates or modifies multiple files (e.g., task notes, config files, changelogs). Each operation opens a new tab, cluttering the tab bar and shifting focus away from files the user is actively working on.
-
Closing tabs interrupts Claude's operations: When the user tries to clean up by closing these auto-opened tabs (Cmd+W), it can interrupt Claude mid-operation if Claude is still writing to that file. This creates a conflict where the user either has to wait for Claude to finish before closing tabs, or risk interrupting the current task.
The combination of forced tab-opening and interruption-on-close creates a lose-lose situation for users who don't need to see every file Claude touches.
Proposed Solution
Add a VS Code extension setting like:
"claudeCode.revealFileOnEdit": true // default: true (current behavior)
When set to false, files created or edited by Claude would not automatically open in the editor. Users can still navigate to them manually when needed.
Optionally, a more granular approach:
"claudeCode.revealFileOnEdit": "always" | "never" | "editOnly" | "createOnly"
Alternatives Considered
explorer.autoReveal: false — only affects the file explorer sidebar, not editor tabs
claudeCode.useTerminal: true — works but loses the benefits of the native panel UI
Environment
- VS Code Extension (native panel mode)
- macOS / Linux / Windows — affects all platforms
Summary
When Claude Code creates or edits files via the Write/Edit tools in the VS Code extension, the affected files are automatically opened as new editor tabs. There is currently no way to disable this behavior.
Problem
This causes two issues:
Tab clutter: During longer sessions, Claude often creates or modifies multiple files (e.g., task notes, config files, changelogs). Each operation opens a new tab, cluttering the tab bar and shifting focus away from files the user is actively working on.
Closing tabs interrupts Claude's operations: When the user tries to clean up by closing these auto-opened tabs (Cmd+W), it can interrupt Claude mid-operation if Claude is still writing to that file. This creates a conflict where the user either has to wait for Claude to finish before closing tabs, or risk interrupting the current task.
The combination of forced tab-opening and interruption-on-close creates a lose-lose situation for users who don't need to see every file Claude touches.
Proposed Solution
Add a VS Code extension setting like:
When set to
false, files created or edited by Claude would not automatically open in the editor. Users can still navigate to them manually when needed.Optionally, a more granular approach:
Alternatives Considered
explorer.autoReveal: false— only affects the file explorer sidebar, not editor tabsclaudeCode.useTerminal: true— works but loses the benefits of the native panel UIEnvironment