[BUG] `.claude.json` is trucated directly, and so occasionally gets corrupted
Resolved 💬 15 comments Opened Jun 25, 2025 by max-sixty Closed Jan 4, 2026
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: <!-- output of
claude --version--> 1.0.35 - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> macOS
- Terminal: <!-- e.g. iTerm2, Terminal App --> Alacritty
Bug Description
I occasionally get my .claude.json wiped. I _think_ that's happening because claude truncates it directly when writing an edit. and so if one process hasn't completed writing when another attempts to read, it'll get a corrupted file, and then wipes the whole thing
this becomes really evident when mounting it as a file to a container; if lots of claudes are running, and .claude.json is large, the container is fairly likely to get less than a full file given docker's mount performance
Expected Behavior
have claude do an atomic rename of .claude.json
This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗