{"version":"2.1.318","anchor":"remote-sse-liveness-tracking-adds-monotonic-clock-and-sleep","canonical_anchor":"remote-sse-liveness-tracking-adds-monotonic-clock-and-sleep","heading":"Remote stream connection tracks machine sleep and clears its new timers on close","tier":"notice","area":"Remote Control","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/remote-sse-liveness-tracking-adds-monotonic-clock-and-sleep","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Remote stream connection tracks machine sleep and clears its new timers on close\n\nThe remote session stream adds a monotonic liveness clock, a sleep listener and a frame-wait timer, and clears them all when the connection closes\n\n**Unclear.** It is not settled whether time spent asleep is now actually excluded from the disconnect check.\n\n**What**\n\nRemote and hosted sessions keep a live stream open to Claude Code and check that it is still alive. That stream is called an SSE connection, a long-lived link that the server sends updates down. The part that handles this connection gains new pieces.\n\n- `lastLivenessEvidenceMonotonicMs` records the last sign of life on a monotonic clock, a timer that only moves forward and is not affected by changes to the system clock. Before, only a wall-clock time (`lastLivenessEvidenceAtMs`) was kept.\n\n- `stopListeningForSleep` belongs to a new listener for the computer going to sleep.\n\n- `frameWaitTimer` is a new timer.\n\n- Closing the connection now stops the sleep listener and clears `frameWaitTimer`, as well as the reconnect and liveness timers it already cleared.\n\n**Why**\n\nThese pieces suggest that time a laptop spends asleep may no longer be counted as the connection going silent. That could stop false disconnects after waking the machine. Clearing the new timers on close stops them firing, or triggering a stray reconnect, after the connection has ended.\n\n- Area: Remote Control\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}