Omniscio

OmniscioGuidesConfiguration error in .claude.json

Claude Code: Configuration error in ~/.claude.json

Last checked against Anthropic's documentation on November 23, 2026. By the Omniscio team. Updated .

What is the exact message?

When Claude Code finds a backup, it prints the whole block: the file it could not parse, where the corrupted copy went, which backup it can use, and the command that restores it.

Claude configuration file at /home/user/.claude.json is corrupted: <JSON parser's message>
The corrupted file has been backed up to: /home/user/.claude/backups/.claude.json.corrupted.1793664000000
A backup file exists at: /home/user/.claude/backups/.claude.json.backup.1793660400000
You can manually restore it by running: cp -f "/home/user/.claude/backups/.claude.json.backup.1793660400000" "/home/user/.claude.json"

The line most people search for is this shorter one:

Configuration error in /home/user/.claude.json: <JSON parser's message>

The paths, the user name and the millisecond numbers in your output will differ. The wording is what to match on: Configuration error in followed by the path, then the JSON parser's own explanation of what it could not read.

What does it mean?

The file is ~/.claude.json, in your home directory. Anthropic describes it as the file that holds your account details, MCP servers, and per-project state.

Claude Code reads it as JSON at startup. This message means the file is not valid JSON any more, and the text after the colon is the parser's message saying what it found. It is the startup line for a file that will not parse: claude import stopping on the same file is a different message, covered on Could not read config.

A non-interactive start, such as claude -p, exits with code 1 instead of running.

Three parts of the block matter, and they may not all appear:

  • is corrupted says the file could not be read, and the raw file was kept as a .claude.json.corrupted.<timestamp> copy.
  • A backup file exists at names an earlier saved copy, .claude.json.backup.<timestamp>.
  • The cp -f line restores that backup over ~/.claude.json.

The backups are copies Claude Code took of earlier versions of the file, when it rewrote it. It keeps the five newest, plus a copy of any version it could not parse. They are removed once they are older than the cleanup period, which is 30 days by default, so recover from one rather than waiting.

How do I fix it?

  1. If the output has a cp line, run that line in your terminal. It copies the named backup over ~/.claude.json, and the next start reads a valid file. On Windows, run it in PowerShell, where cp is Copy-Item and its -f switch is spelled -Force; use the paths from your own line.
  2. If there is no cp line, or the error returns after you run it, open ~/.claude.json and check whether your servers and account details are still in it. If they are, fix the JSON the parser complained about. If you cannot, copy another .claude.json.backup.<timestamp> file from ~/.claude/backups/ over it, or rename it and go to the last step.
  3. If ~/.claude.json no longer holds your configuration, find a .claude.json.corrupted.<timestamp> file that still does, in ~/.claude/backups/ or your home directory. Fix its JSON, then copy it over ~/.claude.json. If you cannot find or fix one, try the same steps with a .claude.json.backup.<timestamp> file that has your configuration.
  4. If none does, rename ~/.claude.json and add your MCP servers again with claude mcp add. Anthropic is explicit about the cost: with no file at that path, Claude Code starts with default settings and none of what the file held. Take this step last.

Renaming keeps the broken file in place, so a later attempt can still start from it, which is why deleting it is not on the list.

How do I know it is fixed?

  • Claude Code starts without the Configuration error in block.
  • A non-interactive run such as claude -p no longer exits with code 1 at startup.
  • If you restored a backup, the MCP servers you had are listed in the session again, because they are stored in that file.

Where these answers come from

Common questions

What does Configuration error in ~/.claude.json mean?

Claude Code could not parse ~/.claude.json, the file that holds your account details, MCP servers, and per-project state. A non-interactive start such as claude -p exits with code 1 instead of running.

Where are the .claude.json backups?

In ~/.claude/backups/, and the output names the exact file: a .claude.json.corrupted.<timestamp> copy of the file it could not read, and .claude.json.backup.<timestamp> files it saved earlier. The output prints a cp command that copies one back for you.

Can I just delete ~/.claude.json?

No, rename it instead, so the broken file stays recoverable. Deleting is Anthropic's last resort only in the sense that renaming it and adding your MCP servers again with claude mcp add is the final step; with no file at that path, Claude Code starts with default settings and none of what the file held.

Is this the same as the empty configuration file message?

No. A blank file with no usable backup has its own message, Claude configuration file at /home/user/.claude.json was empty and no backup holds anything: starting with defaults. Before v2.1.318, Claude Code reported that case as this configuration error instead.