Skip to content

[Feature Request] VS Code: Add setting to disable auto-opening files on Write/Edit #25567

@Flowburghardt

Description

@Flowburghardt

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:

  1. 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.

  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestplatform:vscodeIssue specifically occurs in VS Code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions