Bash wildcard permissions in settings.local.json not matching commands
Resolved 💬 3 comments Opened Feb 28, 2026 by DavidLangworthy Closed Mar 4, 2026
Description
Wildcard permission patterns like Bash(az *) in .claude/settings.local.json do not match commands. Each command still triggers a permission prompt, and the exact command string gets appended to the allow list instead of being matched by the existing wildcard.
Reproduction
- Create
.claude/settings.local.json:
{
"permissions": {
"allow": [
"Bash(az *)",
"Bash(gh *)",
"Bash(git *)",
"Bash(curl *)"
]
}
}
- Ask Claude to run a command like
az containerapp show --name foo --resource-group bar - Expected: Command auto-allowed by
Bash(az *)wildcard - Actual: Permission prompt appears. Clicking "Always allow" appends the exact command string to the allow list
Evidence
After a session, the settings file grows from 4 wildcard rules to 30+ exact-match entries:
{
"permissions": {
"allow": [
"Bash(az *)",
"Bash(gh *)",
"Bash(az acr list --resource-group rg-foo --query \"[0].name\" -o tsv)",
"Bash(az containerapp logs show --name bar --resource-group rg-foo --tail 30)",
"Bash(gh variable list -R owner/repo)",
"..."
]
}
}
The wildcards on lines 1-2 should have matched all of these.
Environment
- Claude Code via
claudeCLI (Opus 4.6) - macOS Darwin 25.2.0
- Settings file:
.claude/settings.local.json(project-level local) - No deny rules, no other settings files
Related
- #3428
- #27139
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗