Skills & Workflow

Durable Execution

Also called: durable workflows · checkpointing · resumable execution

Durable execution is a runtime approach that records each step's progress and results so a long-running workflow or agent can resume where it left off after a failure, restart, or long wait.

Agents run for minutes, hours, or days: calling tools, waiting on APIs, pausing for a human approval. In an ordinary process, a crash, deploy, or timeout in the middle loses everything, and re-running from the start can repeat side effects such as sending an email twice or charging a card twice.

Durable execution solves this by persisting progress. Each completed step and its result is saved to durable storage; if the process dies, a new worker replays the run using the saved results and continues from the first unfinished step. Workflow engines such as Temporal popularized the model, and several agent frameworks now offer checkpointing built on the same idea.

It pairs naturally with human-in-the-loop approvals, where a run may wait for days without holding a process open.

How it works

The engine logs a history of steps (calls, results, timers, incoming signals). To recover, it re-runs the workflow code from the start, but completed steps return their recorded results instead of executing again, so execution fast-forwards to where it stopped. Because replays re-run your code, workflow logic generally has to be deterministic, while side-effecting work runs in separate steps that are recorded once. Retries with backoff and timeouts are typically built in.

Example

An agent researches a topic, drafts a report, then waits for a manager's approval before emailing it. The server restarts overnight. On restart the run replays: research and draft steps return saved results instantly, and it resumes waiting for the approval. The email is sent once, not twice.

How it differs

Durable execution vs. a state-machine-agent: a state machine describes the allowed states and transitions of an agent's logic; durable execution is the runtime guarantee that progress survives failures. A state-machine agent can run on a durable runtime, but one does not imply the other.

Common misconceptions

Often assumed: Durable execution makes every step exactly-once automatically.
Actually: Steps are recorded, but an external call that succeeded right before a crash may be repeated on retry. Side effects still need idempotency keys or safe-to-repeat design.

FAQ

What is durable execution?
A runtime approach that saves each step's progress and results so a long-running workflow or agent can resume after a crash or restart instead of starting over.
Why do AI agents need durable execution?
Agent runs are long and involve slow, costly, side-effecting tool calls and human waits; without persisted progress, a failure means repeating work or repeating side effects.
Is checkpointing the same as durable execution?
Checkpointing (saving state at points in a run) is the core mechanism; durable execution usually adds replay, retries, timers, and waiting for external signals on top.

Last checked: 2026-09-20

Related terms