claude-code - 💡(How to fix) Fix Bash permission rules in project settings.local.json don't match commands [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48542Fetched 2026-04-16 06:57:16
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1
RAW_BUFFERClick to expand / collapse

Bug

Bash(unity-cli:*) in .claude/settings.local.json (project-level) does not match unity-cli commands — the CLI still prompts for permission every time.

The exact same rule placed in ~/.claude/settings.json (global user settings) works correctly and allows unity-cli commands without prompting.

Repro

  1. Add "Bash(unity-cli:*)" to .claude/settings.local.json permissions allow list
  2. Restart Claude Code CLI
  3. Run any unity-cli command (e.g. unity-cli --version)
  4. Result: CLI prompts for permission
  5. Move the same rule to ~/.claude/settings.json
  6. Restart CLI
  7. Run the same command
  8. Result: Command runs without prompting

Also tried Bash(unity-cli *) and Bash(unity-cli:**) in the project file — none worked.

Environment

  • Claude Code CLI v2.1.109
  • macOS (Darwin 25.2.0, arm64)
  • unity-cli is a Mach-O 64-bit executable at ~/.local/bin/unity-cli

Expected

Permission rules in .claude/settings.local.json should behave identically to those in ~/.claude/settings.json.

🤖 Generated with Claude Code

extent analysis

TL;DR

The issue can likely be resolved by adjusting the permission rule in .claude/settings.local.json to correctly match the unity-cli command.

Guidance

  • Verify that the unity-cli command is being executed from the correct location (~/.local/bin/unity-cli) when running from the project directory.
  • Check if there are any other permission rules in .claude/settings.local.json that might be overriding the Bash(unity-cli:*) rule.
  • Try using the full path to the unity-cli executable in the permission rule, e.g., Bash(/Users/username/.local/bin/unity-cli:*).
  • Investigate if there are any differences in how the unity-cli command is being invoked when run from the project directory versus the global user settings.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue seems to be related to how the permission rules are being applied in the project-level settings versus the global user settings. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Adjust the permission rule in .claude/settings.local.json to use the full path to the unity-cli executable, as this may help resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING