-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Closed
Copy link
Labels
area:corebugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction steps
Description
Description
Running multiple Claude Code instances simultaneously causes repeated .claude.json corruption due to concurrent writes without file locking or atomic write operations.
Environment
- Claude Code version: 2.1.59 (also observed on earlier versions back to at least ~2.1.56)
- OS: Windows 11 Pro 10.0.26200
- Shell: Windows Powershell
Steps to Reproduce
- Open 5+ terminal windows
- Run
claudein each - Use them concurrently for normal work
- Observe repeated corruption warnings on startup and during sessions
Observed Behavior
Each instance detects the corruption, backs up the broken file, and recovers — but this produces:
- Hundreds of
.claude.json.corrupted.*backup files in~/.claude/backups/(305 files accumulated in a single day) - Spam warning messages on every startup:
Claude configuration file at C:\Users\<user>\.claude.json is corrupted: JSON Parse error: Unexpected EOF The corrupted file has been backed up to: C:\Users\<user>\.claude\backups\.claude.json.corrupted.<timestamp> - The corrupted files show truncated JSON (partial writes caught mid-stream)
Expected Behavior
Multiple concurrent instances should be able to coexist without corrupting the shared config file. No warning spam, no backup file accumulation.
Suggested Fix
Redacted by Claude Code maintainers to avoid confusion as users find this issue.
Impact
- Not data-losing — Claude Code recovers gracefully each time
- Annoying — constant warning messages disrupt workflow
- Disk clutter — hundreds of small backup files accumulate rapidly
- Legitimate workflow — running multiple instances in parallel (e.g., one per project/repo) is a common power-user pattern that should be supported
Reactions are currently unavailable
Pinned by stevenpetryk
Pinned comment options
All, we've released 2.1.61 which should fix this problem. Please run claude update to get the latest.
This was a disruptive error, so I wanted to share the action items we are going to take:
- We are going to address the underlying race condition that led to processes getting partial reads/EOF. (The hotfix in 2.1.61 only fixes a bug that caused excess writes.)
- We are going to alert on the rate of config corruption events (we had analytics, but they did not trigger paging alarms).
- We are going to add an employee-only feature that exposes excess config writes directly in the UI (this won't be public, but it'll help us catch this category of issue before release).
Thank you so much for your …
Metadata
Metadata
Assignees
Labels
area:corebugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction steps