[Bug] Bash wildcard permissions not matching commands with quoted arguments
Bug Description
The issue: Bash() permission wildcards don't reliably match commands in
settings.local.json.
Specifically:
- Bash(npx agent-browser:*) does NOT match npx agent-browser fill
"textarea#review-notes" "text"
- Bash(npx agent-browser :*) (with space before colon) also doesn't work
- "defaultMode": "dontAsk" in settings.local.json also didn't prevent the prompt
The :* suffix is documented as a prefix wildcard but doesn't seem to match when the
command has quoted arguments or complex parameters after the prefix. Even setting
defaultMode to dontAsk in the local settings didn't override the permission prompt.
Workaround that should work but doesn't: Setting defaultMode: "dontAsk" in
settings.local.json.
Related issues:
- https://github.com/anthropics/claude-code/issues/29616 — Bash wildcard permissions
not matching
- https://github.com/anthropics/claude-code/issues/8581 — Wildcards fail with env var
prefixes
- https://github.com/anthropics/claude-code/issues/3428 — Bash:* wildcard not working
For now — can you just approve the npx agent-browser commands when they come up, or
switch to dontAsk mode via the /permissions menu? I'll use batch files to minimize
the number of prompts.
Environment Info
- Platform: darwin
- Terminal: zed
- Version: 2.1.79
- Feedback ID: 06265273-f25e-441a-8eed-3e7a278fe960
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗