{"version":"2.1.222","anchor":"remote-bridge-self-heals-when-heartbeats-fail-but-sse-is-ali","canonical_anchor":"remote-bridge-self-heals-when-heartbeats-fail-but-sse-is-ali","heading":"Remote bridge self-heals when heartbeats fail but SSE is alive","tier":"notice","area":"Remote Bridge","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.222\/e\/remote-bridge-self-heals-when-heartbeats-fail-but-sse-is-ali","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.222","markdown":"### Remote bridge self-heals when heartbeats fail but SSE is alive\n\nThe remote bridge tears down half-dead sessions so the connection rebuilds instead of hanging.\n\n**What**\n\nThe v2 remote bridge can now detect the case where heartbeats keep failing while the SSE read stream is still delivering data, and tears the session down so the transport is rebuilt instead of sitting in a half-dead state.\n\n**Details**\n\n- Session state tracks `consecutiveHeartbeatFailures` and `heartbeatStreakStartedAtMs`, plus a new `onHeartbeatLost` callback.\n- Liveness is judged by a new `isReadStreamRecentlyAlive()` helper backed by `lastLivenessEvidenceAtMs`.\n- On trigger the session closes with code 4093 and logs \"[bridge:repl] CCR v2: heartbeats failing while SSE healthy \u2014 closing for transport rebuild\".\n- Wired through a `selfHealHeartbeats` option read from the `tengu_bridge_selfheal_heartbeats` gate, whose fallback is true; the real value comes from remote config.\n\n**Evidence**\n\n`tengu_bridge_selfheal_heartbeats`\n\n- Flag `tengu_bridge_selfheal_heartbeats`: On for this account, and not off by default (read for one account on one subscription tier against v2.1.222; this account: on, anonymous baseline: on, compiled default: on) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Remote Bridge\n- Names: `tengu_bridge_selfheal_heartbeats`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 0\/5"}