[BUG] EEXIST: file already exists, mkdir 'C:\Users\<USERNAME>'

Resolved 💬 3 comments Opened Mar 6, 2026 by murfee25 Closed Apr 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude CLI started freezing when attempting to start it.
Reboots, attempts to reinstall irm https://claude.ai/install.ps1 | iex failed.
Installer would also freeze.
In the logs it would report

EEXIST: file already exists, mkdir 'C:\Users\<USERNAME>'

Claude web helped me to manually delete all claude/anthropic files from my profile and uninstall from npm.
Attempts to reinstall irm https://claude.ai/install.ps1 | iex failed with same issue, even after reboot.

Claude web suggested installing using npm method again @anthropic-ai/claude-code after manually removing all files again.
This worked but claude itself said it had switched to standalone and to run claude install I think. Then everything was broken again and same error appears in the logs.

Claude support bot now suggests the package has been updated and is now called @anthropic-ai/claude-agent-sdk

So going to remove all claude files once again manually and try another install.

  • using nvm and manually switched to each version and ran the nvm uninstall for each.

What Should Happen?

Claude should install using the standalone installer as this apparently is the newest way that it should operate.

Claude should then work.

Error Messages/Logs

2026-03-05T17:26:38.061Z [ERROR] Failed to save config with lock: Error: EEXIST: file already exists, mkdir 'C:\Users\<USERNAME>'

Steps to Reproduce

Clear down all claude/.claude/anthropic folders from profile, within local, .local, roaming folders.
Run npm uninstall for each version in nvm.

Reboot.
irm https://claude.ai/install.ps1 | iex
or
npm install -g @anthropic-ai/claude-code then let it upgrade itself.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

latest

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Use powershell but also gitbash.

View original on GitHub ↗

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