06Sessions & Continuity
SECTION 06RUNTIME

Sessions & Continuity

Session lifecycle, SQLite persistence, and multi-turn state transitions.

Session Lifecycle

Every conversation progresses through deterministic lifecycle states managed by OrbitRuntime:

[IDLE] ──(submit prompt)──► [SPAWNING]
[COMPLETED] ◄──(agent finishes)── [STREAMING] ──(needs confirmation)──► [AWAITING_APPROVAL]
▲ │ │
│ ▼ ▼
[ABORTED] ◄────────────── (user cancels) ◄────────────── (user denies/approves)

State Transitions

  • IDLE: Ready for user input. Session state stored in SQLite.
  • SPAWNING: Resolving binary path and spawning Antigravity child process.
  • STREAMING: Actively receiving token chunks, reasoning blocks, and tool executions.
  • AWAITING_APPROVAL: Paused waiting for the user to confirm a tool execution or answer a question.
  • ABORTED: Process cancelled cleanly via SIGINT/SIGTERM.

Recovery & Persistence

Because each turn event is committed synchronously to SQLite as it is received, an unexpected application termination or power loss does not corrupt your conversation history. On relaunch, Orbit reads the active conversation_id from disk and resumes with full context intact.