claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] an invalid settings.local.json leads to silent, bad, undefined behavior

Open jasonswearingen opened this issue 3 months ago • 7 comments

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

jasonswearingen avatar Sep 21 '25 21:09 jasonswearingen

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:

Image

bogini avatar Sep 24 '25 22:09 bogini

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 avatar Sep 25 '25 03:09 jasonswearingen

@jasonswearingen To allow all Bash tool uses, add Bash to the permissions.allow array, not Bash(*).

bogini avatar Sep 29 '25 18:09 bogini

thanks for the tip! (Though just to be clear, I think this issue still stands on it's own merits)

jasonswearingen avatar Sep 29 '25 18:09 jasonswearingen

See #2719

nsheff avatar Oct 25 '25 14:10 nsheff

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.

github-actions[bot] avatar Dec 08 '25 10:12 github-actions[bot]

still issue, but obviously it will never be resolved.

jasonswearingen avatar Dec 08 '25 16:12 jasonswearingen