[BUG] settings.local.json entry permissions.allow is periodically cleared during use
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I use the /permissions command or allow Claude permission to run a command for the session, I see these entries are added to the permissions.allow entry of settings.local.json. However, I also see that this array is periodically cleared sometime while I'm using Claude Code. This is very frustrating as it makes it impossible to accumulate useful rules. This is happening to me roughly twice per day of fairly continuous Claude Code use.
What Should Happen?
The rules should accumulate in settings.local.json and this file should not be cleared without permission.
Error Messages/Logs
Steps to Reproduce
I don't have a specific procedure but I noticed I was being asked to reconfirm permissions for commands for which I had already given permission. I've been carefully watching the rules accumulate in settings.local.json as I add rules, but then suddenly the list is cleared. I've haven't been paying so much attention that I have noticed exactly what triggered it.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Worked until a recent update a few days ago.
Claude Code Version
2.0.24 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗