EEXIST: file already exists
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 1–100
Ranked by community engagement (reactions weighted over comments).
- v2.1.69: Freezes on startup on Windows - mkdirSync EEXIST error loop
- [BUG]
- [BUG] Claude Code 2.1.69 freezes on startup in specific project directories on Windows
- Write/Edit tools fail with EEXIST on OneDrive directories (v2.1.69 regression)
- [BUG] 2.1.69 hangs on Windows after "Yes, I trust this folder" — EEXIST lock path error
- [BUG] Native Windows binary fails on every prompt — EEXIST in OAuth token path
- session-env dir locks and requires manual rmdir to unstick Bash tool on Windows
- [Bug] 2.1.69 TUI hangs on Windows due to config directory creation failure (EEXIST)
- [BUG] /heapdump fails with EEXIST on Windows
- EEXIST: file already exists, mkdir - startup hang when home directory has ReadOnly attribute on Windows
- [BUG] Claude Code hangs on startup / auth fails with "EEXIST: file already exists, mkdir 'C:\Users\<username>"
- [BUG] Bash tool permanently fails with EEXIST on session-env mkdir (Windows) — triggers after context compression and spontaneously
- [BUG] Windows: Trust dialog stuck — Enter key does nothing due to mkdirSync EEXIST error
- EEXIST: file already exists, mkdir when Edit tool updates files in existing directories on Windows
- [BUG] EEXIST: mkdir 'session-env/<UUID>' when .claude is a symlink to OneDrive-synced folder (Windows)
- Memory leak: claude process reaches 18GB private memory in long session
- [BUG] Windows 11 KB5079473 (March 2026) causes consistent heap exhaustion in Claude Code on WSL2
- [Bug] Anthropic API Error: 529 Overloaded - Missing Exponential Backoff for Subagent Spawns
- [BUG] VSCode Extension crashes on Windows: EEXIST error trying to mkdir user home directory
- [BUG] Bash tool fails with EEXIST on every call (Windows 11) — session-env mkdir regression
- [BUG] EEXIST: file already exists, mkdir 'C:\Users\<USERNAME>'
- [BUG] [Windows] Hangs on startup with repeated EEXIST: file already exists, mkdir 'C:\Users\<username>' errors when saving config lock
- [BUG] Write/Edit tools fail with EEXIST on non-OneDrive directories (C: drive)
- [BUG] isolation="worktree" fails on Windows — falsely reports "not in a git repository"
- Write and Edit tools fail with EEXIST error on Windows/NTFS
- Write tool fails with EEXIST error on paths containing non-ASCII (Japanese) characters on Windows
- [BUG] Claude Code's config-save lock mechanism uses mkdirSync without the {recursive: true} flag on Windows.
- Write tool fails with EEXIST on Windows when parent directory already exists
- Bash tool fails with EEXIST on session-env mkdir after context compression (Windows)
- SessionStart hook error: EEXIST when creating plugin data directory
- [BUG] Titel: "EEXIST error on every API call on Windows - mkdir .claude fails"
- [BUG] Bash tool fails with EEXIST on session-env directory mid-session (Windows)
- [BUG] Bash tool fails with EEXIST on all calls after the first within a single session (Windows, session-env mkdir race)
- Windows: Bash tool fails repeatedly with EEXIST on session-env mkdir after first use
- [BUG] /heapdump fails on Windows with EEXIST when Desktop directory already exists
- [BUG] `/heapdump` command fails when the working directory is `C:\Users\<user>\Desktop` (or any existing directory).
- [BUG] Edit/Write tool fails with EEXIST on OneDrive paths (Windows)
- [Bug] Plugin installation fails with EEXIST error on Windows when cache directory exists
- [BUG] EEXIST: file already exists, mkdir on Windows when target directory already exists — affects both Write and Edit tools
- [BUG] Edit tool fails with EEXIST when editing files at the working directory root on Windows
- [Bug] Claude Code 2.1.69 silently exits on Windows — EEXIST: file already exists, mkdir 'C:\Users\<username>'
- [BUG] Native Windows binary fails on every prompt and command
- [BUG] Stop hook fails with EEXIST when plugin data directory already exists
- [BUG] Claude Code hangs on startup when Windows username contains spaces (EEXIST error)
- [BUG] Windows EEXIST error on startup: Failed to save config with lock (mkdir conflict with USERPROFILE when using Git Bash)
- [BUG] EEXIST: file already exists, mkdir. Regression in v2.1.69
- [BUG] --worktree flag panics with segfault when .claude/worktrees directory already exists
- [Bug] Claude Code update fails when $HOME environment variable is modified
- claude update fails with EEXIST on Windows when directories already exist
- [BUG] Write tool fails with EEXIST on Windows + OneDrive for longer file paths
- [Bug] Dangerous misinterpretation of file deletion request resulted in unintended --force-reset execution
- [BUG] Edit Tool bug for file paths with spaces
- Skill tool fails with EEXIST on Windows when username contains non-ASCII characters
- [BUG] : Windows: CLI soft‑bricked after adding daily “auto‑fetch” hook; can't reinstall
- EEXIST error blocks agent creation when .claude/agents directory already exists
- Windows: Claude Code sets FILE_ATTRIBUTE_READONLY on its own ~/.claude subdirs, breaking Bash tool (EEXIST on session-env mkdir)
- [BUG] Subagent worktree mkdir is non-idempotent — recurring close-for-inactivity (refs #39680, #51023, #54706)
- [BUG] Bash tool and SessionStart hooks fail with EEXIST on Windows due to non-idempotent mkdir of session-env
- [Bug] Skills injected in system prompt not persisted across agent messages
- Plugin startup: EEXIST error when plugin data directories already exist (non-recursive mkdir)
- [BUG] Bash tool crashes with EEXIST when session-env folder already exists (mkdir missing recursive: true)
- [BUG] SessionStart hook fails with EEXIST when plugin data dir is a Windows symlink/junction
- [BUG] When you are going to fix this data plugin issue, Anthropic ?
- [BUG]
- SessionStart hook setup fails with EEXIST mkdir on Windows when plugin data directory already exists
- [BUG] Bash tool wedges mid-session with `EEXIST: mkdir session-env/<UUID>` and never recovers
- [BUG] EEXIST on session-env mkdir despite recursive:true (v2.1.108, Windows)
- [Bug] `/buddy` command disappears or becomes unavailable
- [Bug] SessionStart hook error: EEXIST when creating plugin data directories
- Bash tool crashes with EEXIST mkdir on .claude directories mid-session (Windows) — root cause: ReadOnly attribute set by CLI
- I need more information to generate a proper GitHub issue title. Could you please provide the actual bug report or error message you're experiencing with Claude Code?
- [Bug] EEXIST: Plugin directory creation fails when directory already exists
- [Bug] Claude 4.6 Opus high effort degraded reasoning and web search behavior in problem-solving tasks
- I need more information to generate a GitHub issue title. Could you please provide the actual bug report or describe the issue you're experiencing with Claude Code?
- [BUG] API Error: EEXIST: file already exists, mkdir — regression in native builds > 2.1.87 (Windows + Google Drive)
- [Bug] Insights command path building fails on Windows with incorrect variable concatenation
- OneDrive-backed workspaces silently truncate files on write (Cowork)
- [BUG] Agent tool with isolation: "worktree" fails with EEXIST when .claude/worktrees/ directory already exists
- [Windows] EEXIST error on mkdir ~/.claude when folder has ReadOnly attribute
- [Windows] /heapdump fails with EEXIST when output directory already exists
- --channels plugin fails on Windows: EEXIST: file already exists, mkdir '~/.claude'
- C:/Program Files/Git/heapdump fails with EEXIST when Desktop directory already exists
- High memory usage on short session + heapdump fails on Windows
- Edit tool fails with EEXIST: file already exists, mkdir on OneDrive-synced paths
- /heapdump fails on Windows: EEXIST error when Desktop directory already exists
- [BUG] Plugin GUI installer fails with EEXIST when ~/.claude/plugins/cache already exists
- [BUG] Config save lock fails with EEXIST on Windows — home directory used as lock path, blocking onboarding completion
- /heapdump fails on Windows: EEXIST mkdir 'C:\Users\<username>\Desktop'
- Write tool fails with EEXIST on paths containing Unicode characters (ö, ä)
- [BUG] Claude can't Edit Files, Dir Problems, mkdir, Uses Shell and Python to edit
- bug(vscode): Skill tool crashes with EEXIST when home dir is used as working directory on Windows
- [Bug] File editing fails with EEXIST error on Windows 11
- [BUG] Write Tool Fails with EEXIST on Windows OneDrive Directories (Regression in 2.1.69)
- Write/Edit tools throw EEXIST when parent directory already exists
- [BUG] v2.1.69 Edit tool fails with EEXIST error on paths containing spaces (OneDrive directories)
- Windows: EEXIST crash on startup - mkdir fails on existing parent directory
- [BUG] CLI completely hangs/deadlocks on Windows when CWD resolves to an existing User Profile directory (EEXIST in mkdirSync)
- Trust the folder
- Plugin system drops backslash before dot-prefixed directories on Windows
- [BUG] /fork fails with EEXIST - introduced in v2.1.20