You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
AuthArea: what it touches
Bug FixesKind: in v2.1.281,
Bug FixesSection of the release
What
When you log in, Claude Code saves your login details in your system's secure storage. On macOS that is the keychain. If Claude Code cannot read that storage and so skips saving, and CLAUDE_CODE_OAUTH_TOKEN is not set as a fallback, login now stops with an error. On a Mac the message reads: "Couldn't save your login. If your Mac's keychain is locked, unlock it and log in again."
Why
You now find out straight away that your login was not saved and how to fix it, instead of seeming to log in without it being kept.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up CLAUDE_CODE_OAUTH_TOKEN, on Authentication.export CLAUDE_CODE_OAUTH_TOKEN=your-tokenauthenticationsee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up CLAUDE_CODE_OAUTH_TOKEN, on Authentication.