[BUG] VS Code Extension 2.0.0 no longer opens a diff in a separate window

Open 💬 23 comments Opened Sep 30, 2025 by crankycyclops
💡 Likely answer: A maintainer (blois, collaborator) responded on this thread — see the highlighted reply below.

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?

Not sure if this should be a bug or a feature request, but in the previous incarnation of the Visual Studio Code Claude Code extension, whenever I was asked permission to implement changes to my code, those changes would appear in a new window where I could see the whole source code for that file and where those changes fit into it. Now, I don't see a window, only a tiny diff in the chat window with no way to see how that change fits into the rest of the source.

What Should Happen?

A new window should appear showing the changes as happened in the last version of Claude Code + VS Code

Error Messages/Logs

Steps to Reproduce

  1. Update to claude code 2.1
  2. Open a project
  3. Open claude code and request changes to your source code

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.0

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

23 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7297
  2. https://github.com/anthropics/claude-code/issues/8224
  3. https://github.com/anthropics/claude-code/issues/7540

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

crankycyclops · 9 months ago

The issues marked as duplicates are not duplicate issues and are unrelated to this report.

blois collaborator · 9 months ago

This should be working in a similar manner to the other behavior (which also should still be functional if you run claude from a terminal in VSCode).

There may be additional information in the Output window under Claude VSCode.

crankycyclops · 9 months ago
This should be working in a similar manner to the other behavior (which also should still be functional if you run claude from a terminal in VSCode). There may be additional information in the Output window under Claude VSCode.

That's what I was expecting, but instead, I only see a small diff embedded directly in my chat with Claude. What additional information should I be looking for?

crankycyclops · 9 months ago

~Sorry, not sure what happened, but this is working now.~

crankycyclops · 9 months ago

Reopening this because I'm still seeing this same issue. I don't know what I did that made this work the last time, but if I open vs code, then open the claude extension, I keep seeing this behavior where I only see a small diff embedded in the chat.

EDIT: I found, at least once, that if I explicitly tell it in my prompt to insert the diff into vs code, rather than just display it in the chat, it exhibits the expected behavior.

dexter12353 · 9 months ago

I'm having this same issue after updating to 2.0.2 yesterday. What I'm struggling with is that small edits are shown in chat, large edits (like full page or more) still pull up in the diff tool. That may be why @crankycyclops experienced it started working like before (then closed/reopened the issue).

The main reason I'm frustrated by the change, is when comparing the differences, the line numbers only show the snip claude is focused on, not the actual line numbers of the file it is editing, and often I need to look at surrounding code and the changes in the chat window don't give me the context of the full file to ensure I'm not breaking something.

I don't think this is related to #8660 because I do see a diff viewer, it's just not the previous (more useful) one I had prior to yesterday's update.
<img width="2013" height="504" alt="Image" src="https://github.com/user-attachments/assets/d4ce6fc4-d432-4956-8c35-26201492c6d6" />

EDIT: I found that if I run claude in the vs code terminal, instead of the dedicated VS code extension, I get my old diff back. This is a workaround but not as nice as the actual extension.

Veltodevs · 9 months ago

Someone let me know when there's an update in the new interface.. for now I continue to use the old method by starting claude through terminal and that works. However, it still has them weird scrolls of doom every now and again which the new interface doesnt lol pick your poison.

russellgilbert · 9 months ago

Just now, I was using Claude Code 2.0.14 and it's been displaying all of the edits only inline in the chat window, instead of a diff tab. But suddenly it displayed it in a diff tab, so I asked it if it did anything different to cause it to work correctly again. This was its response:

No, I didn't do anything different. The Edit tool works the same way every time - it sends the edit request and VSCode decides how to display it. Sometimes VSCode shows the diff in a split window tab, and sometimes it applies the change directly inline in the chat. This behavior is controlled by VSCode, not by me. The difference you're seeing now might be due to:

The file being currently open in your editor.
The size or complexity of the edit.
VSCode's internal heuristics for when to show a diff preview vs applying directly.
Your VSCode settings or recent actions.
I don't have control over which display mode VSCode chooses.

Edit: I just realized that I'm on VS Code 1.104.3 but 1.105 was released on Oct. 9th, so I'll give that a try.

Edit: No improvement with VS Code 1.105.0. The problem is still intermittent though - I haven't found a pattern yet.

LeeShan87 · 9 months ago

I had the same issue on Windows - diffs not appearing in the editor after file modifications.

Found a workaround related to Windows file paths: always use complete absolute paths with UPPERCASE drive letters and backslashes for all file operations.

Format: D:\Path\To\File.txt (not d:\Path\To\File.txt or D:/Path/To/File.txt)

After applying this, diffs consistently appeared in VSCode.

I also added this instruction to my global ~/.claude/CLAUDE.md file to ensure Claude Code always uses the correct path format.

Source: https://www.reddit.com/r/ClaudeCode/comments/1nj49vz/claude_file_has_been_unexpectedly_modified_but/

Note: This is specifically a Windows workaround, not tested on other platforms.

russellgilbert · 9 months ago
Found a workaround related to Windows file paths: always use complete absolute paths with UPPERCASE drive letters and backslashes for all file operations.

Thanks for this. Unfortunately, it didn't help in my situation.

I'm using VS Code on a Win11 Pro PC with a mapped drive to a Centos Stream 9 machine where the project files are actually located. At one point while working with the Claude Code extension, it suddenly started opening the diff tab again, but then it suddenly stopped working. I tried several tests but couldn't get it to work again, so I installed Remote-SSH and I'm now using Claude Code in the remote window, where it has local access to all of the files. However, it's still not working. :-(

parnexcodes · 9 months ago

Same issue

Snailedlt · 8 months ago

I got the same issue, however sometimes it randomly worked for unknown reasons.
According to claude code itself it has two tools to edit files:

Edit tool - Does string find/replace operations

Write tool - Overwrites entire files
Both of these should trigger VSCode's diff viewer for you to review changes. The problem is:
When I use Edit, it does precise string replacements but you kept rejecting those edits and asking me to "use the editor"
When I use Write, it replaces the entire file, which does show a diff but is more heavy-handed

It even suggested that I open an issue about it, which is how I found this issue:

<img width="808" height="447" alt="Image" src="https://github.com/user-attachments/assets/d3887970-d8be-44bd-bafb-8845ac0a35b2" />

Keep in mind that this only started happening yesterday for me. Before that it was working just fine in the vscode chat window.
Now it only opens a diff in the chat itself, but not in vscode's built in diff viewer. However when I use claude code from the editor it does use the built in vscode diff viewer... Very strange behaviour!

If it was due to the version, I should have had these issues earlier, but it only started yesterday which leads me to believe that it's either a connection issue between claude and vscode, or some environment issues.

dexter12353 · 6 months ago

It seems this was fixed in more recent versions, I haven't had this issue for a whole so far.

Snailedlt · 6 months ago

I still have the issue, but it was fixed for me for a short while too before it reoccurred, and now happens every time

alsage13 · 6 months ago

I'm putting my two cents in here in the hopes it will help others to understand if they're having a similar experience, especially those who aren't super techy. For clarification, I am using the Claude Code VS Code Extension (v 2.0.75) in VS Code (v 1.107.1) on a Windows 11 machine. Everything is up to date.

Here is the exact version of the issue I'm running into. For the past few weeks, the Claude Code extension in VS Code rarely opens changes in the VS Code diff editor.

Here is how it used to be, where it would show the inline diff changes, but it would pop open the diff editor window.

<img width="2560" height="1368" alt="Image" src="https://github.com/user-attachments/assets/066858e9-c80d-46da-b9d0-1b79ec7e655c" />

This is MUCH more useful, especially when you're working with big chunks of code or text.

Here is how it looks now:

<img width="2560" height="1368" alt="Image" src="https://github.com/user-attachments/assets/2c24b5b7-dbad-448a-b54a-69029f31b91e" />

The inline diff editor only shows what's being changed, so you lose all context. Also, it doesn't show line numbers, so you can't even really find it all that easily on your own.

I have tried any number of fixes, including turning off Windows Defender and Google Drive syncing. I have rolled back the version of the CC extension. Play around with different diff editor settings in VS Code, all to no avail. As far as I can tell, I've tried just about every recommended fix in Github.

I am not a coder and didn't start using Claude Code until right after the VS Code extension was launched, so using the CLI is annoying and a new learning curve I wasn't planning on dealing with. But, it seems to work with the diff editor like normal. It's just a pain and slows me down.

github-actions[bot] · 5 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

Snailedlt · 5 months ago

Don't close it.
The issue is not fixed, it's been almost half a year and we still haven't gotten a fix or even so much as a response to this.

vscode is the most used code esitor by far, it's essential that Claude Code works well with it.

Please fix your shit

@bch, could you look into this?

citriqa · 4 months ago

---
Authored by Claude Code

Workaround: Extension Patch

Created a script that patches the VS Code extension to always show diffs in the full-file editor view.

Script: https://gist.github.com/citriqa/6f7af839804ae2c17ae2f9a07f10c296

The patch removes the supportMultiEdits check, forcing all diffs to use the editor panel instead of inline chat view. Requires re-running after extension updates.

russellgilbert · 4 months ago

Here's a patch script that Claude helped me create to fix the diff preview tab not opening when the file contains CRLFs and a multi-line edit is done.

This script applies two patches to the extension's extension.js file, to convert all CRLFs to LFs before attempting to show the diff tab. This doesn't just force the diff tab to be shown, it normalizes both the existing and new code to use only LFs before the comparison is made for the edit, which allows the diff tab to be shown without an error.

Instructions are included for patching both the Windows extension for editing local files, and the Linux-based extension that's used when editing files via SSH. The script auto-detects the location of the newest Claude Code extension and then backs up the extension.js file before applying the two patches to it. All that's needed after running the script is to reload VS Code, and then the diff preview tab should start working as normal again. See the readme file in the project below for the full instructions.

This is version 1.0.0, with most of the credit going to Claude for figuring out what to patch, as well as how to find the location of the code to patch by using pattern matching instead of minified variable names that may change when the extension is updated. Give it a try and let us know how it works for you. It finally fixed the problem on both Windows and SSH for me.

https://github.com/russellgilbert/claude-code-diff-fix

DaddySharkAU · 4 months ago
Give it a try and let us know how it works for you. It finally fixed the problem on both Windows and SSH for me. https://github.com/russellgilbert/claude-code-diff-fix

Can confirm this patch works as a workaround.

russellgilbert · 4 months ago

I posted about my patch script in the Claude Code Discord so hopefully a dev will see it and fix the issue officially.

https://discord.com/channels/1072196207201501266/1483842348273242223

momala454 · 1 month ago

Another local patch for this, taking a different angle from @citriqa's gist: https://github.com/momala454/claude-code-vscode-ui-fixes

Root cause, for context: the in-chat diff component only ever receives the changed hunk (old_string/new_string), never the file content or its position — so it structurally can't show surrounding context or real line numbers inline (the missing line numbers reported here and the "tofu" squares are the same root cause). The full-file diff only exists on the host side.

citriqa's gist forces the editor diff at edit/permission time by dropping the supportMultiEdits check. This patch instead makes it on-demand:

  • Clicking the in-chat diff opens VS Code's native diff via the extension's existing open_diff RPC (vscode.diff) → full file context + real line numbers, any time, even after the edit was accepted. Falls back to the inline diff if the edit is already applied.
  • Clicking the filename jumps to the changed line.

It's anchor-based with dynamic identifier discovery (survives the minifier renames between releases) and all-or-nothing (aborts to a pristine bundle rather than half-patching). Linux/WSL only for now — the path logic doesn't handle macOS/Windows, so this won't help the Windows folks here yet. Not affiliated with Anthropic; patches your local bundle and ships none of their code.

This has had 16 👍 and no real maintainer response in ~9 months — would be great to see the on-demand native diff (the machinery is already in the extension) shipped officially.