Follow Discord
Sweep 03 Nov 2026 · 22:27Z Build v2.1.318 536 read Stable v2.1.311 Latest v2.1.318 Next v2.1.318 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.317 ·

Config saves stop overwriting an existing file, and logout says when it could not save

Claude Code no longer overwrites a config file it failed to read, and logout now fails visibly when it cannot save the config file

Group of 2 You'll notice Bug Fixes
JSON All of v2.1.317
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
InternalsArea: what it touches
Bug FixesKind: in v2.1.317,
Bug FixesSection of the release

Unclear It is not settled whether the protection for the main config file needs CLAUDE_CODE_ENABLE_CONFIG_MISSING_READ_GUARD set, or applies without it.

What

Claude Code keeps your settings, and some sign-in details, in a config file. Two changes make saving that file safer. Both are linked to a new environment variable (a named setting you can set before starting a program), CLAUDE_CODE_ENABLE_CONFIG_MISSING_READ_GUARD, which did not exist before.

  • When saving the global config file through its fallback path, Claude Code can now create the file only if it does not exist yet (createOnly). If a file has appeared there in the meantime, the write is refused and the save is retried on top of the existing file, up to a limit. Before, this fallback always overwrote the file, so a moment when the file could not be read could wipe a real config.
  • The project config helpers return early when the file is missing and the environment variable is set.
  • A change that only touches a cached key no longer counts as significant enough to save.
  • Logout now reports a failure when it cannot save the config file. /logout shows an error saying your account or API key may still be in the config file and to run claude auth logout again. claude auth logout prints 'Logout failed: …'. Before, logout always reported success.
  • Logout also prunes or deletes additional stores where credentials are kept, and with the environment variable set it also clears primaryApiKey.

Why

A config file that is briefly unreadable should no longer be replaced with an empty one, which could lose your sign-in and settings. And if logout cannot finish, you are told so, instead of believing you are signed out while your key is still on disk.

How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not settled whether the protection for the main config file needs `CLAUDE_CODE_ENABLE_CONFIG_MISSING_READ_GUARD` set, or applies…

See this entry in the whole of v2.1.317 →

Feedback