Skip to main content
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).

claude — available today

The managed Claude agent loop. It works in a sandbox through remote tools, streams its steps into the session as events, and runs Claude models on your Anthropic key.
curl https://api.opencomputer.dev/v3/agents \
  -H "Authorization: Bearer $OPENCOMPUTER_API_KEY" \
  -d '{ "name": "reviewer", "model": "anthropic/claude-opus-4-8",
        "prompt": "You review code.", "runtime": "claude" }'

How it’s structured

The runtime runs the agent loop in its own per-session sandbox (the brain). The agent’s file and shell tools don’t run there — they run in a separate sandbox (the hands) that the brain drives through remote tools, so the model has no local disk or network of its own: the sandbox is the only surface it can act through. The brain carries the sealed model key (egress-allowlisted to the model API, swapped in by a host proxy so the key never enters the VM); the hands sandbox holds no secrets at all. Each turn is one bounded run, invoke-style — it:
  1. reads the new input from the event log at the cursor,
  2. drives the Claude Agent SDK loop,
  3. streams every step back as events over the authenticated events API,
  4. performs side effects only through the remote sandbox 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).

Reliability & supervision

A regional supervisor owns each running session and keeps the runtime healthy — you never restart anything:
  • 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.
  • 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.

Coming soon

The runtimes below are not yet callable. When one is available, you select it by setting runtime to its name — nothing else changes.
  • codex, opencode — prebuilt, multi-provider runtimes.
  • Custom (bring your own image) — package any agent harness as a runtime. See Custom runtimes for the contract and our current thinking.