What is durable execution for AI agents?
Durable execution is a way of running long processes so that each completed step is recorded outside the process, letting a crashed or paused run resume from its last checkpoint instead of starting over.
The idea predates AI agents. Temporal, a workflow platform, defines durable execution as the ability of a workflow to keep its state and progress in the face of failures: it records each step in an event history and, after a failure, resumes from the last recorded event.
Agents need it more than most software. A run can last hours, call a model hundreds of times and pay for every call, and it often waits days for a person or an outside event. Without durability, a lost container or a deploy mid-run means starting again and paying again.
How it shows up in agent stacks
Workflow engines
Temporal's integration with the OpenAI Agents SDK, generally available since 2026-03-23, runs every agent invocation through a Temporal Activity, so completed steps are stored and do not rerun after recovery.
Lab SDKs
OpenAI's April 2026 Agents SDK update says separating harness from compute enables durable execution: with snapshots and rehydration, a run continues in a fresh container from its last checkpoint.
Hosted agents
Anthropic's Managed Agents keep the session as an append-only log outside the harness, and a crashed harness is woken from that log.
Framework sessions
Google's ADK guide on pause and resume stores an explicit state machine in a database-backed session, wakes the agent through webhooks and treats a human approval as a pause.
What has to be true for it to work
Steps with clear edges
Model calls, tool calls and approvals each need to be recorded as a unit, so the system knows exactly what finished.
Safe retries
A step that started but did not finish may run again, so side effects such as payments or emails need idempotency keys or a check before acting.
State outside the context
Progress lives in the event log or session store, not only in the conversation, so a resumed agent reads where it is instead of guessing.
Versioned code
A run that pauses for days may resume on newer code, so changes to step logic have to account for runs already in flight.
What it is confused with
Retries
A retry repeats one failed call. Durable execution preserves the whole run's progress across process failures.
Agent memory
Memory is what the agent knows across sessions. Durable execution is whether a single run survives a crash.
Long-running agents
A long-running agent is defined by how long it works. Durable execution is one of the mechanisms that makes long runs practical.
How Motiontic's engineers apply it
Motiontic's engineers decide early which agent runs must survive a restart, usually anything over a few minutes or anything waiting on a person, and put those on a durable runtime from the start. Tests kill the worker mid-run and check that the agent resumes without repeating a side effect.
An ordinary agent process compared with durable execution
| Ordinary process | Durable execution | |
|---|---|---|
| Process crash | Run lost, start again | Resume from last recorded step |
| Completed model calls | Paid for again on restart | Results reused |
| Waiting for a person | Process held open or state lost | Run paused and woken by an event |
| Where progress lives | In memory or the context window | In an event log or session store |
| Engineering cost | Low | Idempotent steps and versioned workflow code |
Common questions
Why do AI agents need durable execution?
Agent runs are long, expensive and often wait on people or outside events. Durable execution lets a run survive crashes, deploys and pauses without losing progress or paying for completed model calls twice.
Is durable execution the same as checkpointing?
Checkpointing is one way to implement it. Durable execution is the guarantee that a run resumes from where it stopped, whether that comes from checkpoints, an event history or a session log.
Which tools provide durable execution for agents?
Workflow engines such as Temporal, and agent SDKs and platforms that store run state outside the process, including OpenAI's Agents SDK with snapshots, Anthropic's Managed Agents and Google's ADK sessions.
Related
Long-running agent
Agents that work for hours or days, and the state that lets them pick up where they stopped.
Agent state
The facts about where a task stands, kept as data instead of buried in chat history.
Meta-harness (brain vs hands)
Stable interfaces that split reasoning, execution and memory so each can fail alone.
Agent runtime
Where agents actually run: durable sessions, checkpoints, sandboxes and resume.
AI agent development
Agents that do real work for users, with the evals, traces and guardrails to keep them in production.
Sources
- Temporal docs, What is Temporal
- Temporal blog, Production-ready agents with the OpenAI Agents SDK and Temporal (2025-07-30, GA 2026-03-23)
- OpenAI, The next evolution of the Agents SDK (2026-04-15)
- Anthropic, Scaling Managed Agents (2026-04-08)
- Google Developers Blog, Build long-running AI agents that pause, resume and never lose context with ADK (2026-05-12)
Running agents that have to hold up?
Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.