Transport-Independent Sessions
A transport-independent session is one whose lifecycle is decoupled from the wire protocol that carries it. The execution-state object persists across SSH, WebSocket, HTTP, and local CLI sockets without being owned by any of them. When a client disconnects or hands off to a different transport, the execution graph is preserved intact — no reset, no corruption, no loss of process tree or memory. The transport is a removable carrier; the session is the durable thing.
What “transport-independent” actually means
Most interactive systems bind state to the connection: close the SSH channel or the WebSocket and the shell, its variables, and its job-control state vanish. cmdop inverts this. The session is addressed independently of its current carrier, exactly as tmux / tmate session multiplexing lets a terminal session outlive the SSH connection that attached to it. The POSIX pseudo-terminal (pty) continues to back the process tree regardless of which client is reading from it, and a returning client re-binds to the same live session after a transport drop.
How does protocol handoff preserve the graph?
Handoff is a re-binding of carrier, not a re-creation of state. The detaching transport drops; the execution-state object remains live and addressable; an attaching transport — possibly of a different kind — re-binds to the same session. Because the session is addressed by its own identity rather than by the socket, the inbound transport resumes against the existing execution graph rather than starting cold. A CLI session can hand off to a browser GUI, or a WebSocket to an HTTP polling client, with full continuity. See the execution-state object for what survives, and sessions for the user-facing model.
Disconnect semantics
Disconnect is not destruction. When the last transport drops, the session enters a detached-but-live state; its process tree keeps running and its memory plane is retained. Re-attachment over any supported protocol restores the full context. This is the inclusion criterion that separates cmdop from socket-bound runtimes — state that survives protocol handoff rather than state whose lifetime is the connection token.
Transport independence is what makes multi-actor concurrency possible: actors on different protocols can attach to one session precisely because no single protocol owns it.
Background reading: Steered, Not Replayed — why the live execution graph is steered across handoff, not reconstructed by replay.