[Bug] Redundant permission entries added despite matching wildcard pattern

Resolved 💬 3 comments Opened Apr 23, 2026 by esppat Closed Apr 26, 2026

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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗