[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

  • deny rules correctly take precedence over allow - putting Bash(rm:*) in deny successfully 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

  1. Configure ~/.claude/settings.json:
{
  "permissions": {
    "allow": ["Bash"],
    "ask": ["Bash(rm:*)"]
  }
}
  1. Ask Claude Code to run rm somefile.txt
  2. Result: No confirmation prompt appears, command executes directly
  1. Remove Bash from allow list, keep ask rule:
{
  "permissions": {
    "allow": [],
    "ask": ["Bash(rm:*)"]
  }
}
  1. Ask Claude Code to run rm somefile.txt
  2. 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_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗