Write tool silently reports success but does not create file on Windows (new files only)

Resolved 💬 3 comments Opened Apr 17, 2026 by arkheiaai Closed Apr 20, 2026

Summary

The Write tool intermittently fails to create new files on Windows, but returns a success message ("File created successfully at: ...") with no error. The file does not exist on disk after the call.

Environment

  • Platform: Windows 10 Pro for Workstations (10.0.19045)
  • Shell: bash (Git Bash)
  • Model: claude-sonnet-4-6

Behaviour

  • Write tool called to create a new file at a path that does not yet exist
  • Tool returns: File created successfully at: <path>
  • File does not exist when verified with ls or Read
  • Edit tool on existing files in the same directory works correctly throughout
  • Write to new files in other directories works correctly in the same session
  • The failure affected multiple consecutive new-file Write calls targeting C:\arkheia-synesis\docs\specs\ in the same session window
  • On a subsequent session (or after some time), Write to new files in the same directory succeeded

Impact

Five specification documents (~150KB of content) written across a session were never persisted to disk. The documents existed only in the context window. Recovery was possible only by parsing the session JSONL transcript to re-extract and re-run the Write calls.

Suspected cause

Possibly a permissions/lock anomaly on the target directory on Windows (antivirus, file watcher, git/Vercel daemon holding a directory handle) causing new file creation to fail at the OS level while the tool's internal success path is taken regardless. Alternatively a tool-level issue where the success response is emitted before confirming the OS write completed.

Workaround

Verify new file creation with ls or Read immediately after every Write call to a new path.

Suggested fix

The Write tool should verify the file exists at the target path after writing and return an error if the verification fails. A silent success on a failed OS write is worse than an explicit error.

View original on GitHub ↗

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