claude-code - 💡(How to fix) Fix Bash allowlist patterns with wildcards don't match multi-argument rm commands

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Fix Action

Workaround

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

🤖 Filed from Claude Code session

Code Example

rm -rf "/Users/morganturner/PKA/Team Inbox/alvin/folder-a" "/Users/morganturner/PKA/Team Inbox/alvin/folder-b"
RAW_BUFFERClick to expand / collapse

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"
  3. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

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

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING