Skip to content
Developer Preview

session/closed

A loaded session was unloaded (idle | hostShutdown | leave) with the final view cursor; broadcast to every initialized connection.

Type: SessionClosedParams

session/closed params: a loaded session was unloaded from this host, broadcast to every initialized connection. After it, the session is notLoaded; the log remains on disk and session/resume reloads it. A crash emits nothing — only the orderly unload paths do (idle unload, host shutdown and a released session/leave), and each writes the durable SessionEnd record first.

Field Type Stability Presence Description
reason SessionClosedReason required Which orderly unload path fired.
sessionId string required The unloaded session.
viewCursor string | null required The final view head; a client that stores it can later session/resume {cursor} and receive exactly the (empty) suffix. An opaque view cursor: clients relay it, never parse it. Required-nullable: the producers always write the member and write null when the final fold failed at unload — the host defines no cursor values of its own and never invents one, and the subscriber still learns the session closed.
Source

schema/msp/experimental/msp.schema.json#/notifications/session~2Fclosed

{
"description": "A loaded session was unloaded (idle | hostShutdown | leave) with the final view cursor; broadcast to every initialized connection.",
"params": {
"$ref": "#/$defs/SessionClosedParams"
}
}