[BUG] VSCode extension requests permissions for commands already approved
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?
No matter how many times I click "Allow", whether it is for the project, globally, or just for me, these commands are _always_ flagged as needing permission. It ignores the Allow setting, and even creates duplicate permissions, as seen below from /permissions in the cli:
10. Bash(gh api *)
11. Bash(gh api *)
12. Bash(gh pr *)
13. Bash(gh run *)
15. Bash(git diff *)
16. Bash(git diff *)
18. Bash(grep -n *)
19. Bash(grep -nE *)
20. Bash(grep *)
The 'grep' one is particularly egregious, but being asked to approve 'git diff' every time?
I also have every possible way you could refer to several scripts, e.g. scripts/run-tests.sh and ./scripts/run-tests.sh, and /User/full/path/to/scripts/run-tests.sh. With and without the asterisk. It doesn't matter, it asks every time.
I've tried deleting all permissions from all three settings files.
As another example, I'm digging through git history to see when something changed. It asks if it can run "git log [...]" and I say yes, always allow "git log *". Then not ten seconds later, it asks if it can run "git log [...]" about another file it is looking at.
What Should Happen?
Clicking 'allow' should mean the next time the exact same command is attempted, it doesn't ask again.
Error Messages/Logs
Steps to Reproduce
I have no idea. Some commands it remembers after the first "always allow". Some commands it never does.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.20
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
If there were a log file somewhere I'd provide it, but I don't see one in any of the expected locations. If there's instructions for running with logging enabled, I can't find it.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗