Concurrent Claude Code instances corrupt .claude.json on Windows (JSON Parse error: Unexpected EOF)
Bug Report
Version: v2.1.59
OS: Windows 11 Pro (PowerShell / pwsh)
Description
When running Claude Code in one PowerShell terminal and then opening a second PowerShell terminal to run another Claude Code instance concurrently, the second instance fails with:
C:\Users\satoshi\.claude.json is corrupted: JSON Parse error: Unexpected EOF
Steps to Reproduce
- Open a PowerShell (pwsh) terminal
- Run
claude(Claude Code starts normally) - While the first instance is still running, open a second PowerShell terminal
- Run
claudein the second terminal - The second instance throws the JSON parse error
Expected Behavior
Both Claude Code instances should be able to run concurrently without corrupting the shared .claude.json config file. The file access should be properly synchronized (e.g., file locking or atomic writes).
Actual Behavior
The second instance encounters a corrupted .claude.json file, likely due to a race condition where one instance is writing to the file while the other tries to read it simultaneously.
Additional Context
This appears to be a file locking / concurrent access issue on Windows. The .claude.json file is shared across instances and lacks proper synchronization for concurrent read/write operations.
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗