{"version":"2.1.271","anchor":"sse-transport-gains-a-negotiated-keepalive-interval","canonical_anchor":"sse-transport-gains-a-negotiated-keepalive-interval","heading":"SSE transport negotiates a keepalive interval for hosted\/remote sessions","tier":"internal","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/sse-transport-gains-a-negotiated-keepalive-interval","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### SSE transport negotiates a keepalive interval for hosted\/remote sessions\n\nThe realtime SSE connection now negotiates its keepalive interval with the server instead of using a fixed value\n\n**What**\n\n- The SSE (server-sent events) transport used for the always-on realtime connection now advertises a maximum keepalive interval to the server via a query parameter, reads back the interval the server actually echoes, and derives its liveness timeout from that echoed value (falling back to a default if none is echoed). New diagnostic fields (`keepalive_tolerance_s`, `keepalive_interval_s`, `liveness_timeout_s`, `keepalive_interval_echoed`) are logged on connect and on liveness timeout.\n\n- The `sseKeepaliveMaxIntervalSeconds` option is now threaded into the RemoteIO\/SDK worker's transport setup, alongside other hosted-mode plumbing (like passing `initExternalMetadata`\/`initialWorkerStatus` into the client, and routing diagnostics through a callback instead of straight to stderr in hosted mode).\n\n**Why** Negotiating the keepalive interval instead of hardcoding it makes the realtime connection more resilient to different server configurations, and the added diagnostics make it easier to debug connection liveness issues.\n\n- Flag `tengu_ccr_sse_keepalive_max_interval_s`: Not enough to say (read for one account on one subscription tier against v2.1.271; this account: no value returned, anonymous baseline: no value returned, compiled default: not a boolean we can read) 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: Internals\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5"}