[Bug] Redundant permission entries added despite matching wildcard pattern
Bug Description
Redundant permission entries added despite matching wildcard.
Repro:
- Have "PowerShell(**)" in permissions.allow (global settings.json).
- Run a PowerShell command — no prompt appears (expected, wildcard covers it).
- 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗