[BUG] "Yes, and don't ask again" permission option doesn't persist to settings.json
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 ("Yes, and don't ask again for [command] in [directory]") from the permission prompt, the permission is not persisted to ~/.claude/settings.json. The permissions.allow array remains empty, and the same permission prompt appears again on subsequent commands in the same session and in new sessions.
What Should Happen?
After selecting "Yes, and don't ask again", the permission should be written to ~/.claude/settings.json in the permissions.allow array, and subsequent commands matching that pattern should not prompt for permission.
Workaround
Manually editing ~/.claude/settings.json to add permissions works correctly:
"permissions": {
"allow": [
"Bash(cd:/path/to/directory/*)"
],
"deny": []
}
Environment
- OS: macOS (Darwin 24.6.0)
- Claude Code version: 2.0.69
- Model: claude-opus-4-5-20251101 (via Bedrock)
Error Messages/Logs
Steps to Reproduce
- Run a command that requires permission (e.g., cd /path/to/directory && python3 script.py)
- When prompted, select option 2: "Yes, and don't ask again for cd commands in /path/to/directory"
- Run another command with cd to the same directory
- The permission prompt appears again
- Check ~/.claude/settings.json - the permissions.allow array is still empty: "allow": []
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.69 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗