[BUG] Command `allowed-tools` not being respected
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.73 (Claude Code)
- Operating System: macOS 15.5
- Terminal: Vscode terminal integration
Bug Description
I have a slash command to do a git commit. however I am almost always asked for permission to make the commit. I have Bash(git commit:*) in my allowed-tools but it does not seem to care.
<img width="599" height="673" alt="Image" src="https://github.com/user-attachments/assets/4b7994d5-8269-4237-8a12-620776f65153" />
```sh title=.claude/commands/git/commit.md
---
allowed-tools: Bash(git add:), Bash(git status:), Bash(git commit:), Bash(git log:)
description: Create a git commit
argument-hint: [optional instructions]
---
Context
- Current git status: !
git status - Current git diff (staged and unstaged changes): !
git diff HEAD - Current branch: !
git branch --show-current - Recent commits: !
git log --oneline -10
Your task
Optional instructions: $ARGUMENTS
Commit message
Based on the above changes, create a single git commit. Use conventional commit message format.
```title="Conventional Commit Message Format"
<type>[optional scope]: <description>
[optional body]
[optional footer]
## Steps to Reproduce
Use the above command to commit. I usually git the optional instructions of: `commit only staged files`
## Expected Behavior
I should not have to approve the Bash command to make a commit
## Actual Behavior
Have to approve Bash command to commit
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗