Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.236 Home All releases olderv2.1.235 v2.1.237newer
Claude Code v2.1.236

SDK hosts can decline an OAuth token refresh and say why

Under the hood
Useful2 Signal2
SDK

An SDK host can now refuse to refresh your login token and say why.

What

When Claude Code asks its SDK host to refresh an OAuth token, the host may now answer with no token plus an optional reason, and the client treats that as a clean decline rather than an assumed success.

Details
  • The refresh path returns null when the host declines or answers empty, and records the host's stated reason.
  • A new tengu_sdk_oauth_refresh_unfulfilled event distinguishes stream_closed, timeout, invalid_response, declined and null outcomes, with a duration.
  • The reason field is parsed leniently, so an unknown or malformed value becomes undefined and can never cost a token that was actually delivered.
  • SDK transport only.
Evidence

tengu_sdk_oauth_refresh_unfulfilled, Why the host returned no token (only meaningful when accessToken is null)

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.236 →