Unclear Which feature uses these lease connections is not known.
What
A 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.
- The layer that streams a session to viewers gains an
onViewerSignhandler. Theawayandusersignals now mark a viewer as away or present. Before, the only reconnect handling resynced the session after a reconnect. - Reconnecting ends the away state.
- Closing a remote session now calls
endViewerAway("close"). - 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.
Why
Remote 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.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
Which feature uses these lease connections is not known.