[BUG] git commit executes without permission prompt when triggered by slash command/skill
Resolved 💬 3 comments Opened Jan 7, 2026 by mpenza Closed Jan 11, 2026
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?
Version: Claude Code 2.1.0
Description:
When a custom slash command triggers a git commit command, Claude Code executes it without showing a permission prompt, even though git commit is NOT in the my allowlist of permitted commands.
Configuration:
- Custom slash command defined (personal:commit) that analyzes staged changes and creates a commit
- My allow permissions list includes some git commands (e.g., git diff, git status) but explicitly does NOT include git commit
- The skill was invoked via /personal:commit
Security Concern:
The permission allowlist appears to be bypassed in this situation. My allowlist is setup so Claude Code must always ask for permission before executing git commit.
What Should Happen?
Claude Code should prompt for user permission before executing git commit since it is not in the allowed commands list.
Error Messages/Logs
Steps to Reproduce
- Configure Claude Code with an allowlist that includes some git commands but excludes git commit
- Create a custom skill/slash command that runs git commit as part of its workflow
- Stage some changes with git add
- Invoke the slash command (e.g., /commit or custom skill name)
- Observe that git commit executes without a permission prompt
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.0
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 ↗