[BUG] Edit preview/diff not showing in VSCode extension UI when confirming changes
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
- Open VSCode with Claude Code extension
- Request code changes via the extension UI
- Observe confirmation prompt - diff preview is not visible
- 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
VSCode Version: 1.104.2 (e3a5acfb517a443235981655413d566533107e92 x64)
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/8509
- https://github.com/anthropics/claude-code/issues/8224
- 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
Same issue with me
Same issue
Same, was good even yesterday
Guys you are supposed to upvote this if you have the same issue, not comment "same"
Looks like this hasnt been fixed. Is there a work around?
I use the terminal in visual studio rather than the claude code extension. That works like before.
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.
I use terminal and the diff is suddenly disappearing. But the claude code plugin is still working
Same issue here. Any workarounds?
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.