claude-code - 💡(How to fix) Fix EEXIST: file already exists, mkdir '.claude' on Windows startup

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

test brasko ⎿ API Error: EEXIST: file already exists, mkdir 'C:\Users\shote.claude'

Fix Action

Workaround

Downgrade to v2.1.68:

npm install -g @anthropic-ai/[email protected]

Code Example

> test brasko
API Error: EEXIST: file already exists, mkdir 'C:\Users\shote\.claude'

---

npm install -g @anthropic-ai/claude-code@2.1.68
RAW_BUFFERClick to expand / collapse

Bug

CLI throws EEXIST error on startup when ~/.claude directory already exists:

> test brasko
  ⎿  API Error: EEXIST: file already exists, mkdir 'C:\Users\shote\.claude'

Environment

  • Platform: Windows 11 Home (10.0.26200)
  • Shell: bash (Git Bash / MSYS2)
  • Affected version: latest (post v2.1.68)
  • Working version: v2.1.68 (downgraded as workaround)

Expected behavior

CLI should check if ~/.claude exists before attempting mkdir, or use mkdir -p / fs.mkdirSync({ recursive: true }).

Workaround

Downgrade to v2.1.68:

npm install -g @anthropic-ai/[email protected]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

CLI should check if ~/.claude exists before attempting mkdir, or use mkdir -p / fs.mkdirSync({ recursive: true }).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix EEXIST: file already exists, mkdir '.claude' on Windows startup