Claude Code v2.1.222 ·
Heartbeat-failure streak detection in the CCR client
Dropped connections are detected by counting repeated heartbeat failures instead of reacting to one.
Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
0Signal: worth watching, 1 to 5
ElsewhereArea: what it touches
Internal ChangesKind: in v2.1.222,
Internal ChangesSection of the release
What
Failed heartbeat POSTs are no longer fire-and-forget; the client tracks a failure streak and reports it upward once it is long enough to matter.
Details
- a set of statuses is ignored outright
- checks
isReadStreamRecentlyAlive() before counting, then increments consecutiveHeartbeatFailures - fires
onHeartbeatLost only once the streak passes both a count and a duration threshold - a successful heartbeat calls
resetHeartbeatStreak() - the onHeartbeatLost handler is only installed when selfHealHeartbeats is on
Evidence
this.onHeartbeatLost?.()
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.222 →