[BUG] Edit preview/diff not showing in VSCode extension UI when confirming changes

Open 💬 52 comments Opened Oct 1, 2025 by apinanaivot

UPDATE: This bug is still present as of 8. March 2026...

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 using the Claude Code VSCode extension, edit previews are not visible when confirming code changes. The UI prompts me to confirm changes but only shows the file in its current state, without displaying the diff/preview of what will be changed.

  • Confirmation dialog appears
  • File opens in current state without showing the diff
  • No preview of what will change is visible
  • Changes work correctly once confirmed, but I can't see what I'm confirming

The same functionality works perfectly when running Claude Code via terminal in VSCode. The diff preview displays as expected.

What Should Happen?

Should show a diff/preview of the proposed changes before confirmation, similar to the terminal CLI version.

Error Messages/Logs

This is visible in vscode dev tools console, not sure if relevant. It says failed to apply edit even though It doesn't fail if I accept it.


index.js:1008 Uncaught (in promise) Error: String not found in file. Failed to apply edit.
    at uX.readMessages (index.js:1008:30299)
localProcessExtensionHost.ts:280 Extension Host
localProcessExtensionHost.ts:281 Claude Code stderr: [DEBUG] "Permission suggestions for Edit: [\n  {\n    \"type\": \"setMode\",\n    \"mode\": \"acceptEdits\",\n    \"destination\": \"session\"\n  }\n]"

Steps to Reproduce

  1. Open VSCode with Claude Code extension
  2. Request code changes via the extension UI
  3. Observe confirmation prompt - diff preview is not visible
  4. Compare with terminal CLI version where diff shows correctly

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.1 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

!Image

VSCode Version: 1.104.2 (e3a5acfb517a443235981655413d566533107e92 x64)

View original on GitHub ↗

52 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8509
  2. https://github.com/anthropics/claude-code/issues/8224
  3. https://github.com/anthropics/claude-code/issues/1317

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

parnexcodes · 9 months ago

Same issue with me

gelnor · 8 months ago

Same issue

elfenlieds7 · 8 months ago

Same, was good even yesterday

apinanaivot · 8 months ago

Guys you are supposed to upvote this if you have the same issue, not comment "same"

Manish-Pradhan-FP · 7 months ago

Looks like this hasnt been fixed. Is there a work around?

apinanaivot · 7 months ago

I use the terminal in visual studio rather than the claude code extension. That works like before.

gelnor · 7 months ago

Could we bring this to the developers’ attention? The terminal version works, but it has some visual issues, and the extension is currently unavailable for me.

stanfordpeng · 7 months ago

I use terminal and the diff is suddenly disappearing. But the claude code plugin is still working

cr4z · 7 months ago

Same issue here. Any workarounds?

edsonbrusque · 7 months ago

Upvoted.

This also happens here.

Shows diff editor when using Linux, VS Code, Claude Code Extension.

Shows diff editor when using Windows, VS Code, Claude Code Terminal.

Doesn't show diff editor when using Windows, VS Code, Claude Code Extension. Or to be more precise, it shows very sporadically, like once in 50 edits or more.

traditioncodes · 6 months ago

Same here automatically switched from showing me a diff in the UI to a terminal view.

dancherb · 6 months ago

Any update on this? This makes Claude Code essentially unuseable on Windows with VSCode

alsage13 · 6 months ago

(cross posted in this thread)

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.

4nds · 5 months ago

Probable Root Cause: CRLF Line Endings + Multi-line String Matching

I think I have identified the technical root cause of this issue. The diff preview fails specifically when:

  1. File has CRLF (\r\n) line endings (default on Windows)
  2. oldString contains newline characters (multi-line replacements)

The extension uses \n in the search string, but CRLF files contain \r\n, causing the "String not found in file" error.

---

Complete Reproduction with Logs

Environment:

  • Extension: Claude Code for VS Code v2.1.11
  • OS: Windows
  • Line Endings: CRLF (default Windows)

---

<details>
<summary><b>Detailed Test Scenarios</b></summary>
<br>

Test File (test-diff-preview.md):

# Test File for Diff Preview Bug

Line A
Line B
Line C

Logs captured from VS Code Output panel (View → Output → Claude Code) during testing.

✅ Scenario 1: Single → Single (CRLF) - Works

Prompt: "Replace 'Line A' with 'Line A modified'"

Log:

2026-01-21 16:52:12.767 [info] Received message from webview: {"type":"request","requestId":"f9744d18fk","request":{"type":"open_diff","originalFilePath":"...\\test-diff-preview.md","newFilePath":"...\\test-diff-preview.md","edits":[{"oldString":"Line A","newString":"Line A modified","replaceAll":false}],"supportMultiEdits":false}}
2026-01-21 16:52:12.767 [info] diff from ...test-diff-preview.md to ...test-diff-preview.md as ✻ [Claude Code] ...test-diff-preview.md
2026-01-21 16:52:12.908 [info] diff result undefined ✻ [Claude Code] ...test-diff-preview.md

Result: Diff preview appears ✅

---

✅ Scenario 2: Single → Multi-line (CRLF) - Works

Prompt: "Replace 'Line A modified' with two lines: 'Line A modified' and 'Line A2 added'"

Log:

2026-01-21 16:54:29.765 [info] Received message from webview: {"type":"request","requestId":"jfuwkx82bpb","request":{"type":"open_diff","originalFilePath":"...\\test-diff-preview.md","newFilePath":"...\\test-diff-preview.md","edits":[{"oldString":"Line A modified","newString":"Line A modified\nLine A2 added","replaceAll":false}],"supportMultiEdits":false}}
2026-01-21 16:54:29.766 [info] diff from ...test-diff-preview.md to ...test-diff-preview.md as ✻ [Claude Code] ...test-diff-preview.md
2026-01-21 16:54:29.892 [info] diff result undefined ✻ [Claude Code] ...test-diff-preview.md

Result: Diff preview appears ✅ (newString with \n doesn't cause issues)

---

❌ Scenario 3: Multi-line → Single (CRLF) - FAILS

Prompt: "Replace both 'Line A modified' and 'Line A2 added' with just 'Line A'"

Log:

2026-01-21 16:55:19.810 [info] Received message from webview: {"type":"request","requestId":"zh4u06blwpm","request":{"type":"open_diff","originalFilePath":"...\\test-diff-preview.md","newFilePath":"...\\test-diff-preview.md","edits":[{"oldString":"Line A modified\nLine A2 added","newString":"Line A","replaceAll":false}],"supportMultiEdits":false}}
2026-01-21 16:55:19.810 [info] diff from ...test-diff-preview.md to ...test-diff-preview.md as ✻ [Claude Code] ...test-diff-preview.md
2026-01-21 16:55:19.811 [error] Error processing client request: Error: String not found in file. Failed to apply edit.

Error:

[error] Error processing client request: Error: String not found in file. Failed to apply edit.

Result: No diff preview, only Yes/No permission prompt ❌

---

✅ Scenario 4: Multi-line → Single (LF) - Works

File converted to LF line endings (click "CRLF" in status bar → "LF" → save)

Prompt: "Replace 'Line A' and 'Line B' with 'Lines A and B merged'"

Log:

2026-01-21 16:56:31.897 [info] Received message from webview: {"type":"request","requestId":"fj58g3vdf4i","request":{"type":"open_diff","originalFilePath":"...\\test-diff-preview.md","newFilePath":"...\\test-diff-preview.md","edits":[{"oldString":"Line A\nLine B","newString":"Lines A and B merged","replaceAll":false}],"supportMultiEdits":false}}
2026-01-21 16:56:31.897 [info] diff from ...test-diff-preview.md to ...test-diff-preview.md as ✻ [Claude Code] ...test-diff-preview.md
2026-01-21 16:56:32.144 [info] diff result undefined ✻ [Claude Code] ...test-diff-preview.md

Result: Diff preview appears ✅

---

</details>

Test Results

| Scenario | File EOL | oldString | newString | Diff Preview | Error |
|----------|----------|-----------|-----------|--------------|-------|
| 1 | CRLF | single-line | single-line | ✅ Works | - |
| 2 | CRLF | single-line | multi-line | ✅ Works | - |
| 3 | CRLF | multi-line | single-line | ❌ Fails | String not found in file |
| 4 | LF | multi-line | single-line | ✅ Works | - |

---

Root Cause

The extension always uses LF (\n) in the oldString parameter, regardless of the file's actual line ending style. When searching in CRLF files:

  • Search string: "Line A\nLine B"
  • Actual file content: "Line A\r\nLine B"
  • Result: String match fails → "String not found in file"

Key Finding: Only oldString with newlines causes issues. newString can contain \n without problems.

---

Addressing Issues in the Thread

<details>
<summary><b>OP's error message about string not found in file</b></summary>

The error message that the OP encountered in the VS Code dev tools console

index.js:1008 Uncaught (in promise) Error: String not found in file. Failed to apply edit.

is precisely the error that occurs when the extension attempts to match multi-line oldString patterns. The extension searches for strings containing LF (\n) line endings, but when the file actually contains CRLF (\r\n), the string match fails.

</details>

<details>
<summary><b>@edsonbrusque's comment about environment patterns</b></summary>

As noted by @edsonbrusque, the diff editor exhibits a pattern:

  • Works: Linux + VS Code Extension (Linux defaults to LF)
  • Works: Windows + Terminal CLI (handles line endings correctly)
  • Fails frequently: Windows + VS Code Extension

This issue occurs predominantly on Windows where CRLF is the default line ending, and it's intermittent because it only manifests during multi-line oldString edits.

</details>

---

Suggested Fixes

  1. Detect file line endings and use matching newlines in oldString
  2. Normalize before matching (convert file content to LF temporarily)
  3. Use line-ending-agnostic search that matches both \n and \r\n

---

Workaround

Convert files to LF line endings:

  1. Click "CRLF" in VS Code status bar → select "LF"
  2. Save file

Note: This may conflict with Git/EditorConfig settings that enforce CRLF on Windows.

gmkeener · 5 months ago

@4nds `s fix worked for me.
been having this issue on windows and changing to LF works

alsage13 · 5 months ago

@4nds You are a GENIUS! Such a simple little fix but it worked! This has been hampering me for weeks. THANK YOU!

If you're dense like me and couldn't figure out what he was talking about at first, open the file which is to be changed and the CRLF/LF toggle is at the bottom right (it's not on the chat window, where I was looking).

<img width="1189" height="160" alt="Image" src="https://github.com/user-attachments/assets/d19cbfda-1df0-4a52-87e2-ab97bbb35ecc" />

dancherb · 5 months ago

For Claude Code to work smoothly again with the fix in mind - do you have to update every file in your codebase to use the new line endings?

gmkeener · 5 months ago

@dancherb i dont think that works.
At least for me in windows every time i save a file it goes back to CRLF so it
s not viable to use it that way, i`ve been dealing with the lack of diff and using github copilot

alsage13 · 5 months ago

It doesn't switch back for me. I don't know if it's the file type I'm working in (almost always MD files) but once I switch it, it's saved. You can also set the default to LF by changing this setting to \n.

<img width="872" height="364" alt="Image" src="https://github.com/user-attachments/assets/08068c85-feb2-4346-8368-ed08612bbe04" />

Since using this fix, I have had no issues with this working; I'm so happy! Hope you all can get a fix on your end.

eharrisglobys · 5 months ago

This issue is still present in extension version 2.1.25. @4nds seems to have found the root cause. It's tedious to have to update the line endings in every file that I want to see diffs for, so hopefully this gets a permanent fix soon.

edjash · 5 months ago

Yes can confirm this bug is present on version 2.1.27 also, Windows 11. The workaround by @4nds of converting CRLF to LF made it work for me, but that is not always possible, and it did put me off using Claude for a long time as the first impression is that the claude vscode extension just does not support nice editor diffs like copilot.

edgariscoding · 5 months ago

I also have this issue

mazumate · 5 months ago

Same issue, workaround works, but its off putting when other agents and extensions dont have that issue

Rom-one · 5 months ago

None of the workarounds stated above worked for me, but running VS Code as an admin did the trick.

sgoudsme · 4 months ago

Same issue just today

kunaldihx · 4 months ago

Facing the same issue even though I am in LF mode

apinanaivot · 4 months ago

Update: Still happening as of March 2026, and the CRLF fix doesn't help in all cases. (Or maybe it stopped working entirely?)

I have a file with LF line endings and diffs still don't show. After digging into the VSCode Developer Tools console, I'm seeing a different error when Claude Code tries to make an edit:

You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker

The full stack trace points to computeDiff failing because the Monaco web worker isn't initialized. So at least in some cases the root cause isn't CRLF at all. The extension's webview isn't setting up MonacoEnvironment before it tries to compute the diff, so the diff view never renders.

This means there are probably two separate bugs here: the CRLF string matching issue that others have reported, and this Monaco worker initialization issue. Switching to LF fixes the first one but not the second.

This is also documented in #14788 by @jdavidbush, who found that the Monaco worker error is file-type specific. Simpler formats like .md, .txt, and .css work fine, but language-specific file types like .js, .php, and in my case, .dart fail because they require a language worker that isn't being configured correctly in the webview context. The theory is that Monaco needs MonacoEnvironment.getWorkerUrl or getWorker to be defined before initializing workers for these file types, and the extension's webview isn't doing that.

This should be a relatively simple bugfix if anyone at anthropic cares?

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

downloaderfan · 4 months ago

I bought the $20 plan only to run across this issue in a few hours.

AI Agents still aren't at a stage where I would trust them autonomously, so prompt --> review --> accept --> prompt --> repeat is my primary flow of working.

But this bug makes it unusable in VS Code on Windows. Cannot see the diff at all. Sad that Anthropic has been ignoring such a core issue for 6 months.

russellgilbert · 4 months ago
But this bug makes it unusable in VS Code on Windows. Cannot see the diff at all.

You might try my patch script that I mentioned above. It completely fixed the problem for me.

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

Russell

gagebolam · 4 months ago
> But this bug makes it unusable in VS Code on Windows. Cannot see the diff at all. You might try my patch script that I mentioned above. It completely fixed the problem for me. https://github.com/russellgilbert/claude-code-diff-fix Russell

Can confirm this works well.

downloaderfan · 4 months ago
You might try my patch script that I mentioned above. It completely fixed the problem for me. https://github.com/russellgilbert/claude-code-diff-fix Russell

Tested it with a few files. It does work as expected, thanks!

edgariscoding · 4 months ago
> But this bug makes it unusable in VS Code on Windows. Cannot see the diff at all. You might try my patch script that I mentioned above. It completely fixed the problem for me. https://github.com/russellgilbert/claude-code-diff-fix Russell

This worked. thanks!

josecoelhomelo · 4 months ago

<img width="296" height="141" alt="Image" src="https://github.com/user-attachments/assets/ae580bf6-0ee5-4711-b9e6-69faccd3cd8f" />

Changing the current file to LF also works. Anyway, it would be nice if Anthropic fixed this.

downloaderfan · 4 months ago
You might try my patch script that I mentioned above. It completely fixed the problem for me. https://github.com/russellgilbert/claude-code-diff-fix Russell

With 2 more days of weekend development, I see this no longer works reliably. It worked properly for my 1st project, which is when I applied this patch and reloaded VS Code window but then about 12 hours later when I opened a new window for another project, there is stopped working.

One person previously said

Update: Still happening as of March 2026, and the CRLF fix doesn't help in all cases.

I'm facing the same. Even after changing to LF, I see it doesn't work 100% of the time. With CRLF, it works approximately 20% of the time & with LF it works like 80%, but not 100% of the time. I'm not sure what causes it to work in some cases but not others, seems very random to me.

Either way, I won't be renewing my Claude subscription next month & will switch to Copilot plans and use Sonnet/Opus that way.

russellgilbert · 4 months ago

@downloaderfan wrote:

With 2 more days of weekend development, I see this no longer works reliably. It worked properly for my 1st project, which is when I applied this patch and reloaded VS Code window but then about 12 hours later when I opened a new window for another project, there is stopped working.

Sorry to hear that - I see they just released extension versions 2.1.75 and 2.1.76. I tested my patch script on both of them and it still works ok, but note that you do need to run the script and reload VS Code again each time the extension updates.

node \path\to\patch_claude_crlf.js
or via ssh:
node /path/to/patch_claude_crlf.js

Ctrl+Shift+P → "Developer: Reload Window"

Let me know if you're having some other problem. Thanks.

downloaderfan · 4 months ago

@russellgilbert

Sorry to hear that - I see they just released extension versions 2.1.75 and 2.1.76. I tested my patch script on both of them and it still works ok, but note that you do need to run the script and reload VS Code again each time the extension updates.

Yeah, I guess that's the compromise we must make. Either run it once & disable updates, missing out of all (including significant) updates or run it once after every update. Considering that updates usually happen in the background silently, that would mean running it daily once using something like Task Scheduler assuming a person wants to set something once & forget about the issue.

russellgilbert · 4 months ago

@downloaderfan wrote:

...that would mean running it daily once using something like Task Scheduler...

Great idea! And a cron job on the Linux/SSH side.

leonids2005 · 4 months ago

when this will be fixed properly?

gagebolam · 4 months ago
when this will be fixed properly?

Well, being that this was initially posted on October 1st, 2025, and still hasn't been fixed... There's really no telling.

leonids2005 · 4 months ago

| Well, being that this was initially posted on October 1st, 2025, and still hasn't been fixed... There's really no telling.
But we have been told Claude Code can easily do it :) :)

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

yurukusa · 3 months ago

A few things that have helped others with this issue:
Workaround 1 — Use the integrated terminal instead of Native UI:
Open VSCode's terminal (Ctrl+\) and run claude` directly. The CLI mode shows full diffs inline. This gives you the same diff preview you'd get in a standalone terminal.
Workaround 2 — Enable verbose output for review before confirming:
Add to your CLAUDE.md:

Before making any edit, show me the full diff in a code block. Wait for my confirmation before proceeding.

This makes Claude print the diff as text in the chat, so you can review it even without the VSCode diff viewer working.
Workaround 3 — Use git diff after each change:
Set up a PostToolUse hook to show diffs after every Edit:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hook": "bash -c 'git diff --stat 2>/dev/null || true'"
      }
    ]
  }
}

This won't show inline diffs, but you'll see which files changed after each edit. You can then use git diff <file> in the terminal to review specifics.
Workaround 4 — Check VSCode settings:
Some users found that the diff viewer depends on these VSCode settings:

{
  "diffEditor.renderSideBySide": true,
  "editor.diffAlgorithm": "advanced"
}

Also try: Command Palette → "Preferences: Open Settings (JSON)" and search for any Claude Code extension settings related to diff rendering.

molon · 3 months ago

If anyone's looking for an alternative — I built a VSCode extension that sidesteps this entirely by not using Claude Code's built-in diff. It watches file writes and shows inline diffs with per-hunk Accept/Discard.

https://github.com/molon/hunkwise

<img width="2338" height="2054" alt="Image" src="https://github.com/user-attachments/assets/c59be747-0138-4fe2-8348-8ee4ca9845aa" />

martin-raspberry · 3 months ago

I don't know if this can help anyone else but I found that after updating to 2.1.107 I could no longer see the suggested code edits. It turned out that if I increased the size of the panel containing Claude Code in the editor, the edit suggestions would suddenly show up. The bug seems to be that they don't show at all if the window is too small.

armordog · 2 months ago

So this is still broken.
Have you considered that this is a core feature?

cosmicnet · 1 month ago

I'm having to use git to keep track of edits claude code is making. All I see in the chat is " Edit [filename]", clicking on that take me to the file, no diff. Copilot shows diff for changes it makes, codex shows diffs for changes it makes. Claude code edits files and doesn't show you what edits it has made??

evandrocoan · 21 days ago

This bug is quite annoying. Or is it a feature and no more diff is supported?

russellgilbert · 21 days ago

I created a patch script to fix the diff preview tab not opening when the file contains CRLFs and a multi-line edit is done.

This script applies three 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

pek2atx · 9 days ago

Confirming this is still present. My symptom: the chat panel shows a stat-only summary line like "Added 7 lines" under the Edit message, but zero diff content renders anywhere — not inline in the message, not in a separate side-by-side tab. The file is edited correctly once confirmed; I just can't see what changed beforehand.

One data point that might help narrow the cause: I run multiple concurrent Claude Code sessions (VS Code chat panel + separate terminal sessions using /ide to connect). I initially suspected the single-connection limit on the "ide" MCP server ("Only one Claude Code instance can be connected to VS Code at a time") was starving the chat panel of its diff-rendering capability. I tested this directly — disconnected all other terminal sessions from /ide and reloaded the VS Code window (Developer: Reload Window) so the chat panel would have exclusive access to the connection — and the diff preview was still completely absent afterward. So in my case at least, it doesn't appear to be simple connection contention between concurrent instances; the underlying rendering issue persists even with a clean, single-instance connection.

VS Code extension, chat panel (not terminal mode — terminal mode with /ide shows diffs fine, consistent with other reports here).

pek2atx · 8 days ago

Follow-up to my earlier comment: the panel-width workaround mentioned by @martin-raspberry above fixed it for me too, and I want to add a bit more precision on what it does/doesn't fix.

Before: Chat panel docked narrow (sidebar width) — zero diff content rendered, only a stat line like "Added N lines" under the Edit message.

After: widened the Chat panel to roughly half my laptop screen — the diff now renders inline in the chat message. This is the same fix others reported, confirmed.

One distinction worth noting: this restores the inline diff, not the separate native side-by-side tab. I also use the extension's Terminal UI mode (claudeCode.useTerminal) + /ide in a different session, which does give the true side-by-side tab reliably — so it seems like there may be two related-but-distinct rendering paths here: (1) whether any diff content renders at all in the chat panel (fixed by panel width), and (2) whether it opens as a separate side-by-side tab vs. inline (seems tied to which UI mode / whether /ide is connected). Just flagging in case that's a useful distinction for whoever's debugging this — inline-in-chat-panel and side-by-side-tab may be two different code paths, not one bug with two symptoms.

Claude Code 2.1.202, macOS, VS Code extension.