Skip to content

Bash wildcard permissions in settings.local.json not matching commands #29616

@DavidLangworthy

Description

@DavidLangworthy

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

  1. Create .claude/settings.local.json:
{
  "permissions": {
    "allow": [
      "Bash(az *)",
      "Bash(gh *)",
      "Bash(git *)",
      "Bash(curl *)"
    ]
  }
}
  1. Ask Claude to run a command like az containerapp show --name foo --resource-group bar
  2. Expected: Command auto-allowed by Bash(az *) wildcard
  3. 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 claude CLI (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

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already exists

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions