[VSCode] Write tool (new file): no content preview or expand button in "Ask before edit" mode

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Jun 22, 2026 · closed Jun 23, 2026

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

  1. Enable "Ask before edit" permission mode in the Claude Code VSCode extension.
  2. Ask Claude to create a new file (triggers the Write tool).
  3. 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

View original on GitHub ↗

4 Comments

github-actions[bot] · 3 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/69509

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

tun0 · 3 months ago

Both this issue and #69509 were closed as completed by ant-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?

tververs-simcrew · 3 months ago

@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.

github-actions[bot] · 1 month ago

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.