# codex · Durable execution

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [codex](https://ai-agents-review.com/runtime/codex.md)
- Column: [Durable execution](https://ai-agents-review.com/column/durable-execution.md) (Product integration)
- Mark: 2→3 [opt: app-server daemon recovery] s
- Default deployment: 2
- Best supported configuration: 3 (opt: app-server daemon recovery)
- Page: https://ai-agents-review.com/cell/codex/durable-execution

## Rationale

Steer and writer lock serialize input. A crash cold-resumes without closing out the turn; only the opt daemon resumes eligible turns, with no idempotency rule

## Rubric criteria for this column

- 0: State in memory only; a restart loses sessions
- 1: Sessions persist, but an in-flight turn is lost on restart **and** concurrent requests on one session are not serialized (dropped or racing)
- 2: Sessions persist and concurrent input is serialized (queue, steer or reject), but an interrupted turn is lost or must be resent by hand
- 3: Level 2, plus an interrupted turn is detected after restart and either closed out with a recorded error **or** resumed
- 4: Level 3, plus turns survive client disconnect **and** automatic resume or replay with an explicit idempotency rule (request ids, replay-safe declarations, at-least-once documented)

## Review finding

Built in: a client disconnect drops subscriptions, but a live thread keeps running. Input to an active turn becomes a steer. Cross-process rollout writer lock. Request/stream retries 4/5. Daemon restart continues eligible local turns; a crash cold-resumes from the rollout (Note I-2). [I12][I13][I15][I16][I17][I18]

## Evidence cited by the mark

- [I13] codex — https://github.com/openai/codex/blob/065e18b04021008e2e7d504db8dc50275f589f73/codex-rs/protocol/src/turn_input.rs#L323-L349 — `TurnInputSubmission::{Accepted, Started, Steered, NotSubmitted}` — [S]
- [I15] codex — https://github.com/openai/codex/blob/065e18b04021008e2e7d504db8dc50275f589f73/codex-rs/rollout/src/writer_lock.rs#L1-L3 — cross-process ownership lock for thread (rollout) writers — [S]
- [I17] codex — https://github.com/openai/codex/blob/065e18b04021008e2e7d504db8dc50275f589f73/codex-rs/core/src/session/daemon_recovery.rs#L19-L47 — recovery snapshot only for uncancelled, input-recorded, single-local-environment turns — [S]

## Evidence also cited by the review finding

- [I12] codex — https://github.com/openai/codex/blob/065e18b04021008e2e7d504db8dc50275f589f73/codex-rs/app-server/src/request_processors/thread_processor.rs#L4023-L4039 — on connection close, teardown only if thread already gone from core manager — [S]
- [I16] codex — https://github.com/openai/codex/blob/065e18b04021008e2e7d504db8dc50275f589f73/codex-rs/model-provider-info/src/lib.rs#L74-L81 — stream idle 300 s; stream retries 5; request retries 4; cap 100 — [S]
- [I18] codex — https://github.com/openai/codex/blob/065e18b04021008e2e7d504db8dc50275f589f73/codex-rs/app-server/src/daemon_thread_recovery.rs#L1-L49 — managed daemon consumes recovery snapshot and restores threads (cold-resume) — [S]

## Grading record

- Grader A (default / best): 2 / 3
- Grader B (default / best): 2 / 3
