EEXIST: file already exists — page 2
A create or mkdir hit a path that is already taken.
138 issues · 12 open · 126 resolved (91%) · first seen Dec 12, 2025
First response · local
What to do now
Most likely: The operating system rejected a file or directory operation.
- Read the first path in the error and verify that it exists and belongs to the expected user.
- Check disk space, permissions, symlinks and whether another process holds the target.
- Reproduce with the smallest affected path before changing project-wide permissions.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is converging. 19 new reports in the last 90 days vs 114 in the 90 before — -83%. The open backlog peaked at 28 in 2026-03 and sits at 12 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
102 of these reports name the Claude Code build they were running, spanning 54 releases. Heaviest reporters:
- Claude Code v2.1.69
- Claude Code v2.1.72
- Claude Code v2.1.68
- Claude Code v2.1.114
- Claude Code v2.1.71
- Claude Code v2.1.212
- Claude Code v2.1.217
- Claude Code v2.1.173
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 4 days across 126 closures. Of the 126 closures with a recorded reason, 23% were closed as completed and 97 as not-planned or duplicate. The most recent completed fix landed in 2026-07.
Workarounds reported by the community
65 of these issues post a workaround someone says worked. The highest-engagement ones:
- v2.1.69: Freezes on startup on Windows - mkdirSync EEXIST error loop
- …th WSL2 - Standalone installer ( ) - Install method: native Workaround Downgrade to v2.1.66:
Found in the description of #30960 · resolved - Write/Edit tools fail with EEXIST on OneDrive directories (v2.1.69 regression)
- …ws instead of recognizing the directory as already present. Workaround Writing files via Python through the Bash tool works correctly: The filesystem itself is healthy — only the tool's directory-creation logic is affect…
Found in the description of #30928 · resolved - [BUG] 2.1.69 hangs on Windows after "Yes, I trust this folder" — EEXIST lock path error
- …faced to the user — the UI just freezes. Stack trace from : Workaround The npm-installed version at (2.1.64) works correctly. The native installer binary at (2.1.69) is the broken one. Downgrading via npm and ensuring it…
Found in the description of #30932 · resolved - [BUG] Native Windows binary fails on every prompt — EEXIST in OAuth token path
- …lect an existing marketplace Update marketplace → EEXIST on Workaround Manual clone + edit : Then add the entry to manually. The marketplace becomes visible in UI, but Update marketplace still fails with EEXIST. Note Thi…
Found in the thread of #27791 · resolved - session-env dir locks and requires manual rmdir to unstick Bash tool on Windows
- …ardown the session-env dir; they just reset cwd to default. Workaround users can apply today, if they hit this: rmdir /s /q "C:\Users\User\.claude\session-env\<uuid " (where <uuid is whatever appears in the error). Only…
Found in the description of #49984 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 101–138
Ranked by community engagement (reactions weighted over comments).
- [Bug] Auto-updater EEXIST error leaves npm global symlink broken
- [BUG] Cowork (Linux): resuming a pre-upgrade conversation fails with duplicate `.claude` / `.claude/skills` VirtioFS mount ("file exists")
- [BUG] Native installer/updater fails with EEXIST mkdir when XDG dirs live in a OneDrive sync root (orphaned Files-On-Demand placeholders)
- [BUG] EEXIST: file already exists, mkdir '~/.claude/agents' when trying to create an agent
- EEXIST: file already exists, mkdir '.claude' on Windows startup
- Bash tool fails with EEXIST on session-env mkdir — occurs after context compression AND spontaneously (Windows)
- Subagent worktree: non-idempotent mkdir + process handle leak (Windows 11)
- [BUG] Windows MSIX: node-pty fails to spawn shell — 'Error: File not found:' in windowsPtyAgent.js (terminal panel broken)
- [BUG]
- [Bug] /export command broken on Windows: path handling and mkdir recursion failures
- Bash tool fails with EEXIST when session-env path resolves through a reparse point (OneDrive Files-On-Demand)
- EEXIST: file already exists on every second Bash tool call (Windows)
- Edit/Write tools fail with EEXIST on Windows when parent directory exists
- [BUG] Write tool fails with EEXIST when parent directory already exists (Windows)
- MCP tool result auto-save path does not respect HOME environment variable (non-ASCII username)
- [BUG] EOF error with qutoes
- [BUG] [Windows] Bun binary hangs after initialization in v2.1.69 - REPL never mounts
- [BUG] Edit and Write tools fail with EEXIST. Msg: "Both Write and Edit tools fail on this machine for existing directories."
- [BUG] Interactive TUI hangs on startup; -p mode works fine
- Edit tool fails with EEXIST error on Windows (Git Bash) in v2.1.69
- [BUG] Config lock path collides with home directory on Windows domain user profiles
- [BUG] Agent Teams: EEXIST error when spawning teammates after TeamCreate
- [plugin: telegram] Concurrent sessions race on bun install, MCP server fails to start (EEXIST -> -32000 Connection closed)
- [BUG] /export fails with EEXIST on Windows when the target directory has the ReadOnly attribute (Bun mkdir recursive bug — root cause + 1-line fix)
- Interactive session silently stopped persisting its transcript for 2+ weeks — inherited CLAUDE_CODE_CHILD_SESSION marker treated a primary user session as a child session
- [BUG] Linux daemon self-update leaves claude.exe as npm stub when install scripts are blocked
- [BUG] --worktree flag fails with EEXIST on second worktree creation (Windows)
- [BUG] EEXIST: file already exists, mkdir '~/.claude' on every prompt (Windows)
- [BUG] Can't even start hook due to stupid mkdir error since 2.1.80
- Write tool EEXIST error when writing to existing directories on Windows
- Windows MSIX: session cards can never be saved when %APPDATA%\Claude contains a reparse point — one-line manifest fix (RoamingAppData\Claude missing from FileSystemWriteVirtualization exclusions)
- remote-control --spawn worktree: default pre-created session dies with 404 and leaves a stale .claude/worktrees that permanently breaks all later spawns (EEXIST, Windows)
- [BUG] claude update / install.ps1 fail with EEXIST mkdir on ReadOnly directories (bundled Bun bug) — corrects the diagnosis in #67692
- [BUG] update fails with EEXIST on directories from the existing install (native Windows)
- Global gitignore write fails on Windows with EEXIST (mkdir targets existing home dir)
- [BUG] claude update hangs indefinitely (100s+) when falling back from reflink to copy_file_range across filesystems, no timeout or progress indication
- [BUG] CronCreate: fs.mkdirSync(path) does not have the { recursive: true } option, and does not catch EEXIST
- Windows: Write/Edit tools fail with spurious EEXIST on sandboxed workspace (bindflt/bfs mount) — temp file does not exist