[BUG] File diffs not appearing in VSCode/Cursor when Claude Code makes edits

Open 💬 16 comments Opened Jan 4, 2026 by RJDOC

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?

When Claude Code (running in VSCode/Cursor extension) makes file edits using the Edit or Write tools, no diffs are displayed in the editor. The changes are applied but there's no visual diff preview showing what was modified.

Environment:
Claude Code VSCode Extension
Editor: VSCode / Cursor

Actual Behavior:
0 diffs shown in VSCode/Cursor
Changes are applied directly without visual diff preview
Multiple files edited across session with no diff visibility

What Should Happen?

Expected Behavior:
Diffs should appear showing the before/after of each file modification
User should be able to review changes before they're applied (or at minimum see what changed)

Error Messages/Logs

Steps to Reproduce

Open a project in VSCode/Cursor with Claude Code extension
Ask Claude to edit a file (e.g., "add a section to CLAUDE.md")
Claude uses the Edit tool to modify the file
Observe: No diff is shown - changes are applied silently

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Other

Operating System

Other Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

16 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8660
  2. https://github.com/anthropics/claude-code/issues/8509
  3. https://github.com/anthropics/claude-code/issues/13301

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

RJDOC · 6 months ago

All 3 of those issues are specific to no diff appearing when being asked to accept changes, but I don't believe mention the fact that this bug occurs when auto-edits are enabled, too, which is a worse problem IMO.

vvbogdanov87 · 5 months ago

The absence of a "diff" feature similar to Copilot's is the main reason I can't switch from Copilot to Claude. This feature is essential for me, and without it, I find any agent unusable in VS Code. I wanted to try Claude, but I immediately lost interest due to this limitation and didn’t take the time to explore its other capabilities.

mobeenikhtiar21 · 5 months ago

Having this same issue, and coming from Cursor, this is a huge letdown. I like to verify each change carefully and make edits. In Cursor, we can apply changes, keep refining them, move to the next step, and still have the option to reject the second round and go back to the previous stable version that we accepted. If we can get that, along with Claude’s code quality, that would be a huge win.

jjovalle99 · 5 months ago

I have been facing the same issue. Sometimes it works, sometimes it does not work. I am using Ghostty + VSCode

shmilyhurt · 5 months ago

I've used several AI tools, and they generally offer code comparison, allowing me to clearly see code changes. Claude currently only displays changes made directly to the file within the command line, which isn't good news for me. For front-end development, a single function might involve many lines of code, and I need to understand exactly how the AI ​​is working. Therefore, please add code comparison functionality. I believe that Claude's code accuracy combined with code comparison would make it an excellent working partner.

ekutner · 4 months ago

Same here but only when running in a dev container. I didn't have this problem running in native windows environment.

HaSungJe · 4 months ago

When requesting code changes through the Claude Code for VS Code extension in VS Code/Windsurf, there is no before/after diff comparison shown — only three options appear:

Yes
Yes, allow all edits this session
No

This is very inconvenient compared to Windsurf's Cascade, which shows a side-by-side before/after diff view alongside the accept/reject options. Without being able to see what changes are being made before accepting, it's difficult to review and make informed decisions.
Please add a diff view that shows the original and proposed code side by side, similar to Windsurf Cascade's implementation.

ayman-tech · 4 months ago

Same issue im facing, and coming from github copilot. Its feels very frustrating, i too like to check each change and approve accordingly

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.

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

molon · 3 months ago

@HaSungJe I ended up building a VSCode extension for this — it shows inline diffs with per-hunk Accept/Discard, kind of like what you're describing with Windsurf Cascade.

Caveat: it uses a proposed VSCode API (editorInsets), so no marketplace — VSIX install only.

https://github.com/molon/hunkwise

<img width="2338" height="2054" alt="Image" src="https://github.com/user-attachments/assets/3b99cfc0-2db8-4c1c-ba97-bd1051a164b5" />

onrubia · 3 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

I cannot find the claude code extension anywhere, its clearly not in .vscode/extensions

I also installed it in a remote ssh server and didn't work

russellgilbert · 3 months ago

@onrubia wrote:

I cannot find the claude code extension anywhere, its clearly not in .vscode/extensions

If you're just trying to run my patch script, you don't need to know where the Claude Code extension is installed, as long as you've already installed it in VS Code (locally and on the SSH server). Just follow the instructions on my page to run the patch script from anywhere (on both the local PC and the SSH server), and it'll find the extension folder automatically on each machine.

But in case you want to know where the extension is...

On your Windows PC, the extension should be here after you've installed it in VS Code _locally_:

C:\Users\<YOUR_USERNAME>\.vscode\extensions\anthropic.claude-code-2.1.109-win32-x64

On the remote SSH server, it should be here after you've installed it in VS Code _on the SSH server_:

~/.vscode-server/extensions/anthropic.claude-code-2.1.109-linux-x64

onrubia · 3 months ago
If you're just trying to run my patch script, you don't need to know where the Claude Code extension is installed, as long as you've already installed it in VS Code (locally and on the SSH server). Just follow the instructions on my page to run the patch script from anywhere (on both the local PC and the SSH server), and it'll find the extension folder automatically on each machine.

the patch script doesn't find it, and when I go to that folder, I only can see the folders of other plugins, but not this one...

On the remote SSH server, it should be here after you've installed it in VS Code _on the SSH server_:

I executed it from the remote terminal in vscode, it patched "successfully", but doesn't seem to do anything

I can try whatever or provide whatever info you need to guess what is going on if you want.

russellgilbert · 3 months ago

@onrubia wrote:

the patch script doesn't find it, and when I go to that folder, I only can see the folders of other plugins, but not this one...

In VS Code, on the Extensions tab (Ctrl+Shift+X), look under the heading "LOCAL - INSTALLED" and make sure you see "Claude Code for VS Code". (Collapse the heading "SSH: <name> - INSTALLED" if it's covering up some of the local extensions.) If it's there, then you should see it on the C: drive. Try pasting this into File Explorer to make sure you're looking under the right username:

%USERPROFILE%\.vscode\extensions

Then download my patch script it and save it somewhere locally on your PC. Then open a Windows Command Prompt, change to the download directory, and run the script:

C:\> node patch_claude_crlf.js
Found extension: C:\Users\ms\.vscode\extensions\anthropic.claude-code-2.1.109-win32-x64
Version: 2.1.109
[etc.]
I executed it from the remote terminal in vscode, it patched "successfully", but doesn't seem to do anything

First, verify that the Claude Code extension is in VS Code, on the same Extensions tab, under the heading "SSH: <name> - INSTALLED".

Then download my patch script to a folder on the SSH server. Then in the terminal, change to the download directory, and run the script:

> node patch_claude_crlf.js
Found extension: /home/russellg/.vscode-server/extensions/anthropic.claude-code-2.1.109-linux-x64
Version: 2.1.109
[etc.]
cveld · 2 months ago

In my case the diff window regularly does pop up, but not always. No clue why. And, if I am running two sessions, then the diff window is impacted. It seems only the latest can own the diff experience. Bit silly, every session should be able to spawn a diff window.

Could be related to crlf. I will check your patch @russellgilbert