claude-code - 💡(How to fix) Fix [Bug] Redundant permission entries added despite matching wildcard pattern [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#52274Fetched 2026-04-24 06:11:30
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

Bug Description Redundant permission entries added despite matching wildcard.

Repro:

  1. Have "PowerShell(**)" in permissions.allow (global settings.json).
  2. Run a PowerShell command — no prompt appears (expected, wildcard covers it).
  3. At some point a permission prompt DID appear for a specific command like powershell -File scripts/build.ps1 build 2>&1 | Select-Object -Last 40, and accepting it added that exact string as a new entry in allow[], even though PowerShell(**) already authorizes it.

Result: settings.json accumulates redundant specific PowerShell(...) entries alongside PowerShell(**). Over time the allow list grows with dead rules.

Expected: when an allow rule already matches the command, the permission prompt should not appear at all; if it does appear, accepting should not persist a redundant entry.

Observed on: Claude Code on Windows 10, global ~/.claude/settings.json. Had 5 such redundant PowerShell(...) entries accumulated under PowerShell(**).

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.101
  • Feedback ID: 885a0ae6-ae03-4d16-90c3-8a8e3b9fc858

extent analysis

TL;DR

The issue can be mitigated by manually removing redundant permission entries from the settings.json file.

Guidance

  • Review the settings.json file and remove any redundant permission entries that are already covered by a wildcard rule, such as "PowerShell(**)".
  • Verify that the permission prompt does not appear for commands that are already authorized by a wildcard rule.
  • If a permission prompt does appear for a command that should be covered by a wildcard rule, check the command string for any special characters or formatting that may be causing the mismatch.
  • Consider reporting this issue as a bug to the Claude Code developers, as the expected behavior is for the permission prompt to not appear at all if an allow rule already matches the command.

Example

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

Notes

The cause of the issue is likely due to the way the permission system handles wildcard rules and specific command strings. The workaround provided is a manual solution and may not prevent the issue from occurring in the future.

Recommendation

Apply workaround: manually removing redundant permission entries from the settings.json file, as this is the most straightforward solution to mitigate 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