Claude Code VS Code extension does not show edit diff before confirming changes
When using the Claude Code extension in VS Code on Windows, the confirmation prompt for file edits opens the file in its current state without showing the proposed diff. The same diff displays correctly when Claude Code runs in the VS Code terminal. The developer console also shows an uncaught 'String not found in file. Failed to apply edit' error, even though the edit succeeds when accepted.
Originally asked on GitHub: https://github.com/anthropics/claude-code/issues/8660
4 answers
Status: still open as of the last comments in this thread (March 2026 update in the report); no maintainer fix is posted.
No confirmed fix was given in the thread. The workarounds people reported:
- Use Claude Code in the VS Code integrated terminal instead of the extension UI. One commenter reported that the terminal version still shows the diff correctly, while another reported the terminal diff disappearing for them too.
- Some users reported that the extension showed the diff on Linux but not on Windows, and that on Windows the diff appeared only occasionally (roughly once in 50 edits).
The reporter's environment was Claude Code 2.0.1, VS Code 1.104.2, Windows, with the Anthropic API platform. The console error shows an Edit tool failure in the extension host even though the change applies when accepted, so the error may be unrelated to the missing preview.
General advice: check the Claude Code version, and if you rely on reviewing diffs, use the terminal mode until the extension issue is resolved. Follow the issue for updates.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter used the Claude Code VS Code extension UI on Windows with version 2.0.1 and saw the confirmation prompt without a diff. The same edits showed a diff in the VS Code terminal. Console showed 'String not found in file. Failed to apply edit' although the edit applied on accept.
Source: https://github.com/anthropics/claude-code/issues/8660 (opens external site)
Did this work for you?What @apinanaivot tried on GitHub (Worked)
Commenter switched to running Claude Code in the Visual Studio terminal instead of the extension, which kept showing diffs.
Source: https://github.com/anthropics/claude-code/issues/8660#issuecomment-3554310936 (opens external site)
Did this work for you?What @Manish-Pradhan-FP tried on GitHub (Outcome unclear)
Commenter asked for a workaround after the issue persisted; no answer was given in the thread.
Source: https://github.com/anthropics/claude-code/issues/8660#issuecomment-3553036079 (opens external site)
Did this work for you?