[BUG] "/doctor incorrectly flags settings.json as invalid JSON when JetBrains plugin writes JSON5 format"

Resolved 💬 2 comments Opened May 24, 2026 by morrison12 Closed Jun 25, 2026

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?

When using 2.1.142 (Claude Code), it repeatedly complains "TBD".
When I asked Claude Code to investigate, it concluded the problem was with itself (see /1/ below) and recommended I file a defect report so I am.

/1/
⏺ Found it — the Claude Code JetBrains plugin (claude-code-jetbrains-plugin) is installed and is the one rewriting settings.json. It writes the file in JSON5 format (trailing commas
allowed), which is what Claude Code CLI accepts natively — but /doctor is running a strict JSON validator against it.

This means the trailing commas are intentional — Claude Code's own settings format supports JSON5. The bug is essentially that /doctor is too strict when validating Claude Code's own
settings file.

The options are:

  1. Nothing to fix on your end — the plugin and CLI are working correctly; /doctor's JSON validator is the one being overzealous. You can safely ignore that warning.
  2. File a bug with Anthropic — /doctor should use a JSON5-aware validator for settings.json, or at minimum not flag its own tooling's output as invalid.

I'll update the memory note to reflect the real cause.

Recalled 1 memory, wrote 1 memory (ctrl+o to expand)

⏺ The culprit is the Claude Code JetBrains plugin installed in PyCharm — it writes settings.json in JSON5 format (trailing commas included), which is what the Claude Code CLI itself
expects. The /doctor warning is a false positive from a strict JSON validator that doesn't know the file is meant to be JSON5.

There's nothing to fix on your side — you can safely ignore that /doctor warning. Worth filing a bug with Anthropic so /doctor uses a JSON5-aware check for its own settings file.

✻ Worked for 30m 20s

❯ how do a I file a bug with Anthropic ?

⏺ Go to https://github.com/anthropics/claude-code/issues and open a new issue. That's the official Claude Code bug tracker.

For this specific bug, a useful title would be something like: "/doctor incorrectly flags settings.json as invalid JSON when JetBrains plugin writes JSON5 format"

What Should Happen?

Claude Code should not complain about a valid settings.json file even if it is in JSON5 format

Error Messages/Logs

❯ Help me fix the issues reported by /doctor below.

  For each issue: briefly explain what the fix will do, then ask me to confirm before running any shell command that deletes files, modifies global config, or changes my installation.
  Safe read-only checks are fine without asking. If a suggested fix looks wrong for my setup, say so instead of running it.

  - Settings (/Users/james/Projects/o-track/.claude/settings.json): Invalid or malformed JSON

Steps to Reproduce

  1. Have a non-empty settings.json
  2. Have integration with PyCharm active
  3. Try to start Claude which results in the error

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

don't know

Claude Code Version

2.1.142 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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