Sessions and lifetime
The session ID connects commands, files, and terminal access to the same environment. A created session must become ready before it can accept work.
A lifetime policy limits how long the session remains available. A heartbeat updates activity for idle-timeout handling; it does not replace that policy. Copy out artifacts you need before the session is deleted or expires.
Commands and terminals
A command can run synchronously, stream output, or continue in the background. Background commands have IDs for reading status and output or requesting cancellation. A WebSocket terminal provides interactive access to the same environment. Command streams use newline-delimited JSON (application/x-ndjson). They are separate from the SSE run-event streams in the Execution API.