[BUG] [Windows] Hangs on startup with repeated EEXIST: file already exists, mkdir 'C:\Users\<username>' errors when saving config lock

Status Fixed / completed
Reported on v2.1.68
Maintainer reply ✓ Yes — ashwin-ant
Activity 3 comments · opened Mar 5, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

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?

On startup from windows terminal, running claude appears to hang. Cursor disappears. This occurs regardless of which project I try to open, even empty folders.

What Should Happen?

Claude should open and show welcome message.

Error Messages/Logs

Failed to save config with lock: Error: EEXIST: file already exists, mkdir 'C:\Users\lovelace'

Steps to Reproduce

Type "claude" at the terminal.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.68

Claude Code Version

2.1.69

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

OS: Windows 11
Claude Code version: 2.1.69
Install method: native
The debug log file contents
Summary: "Claude Code hangs on startup, debug log shows repeated EEXIST: file already exists, mkdir 'C:\Users\lovelace' errors when attempting to save config with lock"

I downloaded 2.1.58 using the following and the issue no longer occurs:
$url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.58/win32-x64/claude.exe"
Invoke-WebRequest -Uri $url -OutFile "$env:USERPROFILE\.local\bin\claude.exe"

View original on GitHub ↗

3 Comments

yurukusa · 6 months ago

The EEXIST error occurs when multiple Claude Code processes try to create the .claude directory simultaneously.

  1. Close all Claude Code instances first:
taskkill /F /IM claude.exe 2>/dev/null
  1. Manually create the directory:
mkdir C:\Users\%USERNAME%\.claude 2>/dev/null
  1. Delete any stale lock files:
del C:\Users\%USERNAME%\.claude\*.lock 2>/dev/null
  1. Restart Claude Code:
claude

Don't start multiple Claude Code instances simultaneously — they race on directory creation.

ashwin-ant collaborator · 6 months ago

This was fixed in v2.1.71 — Startup on Windows no longer hangs with repeated 'EEXIST: file already exists, mkdir' errors when the home directory has the read-only attribute set. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.