[BUG] Permanent permission approval overwrites entire allow array instead of appending
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 selecting option 2 "Allow permanently" for a permission request, Claude
Code overwrites the entire allow array in .claude/settings.local.json instead of appending the new permission to the existing array.
All previous permissions are deleted.
What Should Happen?
The new permission should be appended to the existing array:
``{``
"permissions": {
"allow": [
"Read",
"Glob",
"Grep",
...
"Bash(npx biome migrate*)"
]
}
}
Error Messages/Logs
Steps to Reproduce
- Have existing permissions in
.claude/settings.local.json:
```json
{
"permissions": {
"allow": [
"Read",
"Glob",
"Grep",
"Bash(npm run test:*)",
"Bash(npm run lint:*)",
"Bash(npm run lint:biome:*)",
"Bash(npm run format:*)",
"Bash(npm run format:biome:*)",
"Bash(npm run build)",
"Bash(npm run typecheck:*)",
"Bash(npm run typegen:*)",
"Bash(git status)",
"Bash(git log*)",
"Bash(git diff*)",
"Bash(git branch*)",
"Bash(git remote*)",
"Bash(git ls-files*)",
"Bash(git blame*)",
"Bash(ls*)",
"Bash(cat*)",
"Bash(head*)",
"Bash(tail*)",
"Bash(pwd)",
"Bash(tree*)",
"Bash(du*)",
"Bash(wc*)",
"Bash(file*)",
"BashOutput",
"Bash(curl*)",
"Bash(wget*)",
"Bash(ping*)",
"Bash(npm install*)",
"Bash(npm list*)",
...
]
}
}
- Claude requests a new permission (e.g., npx biome migrate)
- Select option 2 "Allow permanently"
- Check .claude/settings.local.json
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.37 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗