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.221 Home All releases olderv2.1.220 v2.1.222newer

Web sessions can adopt refreshed credentials from the heartbeat

Under the hood
Useful2 Signal0
Auth not in their notes

Web sessions can swap in a refreshed credential mid-run instead of waiting for the old one to expire.

CLAUDE_CODE_ENVIRONMENT_KIND
What

The Claude-Code-on-the-web worker client can pick up a new credential mid-session when the server sends one on a heartbeat, rather than waiting for the existing credential to lapse.

Details
  • New adoptRefreshedAuth: if a heartbeat response carries refreshed_auth with expires_in_seconds, the worker adopts the credential in place.
  • Diagnostics cli_heartbeat_refreshed_auth_signal, cli_heartbeat_refreshed_auth_late_adopted and cli_heartbeat_refreshed_auth_adopt_threw.
  • Repeated failure reasons are deduped via lastAuthRefreshBadReason.
  • Only wired in when CLAUDE_CODE_ENVIRONMENT_KIND is unset; otherwise the handler is not passed at all.
Evidence

cli_heartbeat_refreshed_auth_signal

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

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.221 →