Durable Execution

/ˈdjʊərəbəl ˌɛksɪˈkjuːʃən/

Also known as: durable workflows, workflow durability, resumable execution

technicalintermediate

What is Durable Execution?

Durable execution is a way of running code so that it completes even when the process running it does not. Every step of a workflow, its inputs and results, timers and external events such as a human approval are written to an event history held by a separate service. If a worker crashes, times out or is redeployed, another worker replays that history, rebuilds the workflow's state and continues from the last completed step.

Temporal popularized the term. In its model, the workflow code is deterministic and decides what happens next, while anything non-deterministic or with side effects, such as an LLM call, a tool call or a bank API request, runs as a separately recorded "activity" with its own retry policy.

Key Characteristics

  • Event history as the source of truth: State is rebuilt by replaying recorded steps, so developers don't write their own state tables or reconciliation jobs.
  • Completed steps never rerun: An LLM call that already returned isn't repeated after a crash, which saves tokens and avoids duplicate side effects such as a second payment.
  • Retries as policy: Retry behavior is declared once and applies to every activity, and bad model output can be treated as an ordinary activity failure.
  • Long waits are cheap: A workflow can wait for a human signal for minutes or months without a process holding it in memory.
  • Debugging and recovery share one record: The history an engineer inspects is the same one the worker replays.

Why Durable Execution Matters for AI Agents

Agents turn short requests into long-running, multi-step processes that touch real systems and real money. Temporal's 2026 survey found that 41.1% of teams hit agent issues daily or more often, and that state tracking and debugging, not model quality, are the top blockers. Durable execution doesn't make agents fail less. It makes each failure cheap, because work already done, including paid-for model calls, survives the crash. OpenAI's Codex and Replit's agent are among the systems Temporal says run on it in production.

See Also