[BUG] Permission model is totally broken
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?
Ever since I started using Claude Code, your permission model has been non-intuitive or broken. Why should I have to grant this command permission ten times in a row?
git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --oneline
Here is my .claude/settings.local.json file (permissions block)
"Bash(git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --oneline --all -- \"qdv1/scripts/dasp_run*.py\")",
"Bash(git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --oneline --diff-filter=D --all -- \"**/dasp_run*.py\")",
"Bash(git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --all --oneline -- \"scripts/modes/chamber.py\")",
"Bash(git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --all --diff-filter=AD --name-only)",
"Bash(git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --all --oneline -- \"qdv1/scripts/modes/chamber.py\")",
"Bash(git -C /Users/jwheeler/Projects/temeculadsp/qdv1 log --all --source --oneline -- \"qdv1/scripts/modes/chamber.py\")"
...others omitted...
I shouldn't have to go in and manually add:
"Bash(git log *)",
and I think if I do in some cases, it doesn't even work or the settings file gets overwritten the next time it asks me for permission.
This is a usability issue that boils over into being a security issue because it makes people more apt to run --dangerously-ignore-permissions because the UX is so bad
The other CLIs, Codex and Gemini, are not so restrictive. Why is yours like this? Is it user error or misunderstanding? I've tried asking Claude to help me and changes it makes to the settings file do not work!
What Should Happen?
It should not include option arguments when a command is granted access.
agreeing to
git -C /Users/jwheeler/Projects/temeculadsp/qdv1 show 71a9a51~1:qdv1/scripts/dasp_run.py
should add
git -C *
to the permissions file or equivalent
Error Messages/Logs
Steps to Reproduce
- Run claude code
- Ask it to do something that requires running shell command
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.142
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗