[BUG] project's .claude/settings.local.json does not work

Resolved 💬 16 comments Opened Jun 12, 2025 by ishowshao Closed Jan 9, 2026
💡 Likely answer: A maintainer (rboyce-ant, contributor) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [x] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.21
  • Operating System: macos15.5
  • Terminal: Terminal App

Bug Description

.claude/settings.local.json in my project like this

{
  "permissions": {
    "allow": [
      "Bash(python:*)",
      "Bash(find:*)",
      "Bash(pip:*)",
      "Bash(mkdir:*)",
      "Bash(rg:*)",
      "Bash(grep:*)",
      "Bash(pytest:*)",
      "Bash(rm:*)",
      "Bash(git:*)"
    ],
    "deny": []
  }
}

claude: "Bash(git commit -m "Remove obsolete requirements.txt file…)"

then i get

Bash command                                                                                                                         │
│                                                                                                                                      │
│   git commit -m "Remove obsolete requirements.txt file                                                                               │
│                                                                                                                                      │
│   Dependencies are now managed through pyproject.toml which provides                                                                 │
│   better dependency management and follows modern Python packaging standards.                                                        │
│   The requirements.txt contained 44 transitive dependencies while pyproject.toml                                                     │
│   manages only the 12 direct dependencies needed.                                                                                    │
│                                                                                                                                      │
│   🤖 Generated with [Claude Code](https://claude.ai/code)                                                                            │
│                                                                                                                                      │
│   Co-Authored-By: Claude <noreply@anthropic.com>"                                                                                    │
│   Commit the deletion with detailed message                                                                                          │
│                                                                                                                                      │
│ Do you want to proceed?                                                                                                              │
│ ❯ 1. Yes                                                                                                                             │
│   2. No, and tell Claude what to do differently (esc)  

**Please note that I have set "Bash(git:)" to the permissions.*

Steps to Reproduce

  1. claude
  2. commit code for me

View original on GitHub ↗

16 Comments

rboyce-ant contributor · 1 year ago

@ishowshao does this happen for all git commit commands, or just this one? we have some safety protections to prevent command injection that might have been too sensitive here.

ishowshao · 1 year ago

@rboyce-ant all git commit

AlexSkrypnyk · 1 year ago

@rboyce-ant
Is there docs around this format of wildcards? It is not quite clear what git:* means. I constantly see issues with other binaries.

adamkwhite · 1 year ago
@rboyce-ant Is there docs around this format of wildcards? It is not quite clear what git:* means. I constantly see issues with other binaries.

https://docs.anthropic.com/en/docs/claude-code/settings#settings-files

Turbo87 · 1 year ago

FWIW I'm seeing similar issues, but for me it's not just with git, but also grep, find, rg, and other tools like that. I even have these tools allowed in my ~/.claude/settings.json file too, but Claude Code still often likes to have an additional confirmation for some reason.

swm-sink · 1 year ago

Try removing it from Claude code settings

Then I hardcoded every combo possible in local.settings.json and created a
shadow file and script in case Claude code nukes it which it has

Seems to work but PITA

On Tue, Jul 1, 2025 at 6:24 AM Tobias Bieniek @.***>
wrote:

Turbo87 left a comment (anthropics/claude-code#2014) <https://github.com/anthropics/claude-code/issues/2014#issuecomment-3023232025> FWIW I'm seeing similar issues, but for me it's not just with git, but also grep, find, rg, and other tools like that. I even have these tools allowed in my ~/.claude/settings.json` file too, but Claude Code still often likes to have an additional confirmation for some reason. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/2014#issuecomment-3023232025>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BS3T2UOQMZJ7PGW7KENLPA33GJOUJAVCNFSM6AAAAAB7F3UKZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMRTGIZTEMBSGU> . You are receiving this because you are subscribed to this thread.Message ID: @.***>
swm-sink · 1 year ago

Is this getting addressed? Even when I have dangerously skip permissions on I still get stuck in this PITA loop

jimweller · 1 year ago

Similar experience. We're using bedrock, us.anthropic.claude-sonnet-4-20250514-v1:0. Especially with sub commands like with az, the azure cli.

Bash - works
Bash(*) - does not work
Bash(az*) - does not work
Bash(az *) - does not work
Bash(az *:*) - does not work

I would also like to see the documentation updated to be more specific about the regex structure, particularly since I can't look at source code.

willie · 1 year ago

I've got the same problem and it seems to ask now for every tool even those listed in the .claude/settings.local.json file.

rboyce-ant contributor · 1 year ago

@jimweller Permission rules only support prefix matches, not wildcards. In your case, you'd want Bash(az:*) Documentation is here: https://docs.anthropic.com/en/docs/claude-code/iam#tool-specific-permission-rules

bradleyjames · 1 year ago

@rboyce-ant , what is the significance of the colon in Bash(az:*)? If this is a shell glob I assume a prefix match would be Bash(az*), so what is the colon for?

renep86 · 10 months ago
th

Any workaround to overcome this limitation? We also run on Bedrock.

jkebinger · 9 months ago

Similar problem here (but regular claude code): i have "Bash(mvn:*)" in my settings.local.json file -- seems like "short" mvn commands are fine but longer ones as seen below are prompted again and again and again which is really productivity-reducing

 Bash(mvn -pl Core -am test-compile -q)
  ⎿  (No content)

⏺ Great! The test compilation worked. Now let me run the specific tests I created to verify they work:

⏺ Bash(mvn -pl Core -am -Dtest=ProjectEnvStreamObserverReactorImplTest#testEventIdIncludedWhenConfigured -Dsurefire.failIfNoSpecifiedTests=false test)
  ⎿  Running…

╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Bash command                                                                                                                                                                                                                                          │
│                                                                                                                                                                                                                                                       │
│   mvn -pl Core -am -Dtest=ProjectEnvStreamObserverReactorImplTest#testEventIdIncludedWhenConfigured -Dsurefire.failIfNoSpecifiedTests=false test                                                                                                      │
│   Run the test to verify event ID is included when configured                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                       │
│ Do you want to proceed?                                                                                                                                                                                                                               │
│ ❯ 1. Yes                                                                                                                                                                                                                                              │
│   2. No, and tell Claude what to do differently (esc)    
github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] · 6 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 6 months 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.