[FEATURE] "Add a VS Code setting to disable auto-opening diff tabs when Claude edits files."

Open 💬 20 comments Opened Feb 11, 2026 by vincemota

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem:
When Claude Code makes file edits in the VS Code extension, it automatically opens a [Claude Code] diff tab for every changed file. This is disruptive when working with multiple files — it steals focus and clutters the editor tab bar.

The blue modified-file indicator on existing tabs is sufficient to know which files changed. I'd like to review diffs on my own terms, not have them forced open.

Proposed Solution

A VS Code extension setting (e.g., claudeCode.autoOpenDiff: false) to disable the auto-opening behavior while keeping all other functionality intact.

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

Configuration and settings

Use Case Example

Working in VS with multiple tabs opened and having claude open and jump to another tab is super disruptive

Additional Context

_No response_

View original on GitHub ↗

20 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8509
  2. https://github.com/anthropics/claude-code/issues/17043
  3. https://github.com/anthropics/claude-code/issues/22391

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Flowburghardt · 5 months ago

+1 on this — experiencing the exact same issue.

Additional problem: When you try to clean up the auto-opened tabs by closing them (Cmd+W), it can interrupt Claude's active Write/Edit operation if Claude is still working on that file. This creates a lose-lose situation: either live with the tab clutter, or risk breaking the current task.

A setting like claudeCode.autoOpenDiff: false would solve both problems.

(Closing my duplicate #25567 in favor of this issue.)

jreznick · 4 months ago

This is ruinous and irritating and just started happening to me as well today.

deljy · 3 months ago

Stealing the focus from the currently open tab is the real problem should be solved.
sometimes it even feels like it's waiting for me to press enter key before stealing the focus.

thewh1teagle · 3 months ago

This is really affecting my work. hope you can add an option to disable this.

ats05 · 3 months ago

+1 for this feature. The auto-opening diff tabs are extremely disruptive — they interrupt my typing mid-sentence and steal focus at the worst moments. It's a frustrating experience that breaks my flow constantly. Please add a setting to disable this behavior!

znorris · 3 months ago

Agreed — the auto-opening diff tabs steal focus and interrupt workflow. A setting to disable this behavior would be a welcome improvement.

klunejko · 3 months ago

Ran into the same issue, after they silently dropped support for PreToolUse being able to handle PermissionRequests. This makes the VS Code extensions unusable for me, so I guess I'm stuck on <2.1.77 until then...

Edit: Actually, the diff viewer probably should automatically be hidden when running in "edit automatically" or when the requests are automatically approved (via PermissionRequests hooks). Adding a setting to disable showing the diff viewer altogether would break when running in "ask before edits".

laurac8r · 2 months ago

+1 from a JetBrains plugin user — this same behavior exists in the JetBrains Claude Code [Beta] plugin and is identically disruptive there.

Adding accessibility context: I have ASD, and involuntary focus/tab changes are a real disability barrier, not just a preference. This overlaps with WCAG 2.4.3 (Focus Order) and 3.2.1 (On Focus), both of which target unexpected context changes. Tools like VS Code (preserveFocus, revealIfVisible) and JetBrains (focusEditor=false on file-open APIs) already expose the underlying option — it just needs to be surfaced in the Claude Code plugins.

Current workaround (diff_tool: terminal via /config) eliminates the focus steal but also eliminates inline IDE diffs entirely, which is a meaningful ergonomics downgrade — the accessibility fix shouldn't require giving up the feature.

Filing a separate JetBrains-scoped issue and cross-linking this one so maintainers can treat them together.

NiteshGarg237 · 2 months ago

+1 — This is a significant workflow disruption for power users. Every Edit/Write tool call triggers vscode.commands.executeCommand("vscode.diff", ...) which steals visual attention away from the chat panel. A simple claudeCode.autoRevealEdits: false setting that skips the vscode.diff call would solve it.

gabrielboeker · 2 months ago

+1 this is still not fixed! It's so annoying, I want to destroy my keyboard……………

ahmedelakkad · 1 month ago

any update on this? it's driving us all nuts

laurac8r · 1 month ago

As a daily-driver, what I do is just stay in iTerm.

BUT one workaround is if you open PyCharm/VSCode to the project you will be doing a session in before opening a Claude Code session in iTerm/Terminal, the iTerm/Terminal session binds to the PyCharm/VSCode window and the Edit/Write approval gate will open in your IDE rather than in iTerm/Terminal.

BUT binding for more than 1 session causes the same focus-stealing issue, so it's more of a bandage than a cure.

#macgirlhere #yourtoolsmaydiffer #letfolksknowwhatworksforyou

OmarSandarusi · 1 month ago

Adding my support for this new setting. When working on a laptop it's annoying to have both an editor and claude session tab split on a small screen. Having to switch back to the claude session each time it wants to make an edit is quite annoying, especially when it's making one line changes as there's no need to see the whole file.

teborus · 1 month ago

Also very frustrating for me. One workaround that I've found is to lock the tab group where Claude Code is, then move one of the open diff tabs to a new tab group to the right. I can then make the "right" group small and all new diff tabs are opened in the "right" group. The Claude tab remains visible and I don't lose focus every time a diff opens.

andreivoinoiu-ops · 23 days ago

Issue still persists and is extremely disruptive. For 20 one-line edits, the IDE will open 20 new diff tabs that shift focus from the ClaudeCode session every time. See report bellow after investigating this issue on my machine. Report generated by ClaudeCode and confirmed by a human verifier.

"Ask before edits" approvals now open a separate VS Code diff tab instead of rendering inline in the chat panel — a focus-stealing new tab on every edit, with no opt-out. Last week (same mode) approvals were inline and non-disruptive.

Env: VS Code extension 2.1.183, VS Code 1.118.1, Windows 11, "Ask before edits" mode.

How I traced the cause to a server-side feature gate (NOT my machine):

  • Diffed extension.js across all installed builds 2.1.170 -> 2.1.183: byte-identical vscode.diff / open_diff code -> no extension update caused it.
  • VS Code itself unchanged since 2026-04-30 (Code.exe mtime).
  • Permission mode unchanged ("Ask before edits"); it rendered inline last week on the same versions.
  • The bundle only exposes an open_diff tool; it has no local gate logic (no checkGate / no "code_diff_cli" string) -> the inline-vs-tab decision is engine/server-side, not in the extension.
  • .claude.json shows tengu_code_diff_cli: true, and a teammate on the same org + plan is NOT affected -> this is a per-user feature-gate rollout, which is why it flipped mid-week with nothing changing locally.
  • Confirmed no local workaround: no extension setting controls it; workbench.editor.enablePreview can't override the hardcoded {preview:false}; downgrading doesn't help (decision is gate-side).

Update: older sessions still open the diff inline. A "/clear" command will reset the session with zero conversation history, just like a new session would, but without the possibly updated feature gate.

Request: add a first-class setting to restore inline-in-chat approvals / disable auto-opening the diff tab (e.g. claudeCode.showDiffOnEdit or autoOpenDiff).

Workaround if you have older sessions still open: "/clear" will reset the conversation history without introducing the separate diff tab issue.

Strykar · 15 days ago

Please fix this, quite annoying.

jglick · 15 days ago

I just disabled the setting Auto-connect to IDE (external terminal).

redpointgroup · 8 days ago

This regressed for me with extension v2.1.202 (auto-installed 2026-07-06). Every Edit/Write now opens a [Claude Code] diff tab that grabs editor focus — I was interrupted 8–9 times while typing a three-line message. In the native-panel UI it's a constant flow-breaker.

I checked for an opt-out and there genuinely isn't one: the CLI settings.json schema has no diff/auto-open field, the VS Code extension exposes no such setting in its contributed config, and the diff-open path (openFileDiffs) is hardcoded with no gate. So there's currently no way to turn this off short of downgrading the extension.

Requesting a simple opt-out — e.g. claudeCode.showDiffOnEdit: false — that applies edits silently and lets us review via the Source Control panel (or the diff on demand). Auto-accepted edits especially shouldn't steal focus. 🙏

bcawrse · 3 days ago

I love the /ide setting for providing context. It allows me to highlight a segment of code, then discuss it in my Claude Code terminal.

I _hate_ Claude Code throwing me into my editor during discussions, or causing 'focus' to fire while I'm working elsewhere. I use vertical split panes so my current editor becomes illegible until I go hold Claude's hand, and I can't brush it off for later because closing the window kills the progress.

Until there's a mechanism for the IDE integration that lets me keep my Claude Code discussions _in_ Claude Code, I'm going to leave /ide off. I'll leverage other integrations for the IDE things instead for now.

Claude Code is impressive, and works _great_. Thanks for an awesome tool. Looking forward to using IDE integration again when it's less disruptive.