Skip to content

An open-source, faster Devin alternative

TypeScript

docs(agent-sessions): drop the standalone Durability page; fold into runtimes

Igor Zalutski9d4c5cb25975
diff --git a/docs/agent-sessions/custom-runtimes.mdx b/docs/agent-sessions/custom-runtimes.mdx
index 601b4548..3f2a3f0d 100644
--- a/docs/agent-sessions/custom-runtimes.mdx
+++ b/docs/agent-sessions/custom-runtimes.mdx
@@ -21,7 +21,7 @@ The turn token is fenced: writes from a superseded runtime instance are rejected
## Journal and recovery
-The image should be stateless. Store resumable state in the provided journal directory. The durable record is the event log plus that journal, so crashes, idle hibernation, and machine restore follow the same [durability](/agent-sessions/durability) behavior as `claude`.
+The image should be stateless. Store resumable state in the provided journal directory. The durable record is the event log plus that journal, so crashes, idle hibernation, and machine restore follow the same [recovery](/agent-sessions/runtimes#failure-behavior) behavior as `claude`.
## Model configuration
diff --git a/docs/agent-sessions/durability.mdx b/docs/agent-sessions/durability.mdx
deleted file mode 100644
index c5a25beb..00000000
--- a/docs/agent-sessions/durability.mdx
+++ /dev/null
@@ -1,64 +0,0 @@
----
-title: "Durability & resume"
-description: "What survives a disconnect, an idle period, or a crash — and what doesn't"
----
-
-A Durable Agent Session is **never lost and always resumable**:
-
-- The **event log is durable forever** (the record of everything the agent did).
-- **Disconnect** → reconnect from any cursor, nothing missed.
-- The runtime **crashes** → we **restart it automatically** and it picks up from where it was.
-- The runtime **hangs** → a turn deadline bounds it; the turn ends and you steer to continue.
-- The session **idles** → it hibernates (≈ free) and the session **survives even if its sandbox is reclaimed**.
-
-Narrow edges, all on the roadmap (see [Failure behavior](#failure-behavior)): a sandbox lost **mid-turn** re-runs that turn; a hung turn ends at its deadline rather than auto-continuing; **uncommitted files** don't survive sandbox loss (commit/push to keep them).
-
-## Durable event log
-
-Every step is appended with a monotonic `seq`. Reads and live streams are served from that ordered log, so anything logged or delivered is recoverable.
-
-## Stream resume
-
-Disconnects lose nothing. Reconnect with `after=<last seq you saw>` and you get every event since, in order — no gaps, no duplicates.
-
-```js
-// reconnect loop
-let cursor = lastSeqSeen;
-const res = await fetch(
- `https://api.opencomputer.dev/v3/sessions/${id}/events?stream=sse&after=${cursor}`,
- { headers: { Authorization: `Bearer ${clientToken}` } }
-);
-```
-
-## Hibernate & resume
-
-When a session has nothing to do it goes **idle** and its sandbox **hibernates** — the VM is snapshotted and stopped. You pay storage-only while idle. The next message (a steer, or the next turn) wakes it, typically sub-second, and it continues with prior context.
-
-<Note>This mirrors [sandbox hibernation](/sandboxes/timeout): idle ≈ free, fast wake. Sessions manage it for you — you don't set a timeout per turn. The runtime's state is also **checkpointed off-box** at each hibernate, so an idle session resumes even if its sandbox is reclaimed.</Note>
-
-## Self-healing runtime
-
-You don't restart anything — the platform does. The runtime keeps its working state (the agent's session journal) on the sandbox, and OpenComputer recovers it for you:
-
-- **Runtime crashes** (process dies, sandbox fine) → we start it again **in the same sandbox**; it continues from its on-box journal, not from scratch (work since the last journaled step may repeat).
-- **Runtime hangs** → bounded by a **turn deadline**; the turn ends with `deadline_exceeded` and you steer to continue. (Faster heartbeat-based restart is on the roadmap.)
-- **Sandbox reclaimed while idle** → we recreate it and **restore the last checkpoint**, resuming the conversation from the last completed turn. (The brain state is restored; commit/push to keep file changes — see below.)
-
-## Failure behavior
-
-What's guaranteed today, and what isn't:
-
-| Failure | What happens |
-| --- | --- |
-| Client disconnects | Reconnect from your cursor; nothing lost. |
-| Session idles | Sandbox hibernates; resumes intact on the next message. |
-| Runtime **crashes** | Auto-restarted; continues from the on-box journal. |
-| Runtime **hangs** | Bounded by the turn deadline; the turn ends `deadline_exceeded` — steer to continue. |
-| Sandbox lost **while idle** | Recreated from the last checkpoint. |
-| Sandbox lost **mid-turn** | That turn re-runs from the log. |
-
-Work since the last journaled step may repeat, so make side effects idempotent. Uncommitted hands-sandbox files are not restored after sandbox loss; commit or push to keep them.
-
-<Warning>
- The one edge not yet covered: a sandbox lost **mid-turn** re-runs that turn rather than resuming mid-thought — so in-flight, unlogged work can be redone. Build idempotent side effects, and treat the event log (and delivered webhooks) as your durable record. Byte-exact **mid-turn** resume is coming in a later release.
-</Warning>
diff --git a/docs/agent-sessions/runtimes.mdx b/docs/agent-sessions/runtimes.mdx
index 29450090..8978d6a1 100644
--- a/docs/agent-sessions/runtimes.mdx
+++ b/docs/agent-sessions/runtimes.mdx
@@ -3,7 +3,7 @@ title: "Runtimes"
description: "The engine that runs your agent — claude today, more soon"
---
-A **runtime** is the engine that executes the agent loop. You pick one per agent via `runtime`; it defaults to `claude`. The runtime **image** is stateless and interchangeable; the **running instance** keeps its session state on the sandbox, and OpenComputer manages and recovers it for you (see [durability](/agent-sessions/durability)).
+A **runtime** is the engine that executes the agent loop. You pick one per agent via `runtime`; it defaults to `claude`. The runtime **image** is stateless and interchangeable; the **running instance** keeps its session state on the sandbox, and OpenComputer manages and recovers it for you (see [Supervision and recovery](#supervision-and-recovery)).
## `claude` — available today
@@ -35,7 +35,7 @@ Each **turn is one bounded run**, invoke-style — it:
4. performs side effects only through the remote [sandbox tools](/agent-sessions/runtime-tools) (`bash` / `read` / `write` / `ls`, plus `say` / `ask`), and
5. **exits when it has nothing left to do** — it yields rather than busy-waits, so time spent waiting costs no compute.
-Across turns it continues an on-box **journal**; the durable record is the event log *plus* that journal, which the platform checkpoints at each boundary and restores on recovery ([durability](/agent-sessions/durability)).
+Across turns it continues an on-box **journal**; the durable record is the event log *plus* that journal, which the platform checkpoints at each boundary and restores on recovery (see [Failure behavior](#failure-behavior)).
### Supervision and recovery
@@ -43,11 +43,26 @@ A regional **supervisor** owns each running session and keeps the runtime health
- **One driver at a time.** The supervisor holds a **fenced lease** on the session: exactly one runtime instance can write at a time, and the fence rejects writes from a stale instance (e.g. a slow machine that returns after it was given up), so a session never has two concurrent writers.
- **Liveness.** The lease is renewed while a turn runs. If the runtime's machine dies, the lease lapses and the supervisor **re-claims the turn and continues it** from the journal.
-- **Crash / hang / lost machine.** A bad exit restarts the turn in place (bounded attempts, with crash-loop backoff); a hung turn is bounded by a **deadline** and ends `deadline_exceeded`; a lost machine is recreated and **restored from the last checkpoint**. Full matrix in [durability](/agent-sessions/durability#failure-behavior).
+- **Crash / hang / lost machine.** A bad exit restarts the turn in place (bounded attempts, with crash-loop backoff); a hung turn is bounded by a **deadline** and ends `deadline_exceeded`; a lost machine is recreated and **restored from the last checkpoint**. Full matrix [below](#failure-behavior).
- **A turn that can't start fails cleanly.** If the model key can't be resolved or the runtime image can't be fetched, the turn ends with an **`error` event carrying the reason** and the session returns to idle, rather than hanging.
- **Backstop reconciler.** A periodic sweep re-dispatches work whose wake-up was missed, re-claims turns whose lease expired, and resets sessions left `running` after a crash, so stranded work is picked up.
- **Observable.** Every turn and machine transition — turn start / complete / error, sandbox create / provision / hibernate, lease renew / fence — is recorded, so the platform can show exactly where a session is and why a turn ended the way it did.
+### Failure behavior
+
+What's guaranteed today, and what isn't:
+
+| Failure | What happens |
+| --- | --- |
+| Client disconnects | Reconnect from your cursor ([events](/agent-sessions/events)); nothing lost. |
+| Session idles | Sandbox hibernates; resumes intact on the next message. |
+| Runtime **crashes** | Auto-restarted in place; continues from the on-box journal. |
+| Runtime **hangs** | Bounded by the turn deadline; the turn ends `deadline_exceeded` — steer to continue. |
+| Sandbox lost **while idle** | Recreated from the last checkpoint. |
+| Sandbox lost **mid-turn** | That turn re-runs from the log. |
+
+Work since the last journaled step may repeat, so **make side effects idempotent** and treat the event log (and delivered webhooks) as the durable record. Uncommitted hands-sandbox files are not restored after sandbox loss — commit or push to keep them. Byte-exact **mid-turn** resume is coming in a later release.
+
## Planned runtimes
<Note>The runtimes below are not yet callable. When one is available, you select it by setting `runtime` to its name — nothing else changes.</Note>
diff --git a/docs/agent-sessions/sessions.mdx b/docs/agent-sessions/sessions.mdx
index ea801e90..812635bc 100644
--- a/docs/agent-sessions/sessions.mdx
+++ b/docs/agent-sessions/sessions.mdx
@@ -9,10 +9,10 @@ A **session** is the durable unit of an [agent](/agent-sessions/agents) at work:
1. You create a session from an [agent](/agent-sessions/agents) (and an [Anthropic credential](/agent-sessions/authentication#model-credentials) — both required). The session starts immediately.
2. The [runtime](/agent-sessions/runtimes) executes the agent in a sandbox, appending [events](/agent-sessions/events) to the log as it works.
-3. With nothing left to do, the session goes **idle** and the sandbox **hibernates** (see [durability](/agent-sessions/durability)).
+3. With nothing left to do, the session goes **idle** and the sandbox **hibernates**.
4. A [steer](/agent-sessions/messaging) message wakes it; it resumes with its prior context. Repeat.
-<Note>The runtime is **managed and self-healing**: if it **crashes** we restart it and it continues from its on-box state; if it **hangs**, a turn deadline ends the turn and you steer to continue; an idle session survives even if its sandbox is reclaimed. In-flight work since the last logged event may repeat, so make side effects idempotent. Details: [durability](/agent-sessions/durability).</Note>
+<Note>The runtime is **managed and self-healing**: if it **crashes** we restart it and it continues from its on-box state; if it **hangs**, a turn deadline ends the turn and you steer to continue; an idle session survives even if its sandbox is reclaimed. In-flight work since the last logged event may repeat, so make side effects idempotent. Details: [runtime recovery](/agent-sessions/runtimes#failure-behavior).</Note>
## Lifecycle
diff --git a/docs/docs.json b/docs/docs.json
index 643846ef..4f803283 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -68,7 +68,6 @@
"agent-sessions/sessions",
"agent-sessions/events",
"agent-sessions/authentication",
- "agent-sessions/durability",
"agent-sessions/messaging",
"agent-sessions/webhooks",
"agent-sessions/runtimes",