Three values, not four. The server-side AIAgentSession.CloseReason
column has four (Explicit | Janitor | Shutdown | Error), but only two are
distinguishable client-side (explicit = user called EndRealtimeSession;
error = teardown ran from a catch block). 'unknown' covers any other
client-observable end path. Janitor/shutdown happen out-of-process and never
reach the runtime — see the module-level scope cut.
Why a session ended.
Three values, not four. The server-side
AIAgentSession.CloseReasoncolumn has four (Explicit | Janitor | Shutdown | Error), but only two are distinguishable client-side (explicit= user calledEndRealtimeSession;error= teardown ran from a catch block).'unknown'covers any other client-observable end path. Janitor/shutdown happen out-of-process and never reach the runtime — see the module-level scope cut.