[BUG] ask permission rules don't take precedence over allow when Bash is in allow list
Resolved 💬 6 comments Opened Dec 24, 2025 by Jer-y Closed May 9, 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?
According to the documentation:
Ask rules will ask the user for confirmation whenever Claude Code tries to use the specified tool. Ask rules take precedence over allow rules.
However, when Bash is in the allow list, specific ask rules like Bash(rm:*) are ignored.
What Should Happen?
Expected behavior
ask rules should take precedence over allow rules, so rm commands should prompt for confirmation even when Bash is in allow.
Actual behavior
When Bash is in allow, the more specific ask rule Bash(rm:*) is ignored.
Additional notes
denyrules correctly take precedence overallow- puttingBash(rm:*)indenysuccessfully blocks the command.- This affects users who want to allow most Bash commands automatically but require confirmation for dangerous operations like
rm,mv, etc.
Error Messages/Logs
Steps to Reproduce
- Configure
~/.claude/settings.json:
{
"permissions": {
"allow": ["Bash"],
"ask": ["Bash(rm:*)"]
}
}
- Ask Claude Code to run
rm somefile.txt - Result: No confirmation prompt appears, command executes directly
- Remove
Bashfromallowlist, keepaskrule:
{
"permissions": {
"allow": [],
"ask": ["Bash(rm:*)"]
}
}
- Ask Claude Code to run
rm somefile.txt - Result: Confirmation prompt appears correctly
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.0.76
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗