EBUSY: resource busy or locked when running multiple Claude instances concurrently
Resolved 💬 3 comments Opened Jan 22, 2026 by Git-Faisal Closed Jan 26, 2026
Description
Running multiple Claude Code instances concurrently causes crashes due to file lock conflicts on the shared .claude.json config file.
Error Message
ERROR EBUSY: resource busy or locked, open 'C:\Users\<user>\.claude.json'
at writeFileSync (unknown)
at XC (B:/~BUN/root/claude.exe:4537:1226)
at _mI (B:/~BUN/root/claude.exe:4537:4213)
at fA (B:/~BUN/root/claude.exe:4537:2868)
This error originated either by throwing inside of an async function without a catch block,
or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EBUSY: resource busy or locked, open 'C:\Users\<user>\.claude.json'
Environment
- OS: Windows 11
- Claude Code version: Latest (as of Jan 2025)
- User folder location: OneDrive synced directory
Steps to Reproduce
- Open 4 separate terminal windows
- Run
claude --dangerously-skip-permissionsin each - Give each agent a task that runs continuously
- Within 5-15 minutes, 1-2 agents crash with EBUSY error
Expected Behavior
Multiple Claude instances should be able to run concurrently without crashing due to config file access.
Possible Causes
- Multiple instances attempting
writeFileSyncto.claude.jsonsimultaneously - OneDrive sync adding additional file locks
- No file locking/retry mechanism for concurrent access
Suggested Fixes
- Use atomic file writes with temp file + rename
- Add retry logic with exponential backoff for EBUSY errors
- Use per-instance config files or instance-specific locks
- Consider using a lock file mechanism before writes
Workarounds
- Limit to 2 concurrent agents (reduces collision frequency)
- Move project to non-OneDrive directory
- Manually restart crashed agents and reset orphaned state
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗