Architecture

Sessions & state

A Roder session is a thread of turns, messages, tool calls, policy events, and workspace state. Session behavior is defined in roder-api and implemented by installable session-store extensions.

Storage

The default distribution installs roder-ext-jsonl-session. It persists transcripts and snapshots in a JSONL-friendly shape so sessions can be resumed, inspected, and replayed without a database.

Snapshots

App-server clients can create, list, load, and inspect sessions through typed protocol responses such as SessionMetadata and ThreadSnapshot. Extension-owned state can also be persisted through the session-store contract.

Resume flow

  1. The client requests a session list or supplies a thread id.
  2. The app server asks the runtime store for the matching snapshot.
  3. The TUI or desktop client rehydrates transcript, mode, pending approvals, and visible state.
  4. New turns continue against the same canonical thread id.
Durability boundary. Context sent to a model can be compacted or reassembled. The session record is the durable source of what happened.