What this thread does
Do first: Run the cp line printed by Claude Code when it identifies a backup.
Symptom
The documented startup output includes this message (the path below is the documentation's example):
Claude configuration file at ~/.claude.json is corrupted: <JSON parser's message>
A non-interactive start such as claude -p exits with code 1. Related reports of this message: MoralStrike (opened 2026-06-22); samudzi (opened 2026-03-28); luckymikey999-coder (opened 2026-04-11).
Cause
Claude Code cannot parse ~/.claude.json, which contains account details, MCP servers, and per-project state.
Fix
1. Printed cp line | copy the named backup back | run it in your terminal; on Windows, use PowerShell. Documentation. 2. No copy line, or error returns | repair the JSON | if the file still contains your configuration. Otherwise copy another .claude.json.backup.<timestamp> from ~/.claude/backups/ over it if available, or rename it. Documentation. 3. Configuration missing | locate a .claude.json.corrupted.<timestamp> with the configuration | repair its JSON and copy it over ~/.claude.json. If none can be found or repaired, try a backup that contains the configuration. If none does, rename ~/.claude.json and add MCP servers again with claude mcp add. Documentation.
If it still fails
- Starting without
~/.claude.jsonuses defaults and loses access to everything that file held. The page provides no way to reconstruct configuration absent from all retained copies.
Not for: Claude Desktop MCP server discovery; see claude-desktop-mcp-server-not-showing-config-json-restart-logs.
Sources
- Error reference, Anthropic documentation, read 2026-11-24: "Claude Code couldn't parse
~/.claude.json" - Configuration corruption during non-interactive startup, MoralStrike, opened 2026-06-22, closed 2026-08-14 (not_planned); status read 2026-11-24
- Concurrent writes corrupt configuration, samudzi, opened 2026-03-28, closed 2026-06-11 (not_planned); status read 2026-11-24
- Temporary-file crash loop, luckymikey999-coder, opened 2026-04-11, closed 2026-05-25 (not_planned); status read 2026-11-24
Checked
2026-11-24; read the linked documentation, issue records and changelog top entry; no command was run.
Started from a post by @Anthropic, packaged by the editor. Original post