Claude Code Settings Bloat Bug - Twitter/Issue Report:
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code Settings Bloat Bug - Twitter/Issue Report:
Problem: Claude Code's settings.local.json accumulates invalid permission patterns that eventually break the CLI. What happens:
Every approved command gets added to permissions.allow[]
PowerShell commands with wildcards like 'ssh' get saved verbatim
Claude Code's parser requires : suffix for patterns (e.g., Bash(git:))
But it saves patterns with * in the middle → invalid → CLI won't start
Example invalid entries it creates:
"Bash(powershell.exe -Command \"Get-Service -Name ''ssh''...\")"
"Bash(Get-ChildItem $HOME\\.ssh\\id_ed25519_unified*...\")"
Error: "The : pattern must be at the end" Impact: After ~100-200 commands, settings.local.json corrupts and CLI refuses to launch. Workaround: Manually reset file to broad patterns like Bash(git:) Expected: CLI should either:
Not save commands with wildcards in the middle, OR
Escape/sanitize patterns before saving, OR
Ignore invalid patterns instead of blocking startup
What Should Happen?
asfasfdsafaadsfdsaffasdfdsafasdfsdafasdfs
Error Messages/Logs
asfasfdsafaadsfdsaffasdfdsafasdfsdafasdfs
Steps to Reproduce
asfasfdsafaadsfdsaffasdfdsafasdfsdafasdfs
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.0.63
Claude Code Version
v2.0.72
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
asfsadfsafasf
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗