Allowing `Bash(*)` or `Bash(*:*)` doesn't seem to work

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 6 comments · opened Mar 12, 2025 · closed Mar 14, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 0.2.38 (Claude Code)
  • Operating System: MacOS
  • Terminal: Alacritty

Bug Description

Should adding Bash(*) or Bash(*:*) to allowedTools tell Claude to not ask for Bash(ls:*)?

It doesn't seem to:

│   Bash(*:*)                                                                                                                                                                                                       
│ ❯ Bash(ls:*)                                                                                                                                                                                                      
│   Done (esc)

Also — is it allowedTools vs /approved-tools? Seems like we're using both?

TY!

View original on GitHub ↗

6 Comments

bcherny collaborator · 1 year ago

Hey thanks for the report! Renamed /approved-tools -> /allowed-tools in the latest version. @rboyce-ant is going to follow up with a fix for permission syntax.

To unblock, use Bash(ls:*) or Bash. Support for Bash(*) and Bash(ls) landing soon.

max-sixty · 1 year ago

Thank @bcherny !

max-sixty · 1 year ago

FWIW I still can't get it to avoid asking for permissions for lots of things. I've got this:

 claude config get allowedTools
[
  'Bash',
  'Bash(find:*)',
  'Bash(grep:*)',
  'FileEdit',
  'FileRead',
  'FileWrite',
  'Grep',
  'Update',
  'Write'
]

But still get:

│ Do you want to make this edit to foo.py?                                                                                                                                      │
│ ❯ Yes                                                                                                                                                                          │
│   Yes, and don't ask again this session                                                                                                                                        │
│   No, and tell Claude what to do differently (esc)

Possibly updates are landing soon, no stress if so

calummoore · 1 year ago

Seems like this is still not working? Using bash in the CI action (Bash(*)) leads to:

🔧 Bash

Parameters:

{
"command": "npm test",
"description": "Run Jest tests to verify powerOf function works"
}
❌ Error: Claude requested permissions to use Bash, but you haven't granted it yet.

Token usage: 10 input, 7 output

NachoColl · 1 year ago

Still can't use Bash(*) or similar - still in the pipeline? (I guess it's a bit about lowering API calls rate)?
Would be good to have it! Annoying to have to go manually on every new command/format...

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.