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

Resolved 💬 3 comments Opened Jun 22, 2026 by raikel 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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗