You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SDKArea: what it touches
ImprovementsKind: in v2.1.324,
ImprovementsSection of the release
Unclear It is not clear exactly what the new second argument passed to getOAuthToken contains.
What
When Claude Code runs inside another program through the SDK (the toolkit for building on Claude Code), that program can hand over sign-in tokens through a getOAuthToken callback. A token is the credential that proves you are signed in. Claude Code calls this callback to get a fresh one after a server refuses the current token with a 401 error.
What changed:
getOAuthToken is now called with a second argument describing the request.
Returning the same token is still accepted without error when the 401 was marked stale, or when an extra check passes.
Otherwise, returning the same token now ends the recovery attempt, and it reports failure.
Why
This matters if you build on the SDK and supply tokens through this callback. A callback that hands back the same token after a refusal may now cause recovery to fail rather than continue.