VS Code: Add setting to disable auto-navigation to file on Edit/Write

Resolved 💬 2 comments Opened May 5, 2026 by NiteshGarg237 Closed May 6, 2026

Problem

When Claude Code makes edits via the Edit or Write tool in VS Code, the extension automatically opens a diff tab and navigates focus away from the chat panel. This forces users to manually navigate back to the chat to continue the conversation.

For users working in the VS Code chat panel, this creates a disruptive workflow — every edit causes a context switch. When Claude makes multiple edits in sequence, the user has to repeatedly navigate back.

Proposed Solution

Add a VS Code extension setting (e.g., claudeCode.autoRevealEdits) that controls whether diff tabs are automatically opened/focused when edits are made.

Options:

  • true (default, current behavior): Open diff tab on every edit
  • false: Don't auto-open diff tabs; user can review diffs on demand

The relevant code path is the vscode.diff command execution with {preview: false, preserveFocus: true} options. When the setting is false, this command would simply be skipped.

Alternatives Considered

  • preserveFocus: true alone isn't enough — the tab still appears and steals visual attention even if focus is preserved
  • Pinning the chat tab — workaround, not a fix

Use Case

Power users who trust Claude's edits and want to stay in the chat flow, reviewing diffs only when needed (e.g., via source control panel or git diff).

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗