Omniscio

OmniscioGuidesCould not read config

Could not read Claude Code config: recovering .claude.json

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

What is the exact message?

Could not read Claude Code config — run claude with no arguments to recover it.

The message names the fix in the same line, and the exit code is 1.

What does it mean?

You ran claude import while Claude Code could not parse ~/.claude.json, the file where it stores your account details and per-project state. The subcommand reads that file to check availability, but it does not show the recovery dialog an interactive session shows, so it stops with code 1.

This is not the same file as settings.json. ~/.claude.json is account and project state; your settings, hooks and environment variables live in the settings files, which is a different guide.

Before Claude Code v2.1.222, claude import with an unreadable config file started an interactive session, and that session's recovery dialog handled the file. On a current build the subcommand refuses instead.

Why it appeared

  • The file is not valid JSON. A hand edit or an interrupted write can leave any JSON file unparseable, and Claude Code refuses this one when it is.
  • You used a subcommand rather than a session. An interactive claude start offers the recovery dialog; claude import does not, which is why this message shows up around an import.
  • An older build would have hidden it. Before v2.1.222 the import fell back to an interactive session, so the same broken file produced a dialog rather than this line.

How do I fix it?

  1. Copy ~/.claude.json somewhere safe first. The reset below replaces a file Claude Code cannot use, and a copy costs nothing.
  2. Run claude with no arguments. Claude Code detects the invalid file and offers to reset it. Accepting the reset replaces that file, so the account details and per-project state it held go with it; then exit.
  3. Run claude import again. With a readable config file the import proceeds instead of exiting at the first check.
  4. To keep manual edits, repair the JSON instead. Open ~/.claude.json in an editor, fix the syntax, save, and rerun claude import.

How do I know it is fixed?

  • claude starts normally and does not offer the recovery dialog again.
  • claude import runs past the config check instead of exiting with code 1.
  • /status names the account the session is using.

Where these answers come from

  • The message, what ~/.claude.json holds, why the subcommand exits with code 1, the earlier interactive fallback, and both recovery roads: Anthropic's error reference, read November 18, 2026.
  • The claude import command itself: Anthropic's CLI reference, read November 18, 2026.

Common questions

Why did claude import fail when claude itself starts?

An interactive session shows a recovery dialog when it cannot parse ~/.claude.json. The claude import subcommand reads the same file to check availability but does not show that dialog, so it exits with code 1 instead.

Which file is broken?

~/.claude.json, the file where Claude Code stores your account details and per-project state. It is not your settings.json file.

Will recovering the file lose my projects?

The file holds your account details and per-project state, and the reset replaces it, so treat that state as gone and take a copy first if you want to recover anything from it. The other road — repairing the JSON by hand — keeps what you can read.

What does it do in older versions?

Before Claude Code v2.1.222, claude import with an unreadable config file started an interactive session, and that session's recovery dialog handled the file.