Write and Edit tools fail with EEXIST error on Windows/NTFS
Resolved 💬 5 comments Opened Mar 5, 2026 by spikefcz Closed Apr 2, 2026
Starting with Claude Code 2.1.69, the Write and Edit tools intermittently fail with:
EEXIST: file already exists, mkdir 'C:\Users\<user>\.claude\projects\<project>\memory'
The directory already exists and is a regular directory (not a symlink/junction). The error occurs during the internal mkdir call that precedes the actual file write.
Environment
- Claude Code: 2.1.63
- Node.js: v22.17.0
- OS: Windows 11 Home 10.0.26200
- Shell: Git Bash
- Filesystem: NTFS
Steps to reproduce
- Have a project with
.claude/directory containing symlinks (e.g.,skills/shared -> d:\other-repo\.claude\skills) - Try to
WriteorEditany file in an existing subdirectory - Tool fails with
EEXISTonmkdirfor the parent directory
Observed behavior
Writecreates a 0-byte file, then subsequent attempts fail with EEXISTEditfails immediately with EEXIST even though both the directory and file exist- The error is on
mkdir, not on the file write itself —fs.mkdir(recursive: true)appears to choke on already-existing directories
Expected behavior
mkdir with recursive: true should silently succeed if the directory already exists (per Node.js docs).
Workaround
Use Bash tool with cat > file or a Python script to write files instead of Write/Edit tools.
Notes
- Worked fine for ~2 months prior, started after a recent update (likely Claude Code or Node.js upgrade)
- The project has symlinks in
.claude/skills/shared— this may be a contributing factor but the error also reproduces on plain directories without symlinks
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗