Bash permission matcher fails on commands with shell brace expansion
Resolved 💬 2 comments Opened Apr 11, 2026 by rudidev08 Closed Apr 11, 2026
Description
Bash permission rules (e.g., Bash(wc *)) fail to match commands that contain shell brace expansion syntax ({a,b,c}), even though the command prefix matches the rule.
Steps to Reproduce
- Add permission rule to
.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(wc *)"
]
}
}
- Run a simple command — works, no prompt:
wc -l /path/to/file.diff
- Run same command with brace expansion — prompts for permission:
wc -l /path/to/part{1,2,3}.diff
Expected Behavior
Both commands should match Bash(wc *) since they both start with wc . The permission matcher should evaluate against the raw command prefix before considering argument content.
Actual Behavior
The { character in arguments breaks the permission matcher. The user is prompted for permission despite having a matching allow rule.
Additional Notes
- Also tested
Bash(wc:*)(colon prefix syntax) — same behavior, does not match brace expansion commands - Commands without braces match correctly with both syntaxes
Bash(python3 diff-tools/*)works fine for commands likepython3 diff-tools/pipeline.py status 9.00B4 9.00B5(no braces)
Environment
- Claude Code CLI
- macOS (Darwin 25.4.0)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗