Back to blog
Artificial intelligence

Durable AI Agents: Checkpoints, Retries and Resume Explained

Durable AI agents keep their state, retry failed steps and resume after a crash. See how it works and compare Temporal, Cloudflare, Pi Durable and others.

İlker Ulusoy 2026-11-03 8 min read

Durable AI agents are agents that survive failure. If the server crashes, a deploy restarts the process or a model API times out, a durable agent does not start over and does not lose its work. It picks up from the last saved step. That matters as soon as an agent runs for more than a few minutes: research that takes an hour, a coding task that spans a day, or a watcher that runs for weeks. This guide explains how durable execution works for agents, why long-running agents need it, and how the main options compare in November 2026.

The short version

A durable agent saves a checkpoint after every important step, retries steps that fail, and after a crash resumes from the last checkpoint. The tricky part is tools: the agent has to know which actions are safe to run twice and which are not.

Why long-running agents need durable execution

A normal chat request lasts seconds. If it fails, you press retry and lose little. An agent is different. It calls a model, runs a tool, reads the result, calls the model again, and repeats this dozens or hundreds of times. The longer that loop runs, the more likely it is that something breaks in the middle.

Common causes of a broken run:

  • The process is restarted by a deploy or an autoscaler.
  • The machine or container dies.
  • A model provider returns an error or a rate limit.
  • A tool, such as a payment API, times out without saying whether it worked.
  • The laptop running the agent goes to sleep.

Without durability, each of these means starting again, paying for the same tokens twice, and sometimes running the same action twice. With durability, the agent continues from where it stopped. Think of it as the save button in a long document: you still lose the last few seconds, but not the whole afternoon.

The four building blocks of durable AI agents

1. State checkpoints

After each step, the agent writes what happened to storage: the model answer, the tool result, the current plan. The transcript itself is often the checkpoint. Temporal's Pi integration says it plainly: "the transcript is the conversation state."

2. Retries

A step that fails is tried again, usually with a wait in between (backoff). Good systems retry only the failed step, not the whole run.

3. Resume after a crash

When a new process starts, it reads the stored state and continues the unfinished work. It does not need the memory of the process that died.

4. Idempotent and replay-safe tools

This is the part most teams miss. If the agent crashed while a tool was running, did the tool finish? Reading a file twice is harmless. Sending an invoice twice is not. A tool is idempotent when running it twice has the same effect as running it once, for example because it sends an idempotency key with the request. Durable agent frameworks ask you to declare which tools are safe to replay and treat the rest with care.

Durable does not mean exactly once

Temporal's engineers point out that a timeout is not proof that a worker stopped. An old attempt can still run a tool and cause an effect. Durability reduces lost work. It does not remove the need for idempotent tools.

The main options for durable agents

There are two families. General durable execution engines make any code durable, including agent loops. Agent-native harnesses build durability into the agent itself. Here are the options we see most often, with links to their own docs.

Temporal

Temporal splits work into Workflows, which hold the logic, and Activities, which talk to the outside world. It records every event in a history. When a worker fails, another worker replays the Workflow code against that history and continues. The price is that Workflow code must be deterministic, so model calls and tools go into Activities. In October 2026 Temporal showed the Pi coding agent running on Temporal with failover across machines.

Cloudflare Durable Objects and the Agents SDK

In the Cloudflare Agents SDK, each agent is a Durable Object with its own SQL storage, scheduled work and recoverable execution. An object that is evicted or crashes is restarted by an alarm and continues. We covered the wider idea in our post on Cloudflare Project Think.

Pi Durable

Pi Durable is an experimental TypeScript harness from Earendil, released with Pi 1.0 on 1 October 2026. Every model request and tool call is a task that stores a checkpoint before it moves on. Tools declare whether they are replay-safe. It stores state in SQLite, JSONL or a Cloudflare Durable Object, and Rivet runs it inside Rivet Actors. Temporal took a different route: its pi-temporal project runs the Pi coding agent on Temporal instead of Pi Durable's own storage. Our Pi Durable guide goes into detail.

Restate, Inngest, DBOS and LangGraph

  • Restate describes itself as a lightweight runtime that turns agents, workflows and services into durable processes. Completed steps are stored, and code resumes where it left off.
  • Inngest runs functions as steps and stores each step result. On failure only that step retries, and the run can resume on another machine.
  • DBOS is a library. You add annotations to your code and it gains durable execution backed by Postgres, without a separate orchestration server.
  • LangGraph saves graph state through checkpointers. In-memory checkpointers are lost on restart, so production setups use the Postgres saver.

Comparison table

OptionTypeWhere state livesTool safetyGood fit
TemporalGeneral durable execution engineEvent history in a Temporal clusterActivities with retry and timeout policies; you add idempotencyTeams that already run Temporal or need cross-machine failover
Cloudflare Agents SDKAgent runtime on Durable ObjectsSQLite inside each Durable ObjectDepends on the harness you run inside itMany small agents at the edge, one per user or task
Pi DurableAgent-native harness (experimental)SQLite, JSONL, IndexedDB, Durable Objects or customPer-tool replay declarationTypeScript teams that want durability inside the agent loop
RestateDurable runtimeRestate server journalJournaled stepsLow-latency services and stateful agents
InngestHosted step functionsInngest platformPer-step retries, stored resultsEvent-driven agent steps without running infrastructure
DBOSLibraryYour PostgresCheckpointed stepsTeams that trust Postgres and want no extra service
LangGraphAgent framework with checkpointersConfigured checkpointer, e.g. PostgresUp to your nodesGraph-shaped agents already built on LangChain

A caution about comparisons: many of the head-to-head articles online are written by one of the vendors. The table above sticks to what each project says in its own documentation. Pricing and limits change often, so check them directly.

How to choose

  1. 1Start from your existing stack. If you already run Temporal or Postgres, the cheapest path is often to put the agent loop on what you have.
  2. 2Decide how much failure you must survive. A process crash is easier than losing the whole host. Temporal's Pi post notes that Pi Durable's local SQLite store survives process crashes but may lose the newest commits on power or host failure.
  3. 3List your tools and mark them. For each tool, write down: safe to repeat, repeat with an idempotency key, or never repeat. This list matters more than the framework.
  4. 4Test a crash on purpose. Kill the process in the middle of a run and check what happens. Temporal's demo does exactly this by killing the active worker every 15 to 40 seconds.
  5. 5Watch costs. A resumed model call may be sent again and cost tokens again. Set budgets per run.

Durability pairs well with clear goals and retry loops. Our posts on resilient agent loops and Codex Goals cover the other half of long-running work. Durability is also what makes proactive AI agents practical, since a watcher that runs for weeks will meet every kind of failure.


How Halmob helps

Halmob builds durable agents: long-running agents that keep their state, retry after failures and resume where they stopped, for work that spans hours or days. We also build software factory pipelines that turn a spec into reviewed, tested pull requests, which only work when every step survives a crash. If you are deciding between Pi Durable, OpenClaw, Hermes Agent or another platform, our agent platform consultancy helps you choose, set up and roll it out. Contact us to talk through your use case.

Related Articles

Artificial intelligence

Proactive AI Agents Explained: What They Are, How to Start

Proactive AI agents act before you ask. Learn how they differ from chatbots and automations, what Muse, Dots and Claude Duet do, and how to start safely.

2026-11-03 · 7 min read
Artificial intelligence

Pi Durable Explained: Crash-Safe AI Agents in TypeScript

Pi Durable is Earendil's experimental library for crash-safe AI agents. Learn how checkpoints, tool replay rules and Cloudflare, Temporal and Rivet fit in.

2026-11-03 · 8 min read
Artificial intelligence

AI Software Factory Explained: From Spec to Pull Request

What an AI software factory is, which coding agents cover each stage from spec to pull request, where humans stay in charge, and the failure modes to plan for.

2026-11-03 · 7 min read
Artificial intelligence

AI Marketing Factory Explained: One Brief, Many Languages

How an AI marketing factory turns one brief into on-brand posts, articles and ads in several languages, plus the brand risks and EU AI Act rules to plan for.

2026-11-03 · 7 min read
Artificial intelligence

Claude Duet Explained: Anthropic's Proactive Work Agent

Claude Duet is Anthropic's proactive agent for small businesses: what it does, its limits, who can get it, and how it compares with Meta Muse and OpenAI Dots.

2026-11-03 · 7 min read
Artificial intelligence

Meta Muse Explained: Personal AI Agent Guide for Business

Meta Muse is Meta's personal AI agent. Learn how it works, what the $20 and $100 plans include, the Amazon block, and what small businesses should check.

2026-11-03 · 7 min read