[BUG] an invalid settings.local.json leads to silent, bad, undefined behavior
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?
I had an invalid settings.local.json. I found out running /status which said as such.
I was troubleshooting because my .mcp.json file was not being loaded.
Also previously I noticed that none of my allow/deny in settings.local.json was doing anything, since there are known bugs about that, I thought it was unrelated (and have always been running --dangerously-skip-permissions)
when I fixed my settings.local.json, now my allow/deny works again, and my .mcp.json is being loaded properly.
so it seems an invalid settings file just stops config from being loaded, so only defaults. The problem is that this is a silent error, and your configs just don't work.
What Should Happen?
I think you should be very explicit that there is an error with a config file, and/or just prevent claude-code from running in that situation
Error Messages/Logs
no error messages. just have to run `/status` and see the `settings.local.json` wasn't loaded.
Steps to Reproduce
I added Bash(*) to my Allow settings, which causes the settings file to be deemed invalid.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
1.0.120 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
No response
Hi @jasonswearingen can you provide reproduction steps? What exactly was invalid in your settings.json? I have tested in 1.0.123 and can confirm the invalid settings notice shows up:
Hi @bogini , I manually added Bash(*) to my Allow settings which causes the error.
It's highly likely I was getting that notice when I run claude code, but it's rather non-descript so my brain skipped it. Also claude mostly still works, just that no changes like accepting command whitelisting prompts will seem to work.
@jasonswearingen To allow all Bash tool uses, add Bash to the permissions.allow array, not Bash(*).
thanks for the tip! (Though just to be clear, I think this issue still stands on it's own merits)
See #2719
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
still issue, but obviously it will never be resolved.