Unclear It is not settled whether time spent asleep is now actually excluded from the disconnect check.
What
Remote 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.
lastLivenessEvidenceMonotonicMsrecords 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.stopListeningForSleepbelongs to a new listener for the computer going to sleep.frameWaitTimeris a new timer.- Closing the connection now stops the sleep listener and clears
frameWaitTimer, as well as the reconnect and liveness timers it already cleared.
Why
These 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.
It is not settled whether time spent asleep is now actually excluded from the disconnect check.