Web sessions can swap in a refreshed credential mid-run instead of waiting for the old one to expire.
What's wrong with this entry?
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.
- New
adoptRefreshedAuth: if a heartbeat response carriesrefreshed_authwithexpires_in_seconds, the worker adopts the credential in place. - Diagnostics
cli_heartbeat_refreshed_auth_signal,cli_heartbeat_refreshed_auth_late_adoptedandcli_heartbeat_refreshed_auth_adopt_threw. - Repeated failure reasons are deduped via
lastAuthRefreshBadReason. - Only wired in when
CLAUDE_CODE_ENVIRONMENT_KINDis unset; otherwise the handler is not passed at all.
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.
-
v2.1.248
MCP errors sent to Remote Control clients are filtered to a fixed list
Both mention environment kind
-
v2.1.248
get_settings is refused on remote connections
Both mention environment kind
-
v2.1.248
SDK stream transport can re-read auth headers, except in managed environments
Both mention environment kind