[VSCode] Write tool (new file): no content preview or expand button in "Ask before edit" mode
Bug Description
When "Ask before edit" permission mode is active in the VSCode extension, the permission prompt for the Write tool (new file creation) shows no content preview — there is no "expand to view" button and no syntax highlighting.
By contrast, the Edit tool (existing file modification) correctly shows the diff with syntax highlighting and a "Click to expand" button.
This is a productivity blocker: you're approving file creation blind.
Steps to Reproduce
- Enable "Ask before edit" permission mode in the Claude Code VSCode extension.
- Ask Claude to create a new file (triggers the Write tool).
- Observe the permission prompt — it shows only the filename and line count, with no way to inspect the content.
Expected Behavior
The Write tool permission prompt should show the new file's contents with syntax highlighting and an expand/collapse control, matching the behaviour of the Edit tool prompt.
Actual Behavior
- Edit tool prompt → shows a diff with syntax highlighting + "Click to expand" button. ✅
- Write tool prompt → shows filename + line count only, no content preview, no expand button. ❌
_Screenshots attached below._
<img width="1483" height="287" alt="Image" src="https://github.com/user-attachments/assets/2e25b13a-870c-44ce-ae01-6941c4336955" />
<img width="1455" height="154" alt="Image" src="https://github.com/user-attachments/assets/b91d8531-ec28-4cb8-83fe-828957d5d6f2" />
Environment
- Tool: Claude Code VSCode extension
- Permission mode: "Ask before edit"
- OS: Linux
Related Issues
- #8660
- #16297
4 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Both this issue and #69509 were closed as
completedbyant-github-proxy[bot]within a second of each other on 2026-06-23, with no explanation. The release notes between then and now don't mention a fix for Write tool preview in the VS Code extension. Could someone clarify — was this fixed, tracked internally, or closed for another reason?@tun0 In some of the other threads a user named russelgilbert posted this fix:
https://github.com/russellgilbert/claude-code-diff-fix
I was having the same issue. Mainly with no full-file diff opening when Claude suggested an edit, only the previews in the chat.
The fix from russelgilbert fixed this for me.
It seems to be some kind of problem with CRLF and LF normalization? Which causes it to fail to open the full-file previews.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.