You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
SDKArea: what it touches
Bug FixesKind: in v2.1.312,
Bug FixesSection of the release
What
The SDK is the kit for building programs on top of Claude Code. A program built with it can supply a getOAuthToken callback that hands Claude Code a sign-in token. When a request fails because the sign-in was rejected, Claude Code asks this callback for a token.
Claude Code now compares the returned token with the one already in use. That can be CLAUDE_CODE_OAUTH_TOKEN, the stored token, or the token that failed. It sets CLAUDE_CODE_OAUTH_TOKEN and clears its saved credentials only when the new token is different. Before, it always did both. The recovery is still reported either way.
Why
When the callback hands back the same token, Claude Code no longer resets its saved credentials for no reason.