Claude Code
Claude Code Replaced Broken Configs With a 258-Byte Default
Claude Code 2.1.317, started headless (claude -p, or a subcommand such as claude mcp list), copies an unparseable ~/.claude.json to backups/, writes a 258-byte six-key default in its place and exits 1; the next start runs on the default with no MCP servers and no trusted folders and says nothing. Hands-on in a throwaway CLAUDE_CONFIG_DIR: a /* comment */, a file cut at 60%, an empty file, and an empty file with backups present all reset the same way; claude --version left the file alone; an interactive start under a pseudo-terminal showed the two-option dialog and left it alone; the restore hint named a planted empty newest backup; a backup of the broken file is written 7 ms after the .corrupted copy. On this Mac the file is 619 KB, 124 keys, 221 project entries (160 trusted), 8 user-scope MCP servers; five backups spanning ten hours. 12 parallel claude mcp add landed 12/12; four batches of 40 landed 159/160 with all 160 exiting 0 (srv35 printed Added and was missing). Timeline: 1.0.31 (20 June 2025) fixed the same reset; issues 69354 (18 June 2026, 2.1.142), 73590 (2 July, Windows, 45 .corrupted files) and 87551 (18 August, reproduced by claude[bot] on 2.1.234 within 32 minutes, labels data-loss + reproduced, closed stale by github-actions 20 September). 2.1.318 (npm 2026-11-03 21:55 UTC) cites #87551 and says the start now fails and leaves the file; six changelog lines about the file in total. 2.1.318 not run: auto-updater had not fetched it, the sandboxed session refused a direct download.
Marco Kotrotsos·7 Nov 2026·8 min read