Claude Code Permission Pattern Error Fix
Claude Code — Permission Pattern Error Fix
Section titled “Claude Code — Permission Pattern Error Fix”Date: 2026-02-12 Filed as: GitHub Issue #25289
The Error
Section titled “The Error”After a Claude Code update, launching it fails with:
The :* pattern must be at the end. Move :* to the end for prefixmatching, or use * for wildcard matching. Examples: Bash(npm run:*) - prefixmatching (legacy), Bash(npm run *) - wildcard matching
Files with errors are skipped entirely, not just the invalid settings.Why It Happens
Section titled “Why It Happens”Claude Code auto-saves permission approvals to ~/.claude/settings.local.json. Over time, this file accumulates entries like:
WebFetch(domain:prnt.sc)— older domain-filtering syntax- Bash commands containing URLs with
https:in them
A recent update made the pattern parser stricter: any : in a permission pattern must now be :* at the very end (for prefix matching). Patterns with : elsewhere (like domain:xxx or https://) are now invalid. One invalid entry causes the entire file to be skipped.
How to Fix
Section titled “How to Fix”- Open
~/.claude/settings.local.jsonin a text editor - Remove any entries that contain
:but do not end with:*- All
WebFetch(domain:xxx)entries - Any
Bash(...)entries containing URLs or other colons
- All
- Keep entries like
Bash(git push:*)where:*is at the end — these are valid - Save and relaunch Claude Code
Quick check
Section titled “Quick check”Valid patterns look like:
Bash(curl:*)— ends with:*Bash(git push)— no:at allWebSearch— no arguments
Invalid patterns look like:
WebFetch(domain:example.com)—:not followed by*Bash(curl https://example.com)—:from URL