{"version":"2.1.290","anchor":"remote-session-closes-announce-viewer-away-and-lease-exit","canonical_anchor":"remote-session-closes-announce-viewer-away-and-lease-exit","heading":"Remote sessions track whether a viewer is away","tier":"notice","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.290\/e\/remote-session-closes-announce-viewer-away-and-lease-exit","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.290","markdown":"### Remote sessions track whether a viewer is away\n\nRemote session streams now track whether a viewer is away, and closing a session ends the away state and tells connected clients it is exiting\n\n**Unclear.** Which feature uses these lease connections is not known.\n\n**What**\n\nA remote session is a Claude Code session you watch or control from another place, such as another device or window. These are called viewers or clients. Claude Code now keeps track of whether a viewer is present.\n\n- The layer that streams a session to viewers gains an `onViewerSign` handler. The `away` and `user` signals now mark a viewer as away or present. Before, the only reconnect handling resynced the session after a reconnect.\n\n- Reconnecting ends the away state.\n\n- Closing a remote session now calls `endViewerAway(\"close\")`.\n\n- When a session closes, a new step writes a closing notice (`{op:\"lease\", closing}`) to every client connected through a lease, which is the link that holds a client to the session.\n\n**Why**\n\nRemote sessions can now tell when nobody is watching. Clients still attached when a session shuts down are told it is closing instead of simply losing the connection.\n\n- Area: Sessions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}