Write tool fails immediately in local VS Code despite Write(**) in permissions.allow — Edit works fine

Open 💬 2 comments Opened Jun 9, 2026 by Gabriel-ywn

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?

Write tool calls fail immediately with "Write failed / Tool interrupted" in local VS Code, even though Write(**) is present in permissions.allow across project, user, and user-local settings files. Edit tool works perfectly in the same session. Bash(cat > ...) also works fine.

Key evidence from audit log:

16:05:47 tool_input        Write → guard decision: "allow"
16:05:47 permission_request Write → permissionLevel: null   ← should not happen
  • Guard correctly evaluates as "allow", but a permission_request is still generated with permissionLevel: null
  • Write fails immediately after — no timeout, no user interaction needed to trigger failure
  • Edit(**) in the same allow list works without issues — because Edit goes through --permission-mode acceptEdits (auto-accepted), while Write round-trips to --permission-prompt-tool stdio

Relationship to #65934: Similar root cause (Write round-trips to IDE permission channel while Edit doesn't), but different scenario — #65934 is remote multi-session with 600s timeout; this is local single-session with immediate failure.

What Should Happen?

When Write(**) is in permissions.allow, the Write tool should be auto-approved (same as Edit) without round-tripping to the IDE permission channel. Files should be written successfully.

Error Messages/Logs

Write failed
Tool interrupted

Audit log shows:
permission_request for Write with permissionLevel: null
(despite Write(**) being in permissions.allow at project, user, and user-local levels)

Steps to Reproduce

  1. In .claude/settings.json, ensure Write(**) is in permissions.allow
  2. Open a Claude Code session in VS Code
  3. Ask Claude to write any file (new or existing, any path inside or outside the project)
  4. Expected: Write succeeds (auto-allowed by the permission rule)
  5. Actual: Immediately fails with "Write failed / Tool interrupted"

Additional data points confirming isolation:

  • Edit on the same file: ✅ works
  • Bash(cat > same_file): ✅ works
  • Read on any file: ✅ works
  • Reload Window (Developer: Reload Window): does not fix
  • Tested on both project-internal and external paths: both fail
  • Extension code diff between 2.1.167 and 2.1.168 shows only version string changes, no logic diff

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Before 2.1.167 (exact version unknown)

Claude Code Version

2.1.168 (also reproduced on 2.1.167)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Note: This issue occurs in the VS Code extension panel (not CLI terminal). The extension recently changed from showing two Claude Code entries in the sidebar to one — this UI change coincided with when Write started failing, suggesting the permission IPC channel state may have been affected.

PreToolUse hook: An audit hook (claude-audit-hook) is configured but confirmed to be log-only (Phase 1 — all blocking code is commented out, returns null). Ruled out as a cause.

Workaround: Using Bash(cat > file) for file creation and Edit for modifications. Both work reliably.

View original on GitHub ↗

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