Bash allowlist patterns with wildcards don't match multi-argument rm commands

Resolved 💬 4 comments Opened May 18, 2026 by morganb-rav Closed May 18, 2026

Summary

Allowlist patterns like Bash(rm -rf "/Users/path/*) in settings.json do not suppress permission prompts when the rm command is called with multiple path arguments.

Steps to reproduce

  1. Add "Bash(rm -rf \"/Users/morganturner/PKA/*)" to the allow list in .claude/settings.json
  2. Run a bash command with multiple arguments:

``
rm -rf "/Users/morganturner/PKA/Team Inbox/alvin/folder-a" "/Users/morganturner/PKA/Team Inbox/alvin/folder-b"
``

  1. Permission prompt still appears, even though both paths match the wildcard pattern.

Expected behavior

Any rm -rf command where all arguments are paths under /Users/morganturner/PKA/ should be auto-allowed without a prompt.

Actual behavior

Multi-argument commands trigger a manual permission prompt even when every argument matches the allowlist pattern.

Workaround

Run each rm as a separate command, or have the user execute the commands directly in the terminal.

🤖 Filed from Claude Code session

View original on GitHub ↗

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