{"version":"2.1.318","anchor":"config-lock-only-saves-and-lock-wait-env-var","canonical_anchor":"config-lock-only-saves-and-lock-wait-env-var","heading":"Protection against losing ~\/.claude.json now applies to everyone","tier":"notice","area":"Configuration","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/config-lock-only-saves-and-lock-wait-env-var","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Protection against losing `~\/.claude.json` now applies to everyone\n\nClaude Code now always guards your config file when it reads as missing, and `CLAUDE_CODE_CONFIG_LOCK_WAIT_MS` sets how long some saves wait for the lock\n\n**What**\n\nClaude Code keeps your settings and login details in a config file, `~\/.claude.json`. Its safeguards for when that file briefly reads as missing no longer need `CLAUDE_CODE_ENABLE_CONFIG_MISSING_READ_GUARD`. That variable is gone and setting it does nothing. The safeguards now always run:\n\n- at startup, if the file reads as missing, Claude Code looks again before carrying on\n\n- an existing user ID, machine ID and session key are kept when they are valid, and replaced only when they are not\n\n- some saves can wait for the file's lock (a marker that stops two processes writing at once), for up to `CLAUDE_CODE_CONFIG_LOCK_WAIT_MS`\n\n- if such a save cannot read the file while holding the lock, it writes nothing\n\n- when a save is dropped, Claude Code says the change applies to this session only and tells you to make it again later\n\nLogging out also changed. The stored API key is always cleared. When you sign in again, Claude Code checks that the stored account still matches the one you signed in with, and removes the stored login if it does not.\n\n**Why**\n\nThis makes it much harder for your config file to be wiped or overwritten when it only looked missing for a moment. If you see the message about making a change again later, that change was not saved for future sessions.\n\n- Area: Configuration\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}