[BUG] `claude` on Mac deletes the `.credentials.json` file that `claude` on Linux uses
Resolved 💬 9 comments Opened May 29, 2025 by max-sixty Closed Jun 17, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: <!-- output of
claude --version--> 1.0.5 - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> macOS + ubuntu image
- Terminal: <!-- e.g. iTerm2, Terminal App --> alacritty
Bug Description
I run claude both on Mac natively and using containers. when I use a container, I map in .claude as a volume to share settings. linux writes its creds to .claude/.credentials.json; mac doesn't use them.
I was finding that I'd need to log into claude code when again fairly often when using containers, and that the creds file was disappearing. I added a probe and it shows that it's the Mac claude process deleting the file — below we can see unlink from a node process.
is that intended? does it expire?! assuming it doesn't expire, ideally claude wouldn't delete files just because it doesn't need them.
sudo fs_usage -w -f filesystem \
| grep -iE '\.claude/\.credentials\.json'
Password:
09:44:10.978130 access (___F) /Users/maximilian/.claude/.credentials.json 0.000006 node.36584176
09:44:10.978389 unlink /Users/maximilian/.claude/.credentials.json 0.000235 node.36584176
09:44:11.114233 lstat64 [ 2] /System/Volumes/Data/Users/maximilian/.claude/.credentials.json 0.000014 fseventsd.450762This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗