The study, in sixteen chapters
Chapter 1
What durability means for an agent.
In short: A durable agent writes its progress to storage as it goes, so that when the process running it dies, a new process can read that record and continue instead of starting over.
An agent works in a loop. The harness, the program wrapped around the model, sends the conversation so far to the model. The model answers or asks for a tool. The harness runs the tool and sends the result back, and the loop repeats. Some agents are meant to live far longer than one request: Cloudflare’s documentation describes agents “that persist for days, weeks, or months”.[62]
Such an agent spends most of its life waiting. The same page lists the waits: user input from seconds to days, human approvals from hours to days, and scheduled wake-ups from minutes to months.[62]
Processes die for ordinary reasons. Earendil’s announcement of its Pi Durable library lists three: “whether the laptop sleeps, the container is redeployed, or the machine runs out of memory”.[89] Whatever the agent held only in memory goes with it: turns not yet saved, an answer the model was halfway through streaming, a tool call in flight, a timer, messages waiting in a queue. Cloudflare puts it in one line: “In-memory variables, timers, open fetches, and local closures do not survive eviction.”[62]
An illustration
An overnight agent is asked to fix a flaky test, open a pull request, and post a note in Slack. Its process dies after GitHub accepted the pull request but before the agent saved that fact. A naive restart opens a second pull request. A durable design has to know the request went out, or at least warn the model that it might have.
An invented scenario used to explain the problem. It is not a reported incident.
Three questions every design answers
- Where is progress written, and how often? After every step, at chosen points, or only at the end of a run. Chapters 2 and 3.
- What happens to the step that was running? Run it again, skip it, or ask the model or a person. Chapter 4.
- What about effects outside the record? A charged card, a half-written file, a browser left on page five. Chapters 4 and 6.
Six terms used throughout
- Checkpoint
- A saved record of progress that a new process can resume from.
- Replay
- Running code again after a crash while reusing recorded results for the steps that already finished. Engines that replay, such as Temporal, require the replayed code to be deterministic, so that it “makes the same Workflow API calls in the same sequence, given the same input.”[1]
- Stored step result
- A saved result for a finished step, so the step is not run again when the program resumes. DBOS, for example, “automatically recovers its execution from the last completed step”.[19]
- At-least-once
- A step that may run more than once, because a crash can land after the step acted but before its result was saved. DBOS documents the window: after a database write, “but before the checkpoint is saved, the step runs again on recovery”.[20]
- Idempotency key
- A unique value sent with a request so the receiving service can recognize a retry and return the first result instead of acting twice. Stripe stores the first result for a key “regardless of whether it succeeds or fails.”[138]
- Exactly-once
- The effect happens once, crashes included. A widely cited essay puts the limit bluntly: “Within the context of a distributed system, you cannot have exactly-once message delivery.” The same essay says the way systems achieve it in practice is “by faking it”, with idempotent messages or deduplication.[139]
Three families of systems
The 26 systems in this study fall into three families. Durable-execution engines such as Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, and Trigger.dev make long programs survive crashes, and each documents running agents on it.[5][12][22][29][33][41][50][54][61] Agent frameworks and libraries such as LangGraph, the OpenAI and Claude agent SDKs, Google ADK, Mastra, Pydantic AI, Cloudflare’s Agents SDK, and Pi Durable build the agent loop and save it in different ways. Vendor agents such as Claude Managed Agents, the OpenAI Agents API, Codex cloud, Claude Code, GitHub Copilot’s cloud agent, Cursor’s cloud agents, and Devin run the agent for you and keep its state. Chapter 8 places every system on one map and compares them on ten questions, and chapter 9 sets Pi Durable against all the others.
Chapter 2
Checkpoint and resume.
In short: Every durable design saves progress at chosen points and resumes from the last one, and where it saves decides what a crash can lose or repeat.
- Process A runs step 1 and writes checkpoint 1 to storage.
- It runs step 2 and writes checkpoint 2.
- It dies while step 3 is running. Nothing about step 3’s outcome was saved.
- Process B opens the same storage and reads checkpoints 1 and 2 back instead of running those steps again.
- For step 3 it must choose: run it again, skip it, or ask the model or a person. Chapter 4 covers that choice.
A checkpoint is only as useful as its timing. Save after every step and a crash loses at most the steps in flight. Save only at the end of a run and a crash loses the run. The systems we read save at different points:
- Pi Durable saves before every move: “every step of a run is a task that stores a checkpoint before it moves on. If the process dies, a new process opens the same storage, finds the unfinished tasks, and continues each one from its last checkpoint.”[89]
- LangGraph’s checkpointer saves a snapshot of the graph state at every super-step.[64] A node that was cut off “runs again from the start of its function.”[65]
- The OpenAI Agents SDK saves a paused run as a
RunStatethat the application stores “in a database or queue” and restores later.[69] - Google ADK keeps a conversation’s events in a session service. With the in-memory one, “All conversation data is lost if the application restarts.”[80]
- The Claude Agent SDK writes the conversation to disk, and “Sessions persist the conversation, not the filesystem.”[75]
Resuming is not the same as recovering on its own. Mastra’s durable agents checkpoint each run’s state to storage, but a crashed run stays “running” with no automatic retry, and the opt-in recovery “can reissue LLM calls (with real cost) and re-execute tool calls.”[84]
Chapter 3
Replay a history, or reuse stored results.
In short: Engines either re-run your code against a recorded history, which requires deterministic code, or keep each finished step’s result and skip that step next time; in both, the step that was running runs again.
- Replay: the engine keeps an event history of the run. After a crash it runs the code from the top, and each finished step receives its recorded result instead of running again.
- The step that was running, the deploy, has no recorded result, so it runs for real.
- If the code has changed so that it takes a different path, the history no longer matches and the run stops making progress until someone fixes it.
- Stored results: the engine keeps the result of each finished step. The code runs again, finished steps return their saved results, and the step that was running runs again.
Replay a deterministic program against its history
The engine records every step’s result, then on recovery runs the program again from the top, feeding it the recorded results. Temporal, Azure Durable Functions, Vercel Workflow, AWS Lambda durable functions, and Restate work this way.[1][51][37][45][11] The price is determinism. If replayed code takes a different path, Temporal’s runbook says affected executions stop making progress, and “This will not clear up on its own.”[4] Model calls therefore go into Activities, “so they retry durably and are not repeated during Workflow replay.”[5]
Store each step’s result and skip finished steps
The program re-runs too, but the engine only promises that finished steps return their saved results. DBOS “automatically recovers its execution from the last completed step”,[19] and Inngest reuses “results from completed steps whose IDs still match.”[28] The step that was running is retried, so it runs at least once.[20][31]
Snapshot the process or the machine
Trigger.dev freezes a waiting task’s whole process with CRIU, “including memory, CPU registers, and open file descriptors.”[55] On macOS, Devin snapshots a sleeping session’s disk, but “Running processes do not” survive.[134] Claude Managed Agents checkpoints an idle session’s sandbox, “including the filesystem, installed packages, and any files the agent created.”[109] Chapter 6 returns to snapshots.
Changing the code under a running agent
A run that lasts days will meet a deploy. Every durable system has to decide which version of the code a resumed run uses.
- Pin the run to its version. Temporal can run a pinned workflow “entirely on the Worker Deployment Version where it started.”[6] Restate keeps in-flight invocations on their original deployment, and Vercel pins each run to “the deployment that starts them.”[14][38] The trade-off, in Restate’s words: “When a bug affects in-flight invocations, they remain pinned to the original deployment.”[14]
- Recover only matching versions. DBOS recovers only “workflows whose version matches the current application version.”[21]
- Use the new code and match steps by name. Inngest resumes runs on current code; a changed step “can repeat a payment, email, or resource creation.”[28]
- Store names, not code. Pi Durable resumes conversations with whatever tools the new process installs.[89] Our reading of its scheduler: a stored task version equal to the installed one runs the new code against the old checkpoint without further checks; an older installed version blocks the task, and a newer one needs a migration function.[98]
Chapter 4
Side effects, exactly-once, and idempotency keys.
In short: The step that was running may already have acted, so a design either runs it again, tells the model, or relies on an idempotency key that the receiving service honors; when a request may still be in flight and nothing bounds for how long, checking first cannot rule out a second charge, and the key can.
- The agent asks the payment service to charge $20 and sends a unique key, K-42.
- The service charges once and stores the key with the result.
- The reply is lost because the agent’s process crashes.
- After recovery the agent retries with the same key.
- The service has seen K-42, returns the stored result, and does not charge again. Without the key, the retry would charge a second time.
Most engines run the interrupted step again
Any design that retries an interrupted step runs it at least once and sometimes twice, and the documentation says so plainly:
- Temporal: an Activity “may be executed multiple times and may even partially complete more than once”.[2]
- Cloudflare Workflows: “Because a step might be retried multiple times, your steps should (ideally) be idempotent.”[31]
- AWS Lambda durable functions: “your business logic must be idempotent to handle potential retries”.[46]
- Inngest: “A step does not make an external action exactly once.”[26]
- Vercel Workflow warns that a retry can charge a user twice and offers a stable
stepIdto use as an idempotency key.[39]
Agent frameworks decide per tool
Agent-specific designs differ on the tool call that was cut off:
- Pi Durable stores a tool call’s intent before running it. On recovery the call runs again only when both the stored and the current declaration say
safe, and the default isunsafe; otherwise the model is told the tool “was interrupted and may have partially run”.[92][94] - Claude Code takes the conservative path on resume: a cut-off tool “doesn't finish or run again when you resume”, and Claude is told to check whether it took effect.[122]
- Google ADK’s resume goes the other way and runs tools “at least once”.[79]
- The OpenAI Agents SDK warns that a resumed snapshot “does not guarantee exactly-once tool side effects.”[70]
- Pydantic AI says a durable unit “can run more than once” when a worker fails after its side effect.[86]
Model requests get a different rule. Pi Durable sends a cut-off model request again, with no declaration needed, and keeps the partial answer in the transcript, marked as aborted.[89][99] Temporal’s agent integration runs model calls as Activities, which retry.[5]
Evidence: the code behind Pi Durable’s tool rule
In Pi Durable v1.0.0, the tool task records its replay policy with its intent, defaulting to unsafe: replay: tool.replay ?? "unsafe". The recovery path carries the comment “Recovery after intent: rerun only when the stored and the current policy both say safe.” and, when it does not rerun, settles the call with the message Tool ${call.name} was interrupted and may have partially run.[92] The four built-in coding tools, read, write, edit, and bash, declare no replay setting, so after a crash even a read is reported as interrupted instead of being run again.[97]
Keys that the receiving service honors
An idempotency key turns a retry into a no-op only if the service that acts checks it. Stripe stores the first result for a key “regardless of whether it succeeds or fails.”[138] Keys inside the harness are narrower: Pi Durable’s requestId is a “Host-provided deduplication key, scoped to the conversation.”[95] Our reading of the code: it stops a client from submitting the same request twice, and it does not stop a tool from repeating an effect further down.[96]
The research measures the difference. In a simulated benchmark, frontier models instructed to act exactly once duplicated a write in 56% of episodes when the request was still in flight and committed late, and in 74% when the transport delivered it twice. A separate experiment in the same paper, with four models and a tool contract in which every write accepts an idempotency key, cut the late-commit duplicate rate of agents without a guard from 61% to 9%. The same paper proves that “no verification-only policy is exactly-once under late commits without a bound on in-flight time”, and adds that “Waiting works when such a bound is short and known”.[156] A study of five workflow frameworks found LangGraph 1.2.9 “exactly-once across interrupts, at-least-once across crashes”, and when k processes resumed one parked interrupt, the gated effect fired k times.[155]
An outcome nobody knows
The cautious alternative leaves the question open. Pi Durable tells the model a tool “was interrupted and may have partially run”;[92] Claude Code tells Claude to check whether a cut-off call took effect.[122] The model then has to investigate. The Limbo study found that agents reported success in 90% of the episodes in which they had duplicated an effect.[156]
Chapter 5
One owner per run.
In short: Durable designs assume one process advances a run at a time, and when two machines can open the same record, a lease is not enough; the storage has to reject a stale writer.
- Client 1 acquires the lease and gets token 33.
- Client 1 goes into a long pause, and its lease expires.
- Client 2 acquires the lease, gets token 34, and writes with it. The storage accepts the write.
- Client 1 wakes up and writes with token 33. The storage has already seen 34, so it rejects the write.
A single-owner design is only as safe as the lock that enforces it. Pi Durable’s README is direct: “One process owns a storage at a time; there is no cross-process locking.”[91] Keeping a second process out is the host’s job; Earendil’s own demo app takes a file lock and notes that “A lock left by a crashed process goes stale after 10 s”.[103] Mastra says it “doesn't provide a distributed lease or lock yet.”[84] SQLite’s write-ahead log needs every process on one machine: “WAL does not work over a network filesystem.”[141]
A lease alone is not enough when an old owner can wake up late. Fencing tokens fix that, but as Martin Kleppmann wrote, “this requires the storage server to take an active role in checking tokens”.[140] The research shows what happens without it: when k processes resumed one parked LangGraph interrupt, the gated effect fired k times.[155]
The newest commit is the fragile one. For Pi Durable’s SQLite store the README says that “commits survive process crashes; the newest may be lost on power or host failure.”[91] Its JSONL backend’s fsync option “Defaults to false.”[101] Our reading: a recovery rule that relies on a stored intent record assumes that record survived. If a power cut loses it, a tool can run again even though it was never declared safe. We did not test this.
Engines and hosted runtimes enforce one owner in different ways. Temporal assigns each execution to a history shard, and “A History Shard assumes that only one concurrent operation can be within a partition at a time.”[10] Restate offers Virtual Objects and Workflows a “Single-writer guarantee”.[11] Cloudflare’s agents are Durable Objects, “single-threaded compute instances with long-term storage”.[36] LangSmith’s Agent Server queue “enforces that at most 1 run can be executed for a given thread at one time”,[136] and Cursor allows one active run per agent.[131] DBOS tags each workflow with the executor that started it and asks operators to “recover each workflow only once.”[24] The comparison in chapter 8 lists what each system’s documentation says about who may advance a run.
Chapter 6
State outside the transcript.
In short: Saving the conversation does not save the world the agent changed, so files, processes, browsers, and sandboxes need snapshots of their own, or a check before the agent trusts its memory.
- A durable run saves the conversation, tool calls and their results, checkpoints, and timers stored in its record.
- It does not save the world outside that record: files the agent wrote, running processes and shells, installed packages, or a browser’s open page.
- In the Crab study, restoring chat history alone recovered 8 to 13% of sandboxed tasks correctly, depending on the workload; with Crab’s sandbox checkpoints, 100% were recovered correctly.
The transcript survives; the world it describes may not. “Sessions persist the conversation, not the filesystem”, say Anthropic’s SDK docs.[75] A reclaimed Claude Code cloud VM comes back with the conversation, but “Background work that was still running when the VM was reclaimed, such as subagents and shell commands, isn't restored.”[123] OpenAI’s Agents API: “Reusing the environment ID does not restore files in replacement compute.”[114]
The Crab paper measured the gap: restoring chat history alone recovered 8 to 13% of tasks correctly, against 100% when sandbox state was checkpointed too. By workload, chat-only recovery succeeded on 13% and 8% of shell-intensive Terminal-Bench tasks with the Claude Code and iFlow-cli agents, and on 9% of code-repair SWE-bench tasks.[154]
Some products snapshot the environment. Claude Managed Agents checkpoints an idle session’s sandbox and keeps that state for 30 days from creation.[109] Cursor deletes environment snapshots after 90 days unused.[130] On macOS, Devin keeps a sleeping session’s disk but not its running processes.[134] Libraries usually leave the environment to you: Pi Durable’s execution environment interface covers files and shell commands and has no snapshot or restore operation.[102]
Rewinding has the same boundary. AgentRewind restores an agent’s context and workspace together, and its authors state the limit: “Effects outside the workspace filesystem, such as network requests, external-service calls, and external runtime state, cannot be undone.”[159]
Chapter 7
Compaction and handoff.
In short: Long runs outgrow the model’s context window, so compaction summarizes older turns at the cost of a model call and some detail, and a handoff starts a fresh context from a note.
- Early in a run, each request carries the instructions and a few turns.
- Every turn adds to what the next request must send, until the context nears a threshold below the model’s limit.
- Compaction replaces the older turns with a summary. The summary is produced by a model call, and details in the summarized range can be lost.
- Recent turns and the instructions stay as they were, unless the instructions themselves are summarized away.
Compaction is a model call, and it discards. Anthropic’s documentation says compaction “requires an additional sampling step, which contributes to rate limits and billing”, and warns that images, documents, uploads, and fetched URLs in a summarized range “are gone once the block replaces them.”[149][148] OpenAI’s Agents API takes the job on: “OpenAI manages sessions, orchestration, context compaction, and recovery”.[113]
Pi Durable compacts in the background while the conversation keeps going. With its built-in defaults the next request waits for a summary once the context passes the model’s window minus 16,384 tokens, and a background summary starts 32,768 tokens before that.[89][100] When a provider still rejects a request as too long, the code compacts once and tries again.[99] The post adds that “The older messages always stay in storage.”[89]
A handoff is the blunt version: start a new context from a note. In Pi Durable, “reset() goes further: it starts a new context, optionally from a handoff note”, and “Because nothing is deleted, a second tool can still search everything before the handoff.”[89]
Summaries can lose what mattered. Once a compaction block is in place, the summarized messages are removed, and “Claude sees the summary where those messages were.”[148] Anything the summary leaves out, an early instruction included, is no longer in what the model reads. An application can replace the default summarization prompt with its own; Anthropic’s example asks the summarizer to “Preserve every entity and field name agreed so far, and the user's latest open request.”[148] Research is trying to make compaction learned rather than fixed; chapter 13 lists three such papers.[161][162][163]
Chapter 8
The systems compared.
In short: 26 systems, ten questions, one data set: each cell summarizes a cited page, and where the pages are silent the cell says so and names the page we looked in.
The three explainers below draw on one table of 260 cells. Each cell is a plain-sentence summary of the page cited after it, as read on 2 or 3 October 2026. A cell that says Not stated in the sources we read means those pages were silent, which is not proof that no rule or limit exists. Products change often; check the sourcebook dates.
Explainer 1
Where the record lives, and who runs the code
Each system is placed by two rules applied to its row in the table: across, by where its documentation says the durable record is kept; down, by who runs the process that advances the run. Select a name to read the two cells that placed it.
Shapes on the map:
- a durable-execution engine
- an agent framework or library
- a vendor agent or hosted runtime
Select a system on the map, with a click, a tap, or Enter, to see the two cells that placed it. Arrow keys move between systems.
The map as a table, and the placement rules
| Who runs the process | Storage you provide or choose | The engine’s or platform’s service | The vendor’s product |
|---|---|---|---|
| Your process runs it | DBOS, LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, Mastra, Pi Durable | Pydantic AI | none |
| Your code, coordinated by an engine you run or rent | none | Temporal, Restate, Inngest, LangSmith Agent Server | none |
| A platform runs your code | Azure Durable Functions | Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Trigger.dev, Cloudflare Agents SDK | none |
| A vendor’s product runs the agent | Claude Code | none | Claude Managed Agents, OpenAI Agents API, OpenAI Responses background mode, Codex cloud, GitHub Copilot cloud agent, Cursor cloud agents, Devin |
The placement rules. Across: a system goes under Storage you provide or choose when its state cell says the record is kept in a database or storage the user provides or configures, on the machine running it, or in memory unless storage is configured; under The engine’s or platform’s service when the engine’s or platform’s own service keeps it; and under The vendor’s product when the vendor’s product keeps it. Down: by its hosting cell, as a library inside your process, your code coordinated by an engine you run or rent, your code run by a serverless platform, or an agent run by the vendor. A system whose state or hosting cell is silent is listed under the table instead of placed.
Explainer 2
The comparison table
Filter by family, search the cells, choose which questions to show, and sort. Open a system to see all ten answers with their sources and caveats.
Showing all 26 systems and 4 of 10 questions.
| System | Where state is stored | How a run is recovered | Exactly-once or idempotency keys | Who may advance a run | A tool call cut off by a crash | A model request cut off by a crash | Files, processes, and sandboxes | Hosting model | Run length or retention | Human waits and timers |
|---|---|---|---|---|---|---|---|---|---|---|
| TemporalDurable-execution engine | The Temporal Service persists each Workflow Execution's state to its Event History in a persistence store; Temporal Cloud stores event history as Active storage while open and Retained Storage once closed.[10][9][7] Workers also cache Workflow state in memory, but an evicted Workflow is rebuilt by replaying the Event History. | Workflow code is replayed and its Commands are checked against the Event History; completed Activities, whose results are recorded there, are not re-executed, and the run picks up from the last recorded event.[9][2][1] Workflow code must be deterministic; if replayed code generates a Command that does not match the recorded history, the Workflow Execution returns a non-deterministic error. | An Activity is observed as completed exactly once but may execute more than once; Temporal asks for idempotent Activities and suggests the Workflow Run ID plus Activity ID as an idempotency key.[2] The exactly-once observation is stated for an Activity whose Retry Policy allows retries; the idempotency key is enforced by the service the Activity calls. | The History Service queues a Task when a Workflow Execution can progress and Workers poll Task Queues; each Execution maps to one History Shard, which assumes one concurrent operation per partition at a time.[10][9] Later Workflow Tasks go to the Worker that cached the Workflow, through a dedicated Sticky Queue. | Tools that do I/O must run as Activities or Nexus Operations; an Activity whose Worker crashed after finishing but before reporting is retried, so its side effect can repeat.[5][2] Stated for the OpenAI Agents SDK integration; a plain @function_tool runs inside the Workflow and must not do network, database, or file system I/O. | Temporal's docs say to make LLM calls in Activities; in the OpenAI Agents SDK integration, each model call runs as an Activity, so it retries durably and is not repeated during replay.[5][1] Applies when model calls run as Activities; a retried model call is an independently sampled answer, not a continuation of the cut-off one. | In the OpenAI Agents SDK integration, each sandbox operation is an Activity and the session state is serialized with the Workflow, so a Worker restart mid-run resumes against the same sandbox session.[5] Sandbox support is pre-release; LocalShellTool and ComputerTool are not supported because they assume a single long-lived local process. | Temporal is an engine service: you run a self-hosted Temporal Service or use Temporal Cloud, and your own Worker processes poll Task Queues to run Workflow and Activity code.[4][10][2][5] | Event History is capped at 51,200 Events or 50 MB; no time limit is imposed on an execution; closed executions are kept for a Retention Period of at least 1 day.[3][9][10] A warning comes at 10,240 Events or 10 MB; the Retention Period defaults to 3 days when a Namespace is created with the temporal CLI without setting it. | Timers are persisted, so a Workflow waiting on one resumes once its Worker and the Temporal Service are back; Workflows can also wait on a Signal or Update for a person's approval.[8][5] A Timer may be as short as one second or as long as several years, and Workers use no extra resources while waiting. |
| RestateDurable-execution engine | The Restate Server records each step of a handler and its result in a journal, and stores all state and execution history, so the services themselves stay stateless.[11] A single-node server recovers from persistent disk; in a high-availability cluster, other nodes take over without losing execution state. | Restate restarts the failed handler and replays its journal: completed steps are replayed without re-execution, and execution resumes from the first incomplete step.[12][11][14] Replayed code must produce the same journal; otherwise the invocation fails with a journal mismatch error. | Restate's docs say invocations run exactly once and ctx.run side effects execute exactly once; the SDK's doc comment says an action may re-run if a failure hits between success and persisting its result.[11][12][13] Duplicate incoming requests are deduplicated only when the caller adds an idempotency key to the request headers. | Virtual Objects and Workflows have a single-writer guarantee, so only one handler modifies state at a time; a service that cannot send journal entries stops, and the Server retries it on another instance.[11][16] If an exclusive Virtual Object handler sleeps, all other calls to that object are queued; concurrency limits for other invocations are an opt-in flow-control feature. | Tool steps in ctx.run persist their result; an unfinished or failed one is retried with exponential backoff, by default up to 70 attempts before the invocation pauses.[12][11][17] Applies to tool code wrapped in ctx.run; the LangChain middleware does not journal tool calls automatically. | Restate's agent docs wrap every LLM call in ctx.run or a durable middleware; each response is persisted and replayed on recovery, and execution resumes at the first incomplete step.[12] Applies when LLM calls are wrapped as the durable agents page shows, with ctx.run or an integration such as durableCalls, DurableRunner, or RestateAgent. | Services stay stateless: the Restate Server stores all state and execution history and sends it with each request, and if a service crashes or restarts, ongoing executions are retried on new instances.[11] The pages we read do not mention files on a service's disk or a sandbox. | Your services embed the Restate SDK and run on your infrastructure, such as containers, serverless functions, VMs, or Kubernetes; the Restate Server runs as a single node, a cluster, or Restate Cloud.[11] | Journals of completed invocations and idempotency keys are kept 24 hours by default; the timers page says there is no hard limit on how long a handler can sleep.[17][16][14] Retention is tunable; long sleeps keep an invocation on its original deployment, so the docs advise avoiding handlers that run for days or months. | Durable timers survive failures and restarts, and an agent can wait on a durable promise (an awakeable) for human approval, then resume where it left off even if the process restarted.[16][15][11] On FaaS platforms such as AWS Lambda, Restate suspends the handler while it sleeps or waits for external events. |
| DBOSDurable-execution engine | The DBOS library checkpoints workflow inputs and step outputs to a system database: Postgres is recommended for production, and the Python SDK defaults to SQLite.[18][22] In TypeScript, DBOS uses Postgres by default; Conductor does not have access to this database. | DBOS calls each interrupted workflow again with its checkpointed inputs; steps with a checkpoint return the saved output instead of running, and execution continues normally from the first step without one.[18][21] Workflow functions must be deterministic, and with versioning DBOS only recovers workflows whose version matches the running application. | Steps are tried at least once but never re-executed after completing, so DBOS asks for idempotent steps; an assigned workflow ID acts as an idempotency key, so that workflow executes only once.[19][18][20] Transactions commit exactly once, and Java transactional step factories make database-write steps exactly once by committing output and write together. | Each workflow carries the ID of the executor that started it; a restarted executor recovers only its own pending workflows, and Conductor signals another executor to recover an unhealthy executor's workflows.[24][18] Without Conductor in a distributed setup, you assign executor IDs and must recover each workflow only once; enqueued workflows are picked up by processes polling the queue. | A step cut off by a crash has no checkpoint, so it is retried during recovery and may repeat its effect; a step that completed and was checkpointed is never re-executed.[18][20][22] Applies when each tool call is a step, as DBOS's AI quickstart instructs. | DBOS's AI quickstart says to make each LLM call a step; a step interrupted by a crash is retried during recovery, and a completed one returns its checkpointed output.[22][18] Applies when LLM calls are annotated as steps, or wrapped by an integration such as Pydantic AI's DBOSAgent. | Not stated in the sources we read. Looked for in [18][19][20][21][22][23][24][25]. | DBOS is an open-source library inside your application with no separate orchestration server; your processes can run on Kubernetes, EC2, or serverless platforms, and Conductor is a recommended control plane off the execution path.[18] | Conductor can delete completed workflows' history after a time or row threshold and cancel workflows after a global timeout; all three are off by default, and running workflows are never deleted.[25][19] These policies require Conductor; the docs describe durable sleeps lasting days, weeks, or months and very long workflow timeouts. | DBOS.sleep stores its wakeup time in the database and still wakes on schedule after restarts; DBOS.recv durably waits for a message, such as a human approval, across server restarts.[19][23] Messages sent with DBOS.send are persisted, so a send that completes is guaranteed to reach the destination workflow. |
| InngestDurable-execution engine | Inngest saves each completed step's result in the run's state, held by the Inngest server's queue and run-state store, whether in Inngest Cloud or on a self-hosted server.[26][29][30] A self-hosted server without external services keeps queue and run state in an embedded Redis-compatible store and persists to SQLite. | When a run resumes, Inngest re-enters the function and the SDK returns each completed step's saved result instead of running it again; code outside steps can run again.[29][28][26] Saved results are found by step ID, so step IDs must stay stable across deployments. | A step does not make an external action exactly once: if a provider's response is lost, the step can retry the action, so Inngest asks for idempotency keys on writes, payments, and messages.[26] | The Inngest server's runner schedules functions and resumes waits, and its executor runs steps, calling the function code your app serves over HTTP or Connect; flow-control rules such as concurrency limit active work.[30][27] On Inngest Cloud, plans include 5 (Free), 100 (Pro), or 500 (Business) concurrent steps, and a custom number on Enterprise. | Each tool call runs in its own step.run, and Inngest retries only the failed step; a tool that changed an external system before its result was saved can repeat that change.[29] Applies when the tool call is wrapped in step.run, as the durable agents page shows. | Inngest's durable agents page runs each model call in step.run; Inngest saves completed steps, retries only the step that failed, and resumes after a crash without repeating earlier model calls.[29] Applies when model calls are wrapped in step.run, as the durable agents page shows. | Inngest Sandboxes, in beta, run model-written code in an isolated Linux VM; each Sandbox call is a durable step, so a retry reuses the same Sandbox, and files and processes persist between tool calls.[29] In beta; the docs say to pause the Sandbox during approval waits, and you destroy it yourself on success and in a failure handler. | Inngest Cloud or a self-hosted Inngest server runs the engine, and your app hosts the function code separately, on your own servers or a serverless host, serving it through HTTP serve() or Connect; self-hosted single-node mode is labeled beta.[27][30][29] The self-hosting guide does not guarantee direct support for self-hosted instances. | Runs, including sleeps and waits, last at most 30 days on Free, 90 on Pro, 366 on Business, and a custom length on Enterprise; on every plan, run state is capped at 32 MiB and a function at 1,000 steps.[27] These are Inngest Cloud limits; trace and log history is kept 24 hours on Free, 7 days on Pro, 14 days on Business, and up to 365 days on Enterprise. | step.sleep, step.sleepUntil, and step.waitForEvent suspend the run without holding a process, worker, or connection, so an agent can wait days for a person's approval event, with a timeout.[26][29][28] A single sleep can last up to 1 year, within the plan's maximum run length. |
| Cloudflare WorkflowsDurable-execution engine | The Workflows engine persists the state each step returns, so an instance can continue from its last finished step after a network or infrastructure failure.[31][62] Only state returned from steps persists; a Workflow may hibernate and lose all in-memory state. | After an engine restart, completed steps are not rerun: their saved results are reused, keyed by step name. Logic outside steps may run again, and an interrupted step starts over.[31][33] Steps should be named deterministically so their state is cached. | A step might be retried multiple times, so the docs ask that steps be idempotent, for example by checking whether a customer was already charged before charging.[31] The docs call idempotency optional for some uses but recommend always trying to guarantee it. | The platform schedules instances: only running instances count toward the account's concurrency limit, beyond which instances queue; when a running instance starts waiting, a queued one is scheduled.[32] | A step cut off by an engine restart starts over from the beginning of that step; the docs' agent guide wraps each tool call in its own retryable step.[31][33] Side effects inside a retried step can repeat, so the docs ask for idempotent steps. | Cloudflare's durable agent guide makes each LLM call a step: a failed call is retried automatically, and a finished call's response is persisted, so on resume it is skipped.[33] Stated in the Build a Durable AI Agent guide, which says the same patterns apply to any LLM SDK. | A Workflow may hibernate and lose all in-memory state, so state must not be kept outside steps; only what steps return carries over.[31] | Cloudflare runs Workflows on its Workers platform: each Workflow is a Worker script and inherits Workers limits, such as per-invocation CPU time.[32] Workflows cannot be deployed to Workers for Platforms namespaces. | An instance can run forever while each step stays within its CPU limit and the instance stays under the step cap: 1,024 steps on Workers Free; on Workers Paid, 10,000 by default and configurable up to 25,000. step.sleep lasts up to 365 days on both plans.[32] Per-step CPU time is 10 ms on Workers Free, and 30 seconds by default, configurable to 5 minutes, on Workers Paid. Completed instance state and logs are kept 3 days on Workers Free and 30 days on Workers Paid. | step.sleep and step.waitForEvent put an instance in a waiting state; the engine can hibernate it and wakes it for the sleep or event. The agent guide uses waitForEvent() for human approval lasting hours or days.[32][31][33] |
| Vercel WorkflowDurable-execution engine | An event log: every state change in a run is persisted as an event, and state is derived by replaying it. On Vercel, the Vercel World keeps it in managed persistence.[37][40][44] Other Worlds store it elsewhere: the Local World keeps workflow data in a local directory for development and testing, and community Worlds serve self-hosting. | Replay: workflow code re-runs against the event log, which holds each step's result, so the run resumes where it left off instead of starting over.[42][37] | Steps retry, and a retried step can repeat a side effect such as a charge; each step has a stable stepId to use as an idempotency key with third-party APIs.[39] Hook tokens can also deduplicate whole runs while a run is active. | Concurrent invocations can replay the same run and write to one shared event log; a per-run sequencer gives each write a distinct position, and the first recorded outcome counts.[37] Sealed logs apply to runs at specVersion 7 and above, the default for new runs. | If the function running a step crashes before reporting a result, the step is re-tried under its retry policy, by default up to 3 retry attempts, so side effects can repeat.[43][42] The docs name function timeouts, out-of-memory errors, and network issues as causes. | The AI agents guide says Workflow SDK turns LLM calls, tool executions, and other async operations into retryable steps, whose results are persisted for replay.[41][42] Stated for agents built with WorkflowAgent, which runs the agent loop inside a workflow. | Workflow code runs in a sandboxed environment without full Node.js access and is re-run from the event log each time the run resumes, using no compute while suspended. If the function invocation running a step crashes, the step is retried under your retry policy.[42][43] The pages we read do not mention files kept between invocations. | On Vercel, the Vercel World supplies durable storage and managed queuing, and Workflows invoke Vercel Functions billed at compute rates; through Worlds the same code also runs locally or self-hosted.[44][40] Self-hosting relies on community-maintained Worlds or one you build. | No limit on run or sleep duration; every run allows 25,000 events, 10,000 steps, and 2 GB of entity storage, and replay is capped at 240 s. Stream storage size is unlimited. Data in Vercel's managed persistence is kept after a run completes for 1 day on Hobby, 7 days on Pro, and 30 days on Enterprise.[40] These are Vercel's limits; runs past 2,000 events or 1 GB of entity storage replay more slowly. | sleep() suspends a run, and hooks or webhooks pause it until external data, a user action, or an HTTP request arrives; both are stored as entities, and a waiting run resumes even after a deploy.[42][37][38] A waiting run resumes on the deployment that started it, not on newer code. |
| AWS Lambda durable functionsDurable-execution engine | Lambda keeps a checkpoint log of every durable operation, including step results and execution state, and saves it when the function pauses or is interrupted.[48] | Lambda invokes the function again from the beginning and replays the checkpoint log, using stored results for completed operations instead of re-executing them.[48][45] Code must be deterministic during replay. | Steps run at least once by default, so step logic must be idempotent; execution names act as idempotency keys for starting executions, and an at-most-once-per-retry option exists for side effects.[46][49] Neither step semantic guarantees exactly once across the whole workflow. | Lambda drives each execution, invoking the function again whenever it resumes; execution names are unique per account and Region, and a duplicate start with the same payload returns the existing execution.[48][46] A duplicate name with a different payload returns DurableExecutionAlreadyStartedException. | By default a step interrupted before it completes runs again on replay; with at-most-once per retry, the SDK instead marks it interrupted and raises a StepInterrupted error.[46][49] To run a step at most once end to end, combine at-most-once with a no-retry strategy. | AWS's Pydantic AI integration checkpoints each model request and tool call as a durable step, so an interrupted or retried run resumes from the last completed step.[50] Stated for the pydantic-ai-harness integration; a run started outside the durable agent handler checkpoints nothing. | Lambda is designed for compute that does not retain state between invocations, and one durable execution can span many invocations; progress carries over through checkpointed results.[47][48] | Durable functions are regular Lambda functions on Lambda's serverless model, with automatic scaling including scale-to-zero and no infrastructure to manage; SDKs cover JavaScript, TypeScript, Python, and Java.[45][48] Each invocation is still limited by the Lambda function timeout of at most 15 minutes. | The execution timeout defaults to 24 hours, maximum 1 year; an execution allows 3,000 durable operations and 100 MB of written storage; history is kept 1 to 90 days, default 14.[48][47] Retention starts when the execution ends; then Lambda deletes its history and checkpoint data. | Waits pause for a time period, an external callback, or a polled condition without compute charges, which AWS suggests for human-in-the-loop workflows; Lambda then re-invokes the function and replays it.[48][45][46] Waits count against the execution timeout but not the Lambda function timeout. |
| Azure Durable FunctionsDurable-execution engine | An append-only execution history of each orchestration, saved at every checkpoint to the storage provider you configure, such as Azure Storage, MSSQL, or the Azure-managed Durable Task Scheduler.[52] The Azure Storage provider gives no transactional guarantee between tables and queues and relies on eventual consistency patterns. | When an orchestration gets new work, the orchestrator re-executes from the start; activities already in the history replay their recorded results instead of running again, rebuilding local state.[52][51] Orchestrator code must be deterministic for replay to work. | Activities run at least once: if a failure occurs after an activity completes but before its result is recorded, it might run again, so the docs ask for idempotent activity logic, such as upserts.[53] | Each orchestration instance is single-threaded and identified by an instance ID unique within its task hub; durable-entity locks let orchestrations guard critical sections against each other.[52] Critical sections are available for .NET and JavaScript orchestrations in Durable Functions 2.x. | Tool calls go in activities, which run at least once: an interrupted activity can run again, even one that finished before its result was recorded. Retry policies can also retry failed activities.[54][53][52] | Microsoft's agentic patterns put LLM calls in activities, which are checkpointed, so after a crash execution resumes from the last completed step without re-consuming LLM tokens for finished calls.[54] Stated in Microsoft's Agentic application patterns guide for Durable Functions and the Durable Task SDKs. | Orchestrator local state survives process recycles and VM reboots through checkpoints and replay; static variables in Azure Functions are not guaranteed to persist between executions.[52][51] | Durable Functions runs on Azure Functions with serverless hosting; the portable Durable Task SDKs run on any compute, including Azure Container Apps, Kubernetes, virtual machines, or locally, backed by the Durable Task Scheduler.[54][52] Support for the in-process model ends on November 10, 2026. | An orchestration's lifespan can be seconds, days, months, or years, or it can be configured never to end, as an eternal orchestration.[52][51] | Durable timers and external events pause orchestrations; at a wait the orchestrator is unloaded from memory, and a timer firing or an event arriving wakes and replays it. External events suit human interactions.[52][51] Durable timers do not count toward orchestrator execution time. |
| Trigger.devDurable-execution engine | Trigger.dev keeps a record of each run and its attempts; when a task waits, a CRIU checkpoint of its entire state is compressed and stored on disk, and subtask outputs are cached by idempotency key.[58][55] Checkpoints are taken at waits; a wait.for() or wait.until() shorter than 60 seconds doesn't checkpoint. | A run whose worker process crashes is marked Crashed and isn't retried. A task that throws is retried per its retry settings from the beginning, reusing cached subtask results; waits resume from checkpoints.[58][55][60] An out-of-memory failure is retried on a larger machine only if the task sets a retry for out-of-memory errors. | An idempotency key makes repeated triggers of a task start only one run, and subtask outputs are cached by key; a retried task still re-runs its own code from the beginning.[58][55] | Runs wait in queues and are dequeued to workers that execute them, within concurrency limits allocated per environment.[58][57][55] | A worker-process crash marks the run Crashed with no retry; a thrown error retries the task from the beginning under its retry settings, rerunning the call unless a cached subtask made it.[58][55][60] Out-of-memory failures are retried on a larger machine only when the task opts in. | Not stated in the sources we read. Looked for in [55][56][57][58][59][60][61]. | When a task waits, CRIU checkpoints its entire state, including memory, CPU registers, and open file descriptors, then restores it into a new execution environment when the wait ends.[55] Waits shorter than 60 seconds don't checkpoint. | Trigger.dev builds your task code into a Docker image and runs it on Trigger.dev Cloud or your self-hosted instance, in a serverless architecture without timeouts; dev mode runs tasks on your machine.[55] | maxDuration caps CPU time per attempt (minimum 5 seconds), excludes waits, and can be turned off. On Trigger.dev Cloud, a 14-day maximum TTL limits time spent queued, not running time. Logs are kept 1 day on Free, 7 days on Hobby and 30 days on Pro.[56][57] There is no maximum on delay. | wait.for, wait.until, and triggerAndWait pause a task and checkpoint it, releasing its resources, though time waits under 60 seconds don't checkpoint; wait.forToken pauses a run until a token is completed, as for human approvals.[55][59] |
| LangGraphAgent framework or library | A checkpointer you choose saves a snapshot of graph state at each super-step, keyed by thread ID: in memory, SQLite, Postgres, MongoDB, or Azure Cosmos DB.[64][66] InMemorySaver keeps checkpoints in RAM, and they are lost when the process restarts. | After a failure you resume the thread from its last checkpoint; nodes that finished in the failed super-step are not rerun, because their pending writes were stored.[64] It depends on the durability mode: "exit" saves no intermediate state, so a crash mid-run cannot be recovered, and "async" has a small risk of losing a checkpoint. | A resumed node runs again from the start, so the docs ask you to make node logic idempotent with idempotency keys, upserts, or read-before-write checks.[65] Completed task results inside a node are restored from the checkpointer rather than run again. | Not stated in the sources we read. Looked for in [64][65][66][67][68]. | On resume, the node holding the tool call runs again from the start of its function, so code and side effects before the pause run again.[65] Work wrapped in a task that already completed is skipped, because task results are checkpointed. | Model calls live in nodes, which run again from the start when a thread resumes; the docs say replay re-executes nodes after the checkpoint, including any LLM calls.[68][65][64] | Not stated in the sources we read. Looked for in [64][65][66][67][68]. | A framework you install and call from your own code with a checkpointer you configure; LangSmith's Agent Server is a separate option that handles persistence for you.[68][66] With LangSmith's Agent Server, checkpointers and stores are handled for you. | A single execution may run at most 1000 super-steps by default (the recursion limit, since version 1.0.6); checkpoints accumulate until you prune them.[65][66] The recursion limit can be set per run in the config. | interrupt() saves graph state through the checkpointer and waits indefinitely until you resume the thread with Command(resume=...); the interrupted node then reruns from its beginning.[67] It survives a restart only with a persistent checkpointer, which the docs recommend for production. |
| OpenAI Agents SDKAgent framework or library | A paused run's RunState, which your application serializes and stores, for example in a database or queue; conversation history can live in a session store or on OpenAI's servers.[69][72] The SDK resumes from the RunState of a paused run or of a run stopped after a turn. | The core SDK resumes a run from a saved RunState after a pause or an after-turn stop; for runs that must survive process restarts, the docs point to Dapr, Temporal, Restate, and DBOS integrations.[72][69] The docs say a production application must provide recovery that reconciles tool side effects before retrying. | Consuming a stored snapshot once does not guarantee exactly-once tool side effects; the docs ask you to reconcile completed or uncertain side effects before recovery or another run.[70] Stated in the JavaScript SDK's guidance on server-side approval state. | Ownership is left to the application, which must atomically check ownership and consume a pending request so concurrent or replayed submissions cannot resume the same snapshot twice.[70][69] In shared storage, the docs call for a transaction or equivalent atomic conditional transition. | Recovery of an interrupted tool call is left to the application, which the docs say must reconcile tool side effects before retrying.[69][70] | Not stated in the sources we read. Looked for in [69][70][71][72][73][74][151]. | Sandbox agents work in an isolated workspace that later runs can reconnect to through a sandbox session, saved session state, or a snapshot.[74][73] Applies to sandbox agents. | A lightweight package you call from your own code; durable orchestration across process restarts is available through integrations with Dapr, Temporal, Restate, and DBOS.[73][72] | In Python, a run stops after 10 turns by default and raises MaxTurnsExceeded; passing max_turns=None disables the limit.[71][72][151] Turns are agent-loop turns, that is, model calls. With OpenAI-managed conversation state, response objects are kept 30 days by default. | A tool needing approval pauses the run; you store the serialized RunState and resume later, even from another process, without keeping a server running.[69][70] If approvals may sit for a while, the docs ask you to store a version marker with the state. |
| Claude Agent SDKAgent framework or library | The conversation transcript, written by the CLI subprocess as JSONL files on local disk; a SessionStore adapter can mirror transcripts to your own backend.[75][76] In a container, default local disk is lost on restart, scale-down, or a move to another node unless a SessionStore mirrors the transcript. | You resume a stored session yourself after a restart, by session ID or by continuing the most recent session; the agent then has the earlier conversation as context.[75] Session files are local to the machine that created them, so another host needs a SessionStore or a copied session file. | Not stated in the sources we read. Looked for in [75][76][77][78][147][148][149]. | One agent session maps to one subprocess; when scaling out, the docs advise pinning each session to one container by consistent hashing on its session ID.[76] Pinning is advice for long-running sessions served by a pool of containers behind a load balancer. | Not stated in the sources we read. Looked for in [75][76][77][78][147][148][149]. | Not stated in the sources we read. Looked for in [75][76][77][78][147][148][149]. | Sessions keep the conversation, not the filesystem: working-directory files on a container's local disk do not survive a container restart, scale-down, or move to another node.[75][76] A mounted volume or object-store sync can keep working-directory files, and file checkpointing can snapshot and revert the agent's file changes. | An SDK you self-host: your code calls query(), which spawns a claude CLI subprocess on your machine or container; Anthropic's Managed Agents is the hosted alternative.[76] | A session does not time out on its own, and the turn and spend caps (maxTurns and maxBudgetUsd) are off when unset.[76][77] Memory grows over long sessions, so the docs suggest capping session length or recycling subprocesses. | Approval prompts and clarifying questions go to your canUseTool callback, which can stay pending indefinitely while execution stays paused inside the running process.[78] To let the process exit, a PreToolUse hook can return a defer decision, and the run resumes later from the persisted session. |
| Google ADKAgent framework or library | Session events and state are kept by the SessionService you choose: in application memory, in a relational database you manage, or on Google Cloud through VertexAiSessionService.[80] With InMemorySessionService, all conversation data is lost if the application restarts. | A resumable app logs completed steps as events; on resume by invocation ID, ADK reinstates completed events and tool results and restarts the workflow from the partially completed state.[79] Resume must be turned on (ADK Python 1.16 and higher) and is started by your call; custom agents need code changes. | On resume, tools run at least once and may run more than once; the docs ask you to make tools such as purchases check for and prevent duplicate runs.[79] | With DatabaseSessionService, an in-process lock serializes event appends for one session, and on PostgreSQL, MySQL, and MariaDB row-level locks guard against concurrent updates from several processes or replicas.[80] Applies to DatabaseSessionService. | On resume, ADK reinstates the results of tools that returned and re-runs the interrupted tool request, which may therefore run more than once.[79] Only for apps configured as resumable. | Not stated in the sources we read. Looked for in [79][80][81][82][83]. | Not stated in the sources we read. Looked for in [79][80][81][82][83]. | A framework you run yourself, calling its Runner from your code or serving agents with the ADK API server; VertexAiSessionService keeps sessions on Google Cloud.[79][80] | max_llm_calls caps LLM calls per run at 500 by default; 0 or a negative value removes the cap, which the docs do not recommend for production.[82] | Tool Confirmation, an experimental feature, pauses a tool until a person or system answers with a FunctionResponse event, sent through the ADK API server or the runner.[81] Tool Confirmation does not support DatabaseSessionService or VertexAiSessionService. |
| MastraAgent framework or library | Durable agents can checkpoint each run's state as workflow snapshots in the storage configured on Mastra, such as a PostgresStore.[84] By default (recovery.durableAgents: 'off'), only pending, paused, and suspended snapshots are written, not per-step running checkpoints. | Recovery re-drives a run left in running status from its last persisted snapshot, automatically on server start with recovery.durableAgents: 'auto' or manually with recoverActiveRuns().[84] With the default 'off' setting and no custom snapshot policy, running checkpoints are not written, so recovery finds nothing after a crash. | Recovery can reissue LLM calls and re-execute tool calls, including a whole sub-agent run, so the docs ask for idempotent tools or deduplicated external side effects.[84] | No distributed lease or lock yet: with automatic recovery on, every replica races to recover the same runs, so the docs advise your own leader election or a single replica.[84] | When recovery is on, the agent loop re-runs from the last persisted snapshot and can re-execute tool calls; on Inngest, each tool call is a memoized step that Inngest can retry.[84] Without recovery, a crashed run stays in running status with no automatic retry. | Recovery re-runs the agent loop from the last persisted snapshot, which can reissue LLM calls, with real cost.[84] Running checkpoints are written by default only when recovery.durableAgents is 'auto'. | Not stated in the sources we read. Looked for in [84]. | A framework you run in your own server: createDurableAgent() runs in one process, createEventedAgent() runs in the background, and createInngestAgent() runs the workflow on the Inngest platform.[84] | No run-length limit is stated. If you do not call cleanup(), Mastra deletes a run's cached events cleanupTimeoutMs after the run ends; setting it to 0 turns that timer off.[84] | When a tool call needs approval, the workflow suspends and waits for resume(); suspended snapshots are always persisted, so human-in-the-loop resume works without configuration.[84] Inngest agents persist only suspended snapshots, because Inngest's own replay provides durability. |
| Pydantic AIAgent framework or library | The attached durable engine keeps the run's progress, not chat threads; with Temporal, the Temporal Server stores workflow state in its internal database.[85][87] With Temporal, a run is durable only when it executes inside a Temporal workflow. | The engine recovers the run: Temporal replays workflow code against saved inputs and decisions, and completed model requests and tool calls return recorded results instead of running again.[87] With DBOS a recorded step result is replayed on workflow recovery, and with Prefect a task cache hit reuses it. | A durable unit can run more than once when a worker fails after its side effect but before the checkpoint commits, so tools should be idempotent unless the engine offers an at-most-once mode.[86] | With Temporal, workers run the workflow and its activities, while the Temporal Server tracks program execution and preserves its state.[87] Stated for the Temporal integration. | Each tool call runs as its own durable unit, a Temporal activity, which Temporal retries under its retry policy and which restarts from the beginning if it fails part-way.[85][87] An async function tool can opt out of activity wrapping; MCP tools always run in an activity. | Each model request runs as its own durable unit; with Temporal it is an activity whose default retry policy re-executes it without limit.[85][87] Under Temporal, the docs recommend turning off the provider client's own retries. | Files come from a workspace capability you attach; with Temporal, every worker needs a LocalWorkspace directory at the same absolute path on shared storage.[87][86] Stated for the Temporal integration; the backend docs name sandbox operations as a planned future durable unit. | A Python library you embed, made durable by an engine such as a Temporal server; outside a workflow the agent runs as a normal, non-durable agent.[87] | Set by the engine. With Temporal, each payload stored in workflow history is capped at 2MB by default, and an activity with no configured timeout gets a 60-second start_to_close_timeout.[87] Stated for the Temporal integration; activity timeouts can be configured. | A tool needing approval can end the run with DeferredToolRequests; the caller later starts a new run with the message history and results, and in a durable workflow a handler can wait for a signal.[88][87] With Temporal, delays between background polls use durable Temporal timers. |
| Cloudflare Agents SDKAgent framework or library | Agent state, SQL tables, schedules, and fiber checkpoints live in the Durable Object's built-in SQLite storage and survive hibernation and restarts.[62][36] Class fields not stored through setState() or this.sql are lost on eviction. | runFiber() records work in SQLite and stash() saves snapshots; after eviction, onFiberRecovered() receives the last snapshot and your code decides what recovery means. It is not automatic replay.[63][62] AIChatAgent and Think wrap chat turns in fibers automatically; other in-progress work is lost unless it was checkpointed. | startFiber() takes an idempotency key so a retried submission joins or returns the existing job instead of starting a duplicate; recovery after eviction is left to your onFiberRecovered() code.[63][62] startFiber() is a durable acceptance API; an interrupted callback is not replayed automatically. | Each agent is one Durable Object, a single-threaded instance with a unique ID; every wake source for an agent name, such as requests, WebSockets, alarms, and email, routes to that same instance.[36][62][63] Several fibers can run at once inside one agent, each with its own SQLite row. | In Think, an interrupted tool call becomes an errored tool result before the next model call, so the model does not silently re-run it. Elsewhere, an interrupted fiber is not replayed automatically.[34][63] Applies to Think chat turns; repairInterruptedToolPart can change the repaired shape. | AIChatAgent and Think wrap each chat turn in a fiber; after eviction the default persists partial output and continues or retries the turn when safe, with strategies varying by model provider.[62][34] onChatRecovery can return { continue: false } to prevent another model call. | Agent memory is lost on eviction. An attached sandbox container keeps files only while it runs; when it stops, files are gone unless saved as a snapshot.[62][35] The docs' example keeps the container running 10 minutes after the agent goes inactive so files remain for the next turn. | Cloudflare runs each agent as a Durable Object and handles placement, scaling, and recovery; you manage no servers, and a hibernated agent consumes zero compute.[62][36] The SDK is the agents library; its Agent class extends Durable Objects. | keepAlive() suits work measured in minutes, not hours; alarm handlers time out at 15 minutes; an interrupted fiber whose recovery keeps failing is discarded after fiberRecoveryMaxAgeMs, 24 hours by default.[62][63] Agents themselves are described as persisting for days, weeks, or months. | schedule() stores tasks in SQLite and fires alarms that wake a hibernated agent, while setTimeout timers are lost; human approval inside an agent is built yourself with state and WebSockets, or delegated to a Workflow.[62] For waits of hours or days, the docs persist the job ID in state and hibernate until a callback, poll, or workflow completion wakes the agent. |
| Pi DurableAgent framework or library | Conversations, task checkpoints, and documents are committed to a storage backend you choose: memory, SQLite, JSONL, or your own, such as a key-value store or Postgres.[89][91] Memory storage persists nothing; on SQLite, commits survive process crashes, but the newest may be lost on power or host failure. | Every step is a task that stores a checkpoint; after a crash, a new process opens the same storage and continues each unfinished task from its last checkpoint.[89][91][98] Interrupted work stays pending until resume(), a submission, or a wait starts the task scheduler. | A requestId deduplicates submissions within one conversation; task phases and hooks can run again after a crash, so the post uses an idempotency key and first-write-wins memos.[89][95][96] The post calls this an exactly-once submission; a repeated requestId in the same conversation returns the stored submission. | One process owns a storage at a time and other clients attach to that process; there is no cross-process locking.[89][91][103] The demo coding app takes its own file lock, which goes stale 10 s after the process holding it crashes. | An interrupted tool call reruns only if both its stored and its current replay policy say safe (the default is unsafe); otherwise the model is told it was interrupted and may have partially run.[92][94][89][93] A tool that no longer resolves after the restart is treated as unsafe. | An interrupted model request is sent again with no declaration needed; its partial answer stays in the transcript, marked as aborted.[89][99][91] Partial answers are committed at most every 100 ms, so a crash loses at most that window. | Tools work through an execution environment the application supplies, such as your laptop, a remote VM, or an in-memory sandbox; the env function builds it for every tool call.[89] The post says application state, including the sandbox a conversation runs in, lives in documents committed with the transcript. | A library you embed in a JavaScript process. The post says its SQLite and JSONL storage also run on Bun or inside a Cloudflare Durable Object with a small adapter.[89][106] Cloudflare documents a beta PiHarness that runs it in a Durable Object. | No limit on run length, total history, or storage is stated. The post describes a harness that supports infinitely long conversations; compaction bounds the active transcript, and older messages always stay in storage. Each tool result is cut to its tool's output limits before it is stored.[89][106][92] Cloudflare's page notes that Pi Durable cannot delete a conversation yet, and that on its PiHarness one model request that streams for more than 15 minutes can be cut off. | Tasks get timers that survive restarts and can wait on other tasks with no code running; a sleep waits for an absolute wake-up time, which the built-in retry and poll phases keep in their checkpoints.[89][91][98][99][106] There is no built-in approval step for tool calls; the post's approval example asks from a hook and stores the answer in a memo. |
| Claude Managed AgentsVendor agent or hosted runtime | Anthropic keeps each session's event history, conversation, sandbox state, and outputs server-side. History is kept until the session is deleted; sandbox state is kept 30 days from sandbox creation.[108][109] Claude Managed Agents is in beta. | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. | Anthropic's platform runs each session's agent loop, and events you send wait in a queue behind earlier events until the agent processes them.[108][109] | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. | When a session goes idle, its sandbox is checkpointed, keeping the filesystem, installed packages, and files the agent created. After 30 days from sandbox creation, a resumed session starts from a fresh sandbox.[109] Activity does not extend the 30-day window. | A vendor product in beta: Anthropic runs the agent harness, and sessions run in an Anthropic-managed cloud sandbox or a self-hosted sandbox on your own infrastructure; it is also offered on Claude Platform on AWS.[108] Claude Managed Agents is in beta. | Sandbox state is kept 30 days from sandbox creation; session history until deletion. First-party Managed Agents has no autonomous-session runtime limit; on Claude Platform on AWS, a session runs autonomously for up to 6 hours.[109][110] On Claude Platform on AWS, any user-role event reauthenticates the session so it can continue. | A tool call needing confirmation, or a custom tool call, pauses the session as idle with stop reason requires_action until you send a confirmation or result. Sessions and their history persist between interactions.[109] |
| OpenAI Agents APIVendor agent or hosted runtime | OpenAI keeps each session's configuration, conversation, and saved work, including saved messages and tool calls, and says it manages sessions, context compaction, and recovery.[119][113] | For a failed turn, you check saved work, wait until the session is idle, and send a message asking it to continue only unfinished work; a failed session needs a new session.[116][113][114] OpenAI says it manages recovery, but the pages we read do not describe how; after a process crash, the API does not guarantee that pending input is recovered. | Message submissions take an idempotency key, reused on retries. For functions with side effects, you store results by session, turn, and call ID and check the outcome before running one again.[119][118][116] A failed turn may already have changed files or called external tools. | OpenAI's harness runs each session. With a self-hosted sandbox, your application uses one component per session's environment, so repeated or concurrent requests do not create duplicate environments.[113][114] | A mid-turn sandbox disconnect can fail a tool and does not restart a killed command. For a function tool, you check whether a call took effect before running it again.[114][118] The disconnect statements are made for self-hosted sandboxes. | Not stated in the sources we read. Looked for in [113][114][116][117][118][119][151]. | In an OpenAI-hosted sandbox, files persist across turns while the sandbox exists, and files published from its outputs folder stay downloadable after it expires. Self-hosted replacement compute does not get the old files.[117][114] An idle hosted sandbox can be deleted after an hour without activity or keep-alives. | A vendor product: OpenAI runs the Codex harness and keeps sessions; the agent's sandbox is OpenAI-hosted, self-hosted on compute your application manages, or omitted.[113][114] | An OpenAI-hosted sandbox can be deleted once activity and keep-alives stop for an hour; this timeout is not configurable. A self-hosted executor has up to five minutes to connect for new input.[117][114] | When the agent needs a function result or an environment connection, the session reports requires_action and waits. After a disconnect, your application retrieves the session to find pending actions and submits saved results.[119][118] |
| OpenAI Responses background modeVendor agent or hosted runtime | The response runs asynchronously and the client polls it by ID. Even with store=false, response data is stored temporarily, roughly 10 minutes, to allow polling.[115] OpenAI background responses are kept about ten minutes unless stored. | If the client's connection drops, the response keeps running; the client reconnects by polling the response or by resuming a stream after the last sequence number it received.[115] The page covers a dropped client connection, not a failure on OpenAI's side. | Not stated in the sources we read. Looked for in [115][151]. | Not stated in the sources we read. Looked for in [115][151]. | Not stated in the sources we read. Looked for in [115][151]. | The model response runs in the background, so a dropped client connection does not stop it; the client polls or reconnects to the stream later.[115] The page does not say what happens if generation fails on OpenAI's side. | Not stated in the sources we read. Looked for in [115][151]. | A vendor API: setting background to true on a Responses API request makes OpenAI run it asynchronously while the client polls, streams, or cancels it.[115] | With store=false, as in Zero Data Retention projects, response data is kept roughly 10 minutes for polling. In Modified Abuse Monitoring projects, a background response outlives polling only with store=true set explicitly.[115] OpenAI background responses are kept about ten minutes unless stored. | Not stated in the sources we read. Looked for in [115][151]. |
| Codex cloudVendor agent or hosted runtime | Each task has its own workspace in the cloud; an existing task continues with its own saved files, including uncommitted changes and installed tools.[120][121] | Not stated in the sources we read. Looked for in [120][121][151]. | Not stated in the sources we read. Looked for in [120][121][151]. | Each task keeps separate working files, and from Slack or Teams only a follow-up from the same connected account continues a task; another participant's request does not.[121] | Not stated in the sources we read. Looked for in [120][121][151]. | Not stated in the sources we read. Looked for in [120][121][151]. | Each task runs in a VM with its own isolated workspace from the published environment, and keeps its saved files and installed tools; saved VM state is recoverable for up to seven days by default.[121] | A vendor product: OpenAI runs Codex tasks in the cloud from ChatGPT on the web, mobile, or desktop app, so work continues while your computer is asleep.[121][120] | By default, a task's saved VM state is recoverable for up to seven days after you last start a turn or resume the task.[121] | During setup Codex asks you for missing details or access, and tasks started from Slack or Teams can show connection and approval prompts for you to complete.[120][121] |
| Claude CodeVendor agent or hosted runtime | Local sessions are saved continuously to local transcript files, in JSONL, and background sessions keep local background-session state. A reopened cloud session gets a fresh VM with its conversation history restored.[122][124][123] For cloud sessions, the conversation comes back when a reclaimed VM is replaced. | Resuming reloads the saved transcript. If a background session's process exits unexpectedly, the supervisor restarts it; after a machine shutdown, attaching or replying restarts the session from where it left off.[122][124] Past 48 hours since its last progress, a session stopped by a shutdown shows as stopped and asks before resuming. | A tool cut off by a crash is not rerun on resume, and Claude is told to check whether it took effect; agent view never restarts a shell-command row, since that would rerun the command.[122][124] Claude is told to check unless CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set. | A local supervisor runs each background session as its own process; Claude Code won't start a session's process while another live process has its conversation open. Resuming in two terminals interleaves both into one transcript.[124][122] | A tool still running when the process ended neither finishes nor reruns on resume; Claude sees the call marked as cut off and is told to check whether it took effect.[122] Claude is told to check unless CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set. Before v2.1.281, the cut-off call was dropped or shown as one you interrupted. | An interrupted turn continues automatically on resume only when CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set to 1; Claude Code then sends a continuation message instead of resending the prompt.[125][150] Claude Code sets a one-hour bound itself when it restarts a crashed agent view session that inherited its conversation from an interactive session; a turn whose last request failed with an API error resumes only while that error is under six hours old. | Local and background sessions work in your own files; background sessions survive sleep but stop at shutdown. An idle cloud session's VM pauses with its files saved; a reclaimed VM is rebuilt fresh.[142][124][126][123] Background work running when a cloud VM is reclaimed, such as subagents and shell commands, is not restored. | A vendor product: a CLI on your machine, with a local supervisor for background sessions, or cloud sessions on Anthropic-managed VMs or an organization's self-hosted environment.[142][124][123] | Transcripts are kept 30 days by default (cleanupPeriodDays). A foreground command gets 2 minutes by default and up to 10 on request, and an API request times out after 10 minutes. A finished or waiting background session's process stops after about an hour unattended. An idle cloud VM pauses after a few minutes and can later be reclaimed.[122][124][126][125] A stopped background process resumes where it left off on the next attach or reply. | A background session paused on a permission prompt keeps running; after a shutdown, one waiting on your input stays under Needs input. A cloud session's question can be answered until environment expiry.[124][123] A cloud session waiting for an MCP connector approval counts as inactive and can expire during the wait. |
| GitHub Copilot cloud agentVendor agent or hosted runtime | Work is pushed as commits on a branch, and the session log stays on GitHub.com after the session's environment is destroyed.[127][128] | A session that stays stuck times out after an hour. To retry, you unassign and reassign the issue, or post the same pull request comment again.[129] | Not stated in the sources we read. Looked for in [127][128][129]. | Copilot works on one branch at a time and opens exactly one pull request per task; it responds only to comments from people with write access to the repository.[127][129] | Not stated in the sources we read. Looked for in [127][128][129]. | Not stated in the sources we read. Looked for in [127][128][129]. | Each session works in its own ephemeral development environment on GitHub Actions, which is destroyed when the session ends.[127][128] | A vendor product: GitHub runs the agent in a GitHub Actions-powered environment, for repositories hosted on GitHub.[127] | Each session has a maximum execution time of 59 minutes, a hard limit that cannot be extended or bypassed; a shorter timeout can be set with timeout-minutes. The session log remains available on GitHub.com after the session ends.[127][128] A task that exceeds the limit times out and stops. | Follow-up instructions come as @copilot mentions on a pull request assigned to Copilot; the comment is passed to the agent, which then starts new work.[129] |
| Cursor cloud agentsVendor agent or hosted runtime | For every run Cursor stores the conversation history, kept indefinitely by default, and encrypted point-in-time copies of the VM disk; a new run uses the agent's current conversation and workspace state.[130][131] | Not stated in the sources we read. Looked for in [130][131][132]. | Agent creation accepts a client-supplied agentId for idempotent creates: posting the same ID again returns 409 agent_id_conflict instead of creating a duplicate agent.[131] This covers creating agents through the public-beta API, not the agent's tool side effects. | Only one run can be active per agent; starting another while one is creating or running returns 409 agent_busy until it ends or is cancelled.[131] | Not stated in the sources we read. Looked for in [130][131][132]. | Not stated in the sources we read. Looked for in [130][131][132]. | Agents run in isolated VMs whose disks are snapshotted; the workspace persists across runs. A snapshot unused for 90 days is deleted, and each start or resume from it extends that by 90 days.[130][131] | A vendor product: Cursor runs agents in isolated VMs on its AWS infrastructure, and runs can instead use Self-Hosted Machines.[130] | Conversation history is kept indefinitely by default, or 90 days under an Enterprise policy; environment snapshots are deleted after 90 days unused, on every plan. A subscription lasts at most 180 days.[130][132] Custom retention windows such as the 90-day policy are in early access for select Enterprise teams. | An agent can subscribe to pull request activity, CI results, Slack or Linear events, or timers, then end its turn and wake when a matching event arrives as a follow-up.[132] A subscription lasts at most 180 days. |
| DevinVendor agent or hosted runtime | Sessions snapshot to disk when they sleep. In a dynamic workflow, every agent call's result is recorded against a run ID, which is what makes resuming possible.[134][135] The snapshot-on-sleep statement appears on Devin's macOS support page. | An interrupted or timed-out dynamic workflow run resumes by run ID: the script reruns from the top, completed agent calls replay recorded results, and unfinished work runs in new sessions.[135] This describes dynamic workflows; the pages do not describe crash recovery for a single session. | Workflow agent calls are keyed by a hash of prompt, schema, and settings, so the script must make the same calls each time; completed calls replay, while failed agents rerun in new sessions.[135] This describes dynamic workflows. | Not stated in the sources we read. Looked for in [133][134][135]. | Not stated in the sources we read. Looked for in [133][134][135]. | Not stated in the sources we read. Looked for in [133][134][135]. | A session's disk is snapshotted when it sleeps, and everything on disk survives a wake; running processes such as dev servers and simulators do not and must be restarted.[134] Stated on Devin's macOS support page. | A vendor product: each Devin session runs on its own virtual machine, with Linux, Windows, and macOS machines available.[135][134][133] | A session sleeps after 30 minutes of inactivity by default; Enterprise customers can have this set between 5 and 120 minutes. A dynamic workflow run's default and maximum budget is seven days.[133][135] | An idle session sleeps after a period of inactivity and wakes when you send another message. Workflow runs can be set to wait for your approval before each run starts.[133][134][135] That everything on disk survives a wake, and running processes do not, is stated on Devin's macOS support page. |
| LangSmith Agent ServerVendor agent or hosted runtime | Assistants, threads, runs, and cron jobs are stored in PostgreSQL, and checkpoints of graph state are written at each step, in PostgreSQL by default or in MongoDB or a custom backend.[136][64] LangSmith cloud manages the database; on your own infrastructure you set it up yourself. | Checkpoints let an interrupted worker's run resume from the last checkpoint. A run that fails with a retriable error goes back on the queue and resumes from the last checkpointed step.[136][107] Retries stop after BG_JOB_MAX_RETRIES, 3 by default, and the run is then marked failed. | The server runs LangGraph graphs, whose docs say a resumed node runs again from the start, repeating side effects before the pause; they ask for idempotent nodes using idempotency keys, upserts, or read-before-write checks.[65][136] This rule comes from the LangGraph documentation for the graphs the server runs. | A queue worker takes a lease on each run, and the queue allows at most one run per thread at a time; each worker runs up to 10 runs concurrently by default.[136][107] | A tool call inside an unfinished node runs again when the run resumes, because LangGraph restarts the interrupted node from the beginning of its function.[65][107] This rule comes from the LangGraph documentation; the server resumes runs from the last checkpointed step. | A model call inside an unfinished node is made again when the run resumes, since the node restarts from the beginning; LangGraph's docs note that re-executed nodes repeat their LLM calls.[65][64] From the LangGraph documentation for the graphs the server runs. | Server containers are stateless; run data is always read from and written to PostgreSQL, and Redis stores only ephemeral data.[136] | An engine service you deploy with your graphs, a PostgreSQL database, and a task queue: on LangSmith cloud, which manages the database, or self-hosted or hybrid on your own infrastructure.[136][107] | A background run’s timeout, BG_JOB_TIMEOUT_SECS, defaults to 86400 seconds and can be increased, and a run is retried at most 3 times by default. Cloud deployments end API requests after 1 hour, but runs can continue longer.[107][136] Resumable stream output is kept in Redis for 120 seconds by default; no retention period is stated for threads or runs. | Human-in-the-loop pauses use LangGraph interrupts: the thread's state is checkpointed, and a later request resumes it with Command(resume=...). Cron jobs are stored in PostgreSQL with other run data.[64][65][136] |
Without scripts, and in print, every system shows all 10 answers. A system’s name opens its detail panel, with its sources and caveats.
Explainer 3
Two or three systems, side by side
Choose systems to compare. Rows where their answers differ in kind are marked, and a summary names the biggest differences.
Temporal, LangGraph, and Claude Managed Agents differ in kind on 10 of 10 questions. The biggest differences are in where state is stored (Temporal: event history kept by the Temporal Service; LangGraph: checkpoints in a checkpointer you choose, keyed by thread ID; Claude Managed Agents: event history and sandbox state on Anthropic's servers), and in hosting model (Temporal: self-hosted Temporal Service or Temporal Cloud, plus your Workers; LangGraph: framework you install and call from your own code; Claude Managed Agents: hosted harness from Anthropic; cloud or self-hosted sandbox).
| Question | Temporal | LangGraph | Claude Managed Agents |
|---|---|---|---|
| Where state is storedThe answers differ. | The Temporal Service persists each Workflow Execution's state to its Event History in a persistence store; Temporal Cloud stores event history as Active storage while open and Retained Storage once closed.[10][9][7] Workers also cache Workflow state in memory, but an evicted Workflow is rebuilt by replaying the Event History. | A checkpointer you choose saves a snapshot of graph state at each super-step, keyed by thread ID: in memory, SQLite, Postgres, MongoDB, or Azure Cosmos DB.[64][66] InMemorySaver keeps checkpoints in RAM, and they are lost when the process restarts. | Anthropic keeps each session's event history, conversation, sandbox state, and outputs server-side. History is kept until the session is deleted; sandbox state is kept 30 days from sandbox creation.[108][109] Claude Managed Agents is in beta. |
| How a run is recoveredThe answers differ. | Workflow code is replayed and its Commands are checked against the Event History; completed Activities, whose results are recorded there, are not re-executed, and the run picks up from the last recorded event.[9][2][1] Workflow code must be deterministic; if replayed code generates a Command that does not match the recorded history, the Workflow Execution returns a non-deterministic error. | After a failure you resume the thread from its last checkpoint; nodes that finished in the failed super-step are not rerun, because their pending writes were stored.[64] It depends on the durability mode: "exit" saves no intermediate state, so a crash mid-run cannot be recovered, and "async" has a small risk of losing a checkpoint. | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. |
| Exactly-once or idempotency keysThe answers differ. | An Activity is observed as completed exactly once but may execute more than once; Temporal asks for idempotent Activities and suggests the Workflow Run ID plus Activity ID as an idempotency key.[2] The exactly-once observation is stated for an Activity whose Retry Policy allows retries; the idempotency key is enforced by the service the Activity calls. | A resumed node runs again from the start, so the docs ask you to make node logic idempotent with idempotency keys, upserts, or read-before-write checks.[65] Completed task results inside a node are restored from the checkpointer rather than run again. | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. |
| Who may advance a runThe answers differ. | The History Service queues a Task when a Workflow Execution can progress and Workers poll Task Queues; each Execution maps to one History Shard, which assumes one concurrent operation per partition at a time.[10][9] Later Workflow Tasks go to the Worker that cached the Workflow, through a dedicated Sticky Queue. | Not stated in the sources we read. Looked for in [64][65][66][67][68]. | Anthropic's platform runs each session's agent loop, and events you send wait in a queue behind earlier events until the agent processes them.[108][109] |
| A tool call cut off by a crashThe answers differ. | Tools that do I/O must run as Activities or Nexus Operations; an Activity whose Worker crashed after finishing but before reporting is retried, so its side effect can repeat.[5][2] Stated for the OpenAI Agents SDK integration; a plain @function_tool runs inside the Workflow and must not do network, database, or file system I/O. | On resume, the node holding the tool call runs again from the start of its function, so code and side effects before the pause run again.[65] Work wrapped in a task that already completed is skipped, because task results are checkpointed. | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. |
| A model request cut off by a crashThe answers differ. | Temporal's docs say to make LLM calls in Activities; in the OpenAI Agents SDK integration, each model call runs as an Activity, so it retries durably and is not repeated during replay.[5][1] Applies when model calls run as Activities; a retried model call is an independently sampled answer, not a continuation of the cut-off one. | Model calls live in nodes, which run again from the start when a thread resumes; the docs say replay re-executes nodes after the checkpoint, including any LLM calls.[68][65][64] | Not stated in the sources we read. Looked for in [108][109][110][111][112][137]. |
| Files, processes, and sandboxesThe answers differ. | In the OpenAI Agents SDK integration, each sandbox operation is an Activity and the session state is serialized with the Workflow, so a Worker restart mid-run resumes against the same sandbox session.[5] Sandbox support is pre-release; LocalShellTool and ComputerTool are not supported because they assume a single long-lived local process. | Not stated in the sources we read. Looked for in [64][65][66][67][68]. | When a session goes idle, its sandbox is checkpointed, keeping the filesystem, installed packages, and files the agent created. After 30 days from sandbox creation, a resumed session starts from a fresh sandbox.[109] Activity does not extend the 30-day window. |
| Hosting modelThe answers differ. | Temporal is an engine service: you run a self-hosted Temporal Service or use Temporal Cloud, and your own Worker processes poll Task Queues to run Workflow and Activity code.[4][10][2][5] | A framework you install and call from your own code with a checkpointer you configure; LangSmith's Agent Server is a separate option that handles persistence for you.[68][66] With LangSmith's Agent Server, checkpointers and stores are handled for you. | A vendor product in beta: Anthropic runs the agent harness, and sessions run in an Anthropic-managed cloud sandbox or a self-hosted sandbox on your own infrastructure; it is also offered on Claude Platform on AWS.[108] Claude Managed Agents is in beta. |
| Run length or retentionThe answers differ. | Event History is capped at 51,200 Events or 50 MB; no time limit is imposed on an execution; closed executions are kept for a Retention Period of at least 1 day.[3][9][10] A warning comes at 10,240 Events or 10 MB; the Retention Period defaults to 3 days when a Namespace is created with the temporal CLI without setting it. | A single execution may run at most 1000 super-steps by default (the recursion limit, since version 1.0.6); checkpoints accumulate until you prune them.[65][66] The recursion limit can be set per run in the config. | Sandbox state is kept 30 days from sandbox creation; session history until deletion. First-party Managed Agents has no autonomous-session runtime limit; on Claude Platform on AWS, a session runs autonomously for up to 6 hours.[109][110] On Claude Platform on AWS, any user-role event reauthenticates the session so it can continue. |
| Human waits and timersThe answers differ. | Timers are persisted, so a Workflow waiting on one resumes once its Worker and the Temporal Service are back; Workflows can also wait on a Signal or Update for a person's approval.[8][5] A Timer may be as short as one second or as long as several years, and Workers use no extra resources while waiting. | interrupt() saves graph state through the checkpointer and waits indefinitely until you resume the thread with Command(resume=...); the interrupted node then reruns from its beginning.[67] It survives a restart only with a persistent checkpointer, which the docs recommend for production. | A tool call needing confirmation, or a custom tool call, pauses the session as idle with stop reason requires_action until you send a confirmation or result. Sessions and their history persist between interactions.[109] |
System notes
Every system’s answers, sources, qualifiers, and caveats, one folded panel per system. The detail panel in the table shows the same notes.
Durable-execution engines
Temporal
Temporal runs Workflow Executions, durable function executions whose state a Temporal Service persists to an Event History while your Worker processes run the code.[9][10][2]
- Where state is stored
- The Temporal Service persists each Workflow Execution's state to its Event History in a persistence store; Temporal Cloud stores event history as Active storage while open and Retained Storage once closed.[10][9][7] Workers also cache Workflow state in memory, but an evicted Workflow is rebuilt by replaying the Event History.
- How a run is recovered
- Workflow code is replayed and its Commands are checked against the Event History; completed Activities, whose results are recorded there, are not re-executed, and the run picks up from the last recorded event.[9][2][1] Workflow code must be deterministic; if replayed code generates a Command that does not match the recorded history, the Workflow Execution returns a non-deterministic error.
- Exactly-once or idempotency keys
- An Activity is observed as completed exactly once but may execute more than once; Temporal asks for idempotent Activities and suggests the Workflow Run ID plus Activity ID as an idempotency key.[2] The exactly-once observation is stated for an Activity whose Retry Policy allows retries; the idempotency key is enforced by the service the Activity calls.
- Who may advance a run
- The History Service queues a Task when a Workflow Execution can progress and Workers poll Task Queues; each Execution maps to one History Shard, which assumes one concurrent operation per partition at a time.[10][9] Later Workflow Tasks go to the Worker that cached the Workflow, through a dedicated Sticky Queue.
- A tool call cut off by a crash
- Tools that do I/O must run as Activities or Nexus Operations; an Activity whose Worker crashed after finishing but before reporting is retried, so its side effect can repeat.[5][2] Stated for the OpenAI Agents SDK integration; a plain @function_tool runs inside the Workflow and must not do network, database, or file system I/O.
- A model request cut off by a crash
- Temporal's docs say to make LLM calls in Activities; in the OpenAI Agents SDK integration, each model call runs as an Activity, so it retries durably and is not repeated during replay.[5][1] Applies when model calls run as Activities; a retried model call is an independently sampled answer, not a continuation of the cut-off one.
- Files, processes, and sandboxes
- In the OpenAI Agents SDK integration, each sandbox operation is an Activity and the session state is serialized with the Workflow, so a Worker restart mid-run resumes against the same sandbox session.[5] Sandbox support is pre-release; LocalShellTool and ComputerTool are not supported because they assume a single long-lived local process.
- Hosting model
- Temporal is an engine service: you run a self-hosted Temporal Service or use Temporal Cloud, and your own Worker processes poll Task Queues to run Workflow and Activity code.[4][10][2][5]
- Run length or retention
- Event History is capped at 51,200 Events or 50 MB; no time limit is imposed on an execution; closed executions are kept for a Retention Period of at least 1 day.[3][9][10] A warning comes at 10,240 Events or 10 MB; the Retention Period defaults to 3 days when a Namespace is created with the temporal CLI without setting it.
- Human waits and timers
- Timers are persisted, so a Workflow waiting on one resumes once its Worker and the Temporal Service are back; Workflows can also wait on a Signal or Update for a person's approval.[8][5] A Timer may be as short as one second or as long as several years, and Workers use no extra resources while waiting.
Caveats
- A non-determinism error after a code change stops affected Executions from making progress, and it does not clear up on its own.[4]
- Local Activities are not recorded in Event History between Workflow Task heartbeats, so a rescheduled Workflow Task runs them again from the beginning.[4]
- A long chat-style agent can reach the per-Workflow Event History limit, so the integration uses Continue-As-New to start a fresh Execution that carries the history forward.[5]
Restate
Restate is a durable execution engine: the Restate Server sits in front of your services, journals each step of a handler, and replays the journal after a failure.[11]
- Where state is stored
- The Restate Server records each step of a handler and its result in a journal, and stores all state and execution history, so the services themselves stay stateless.[11] A single-node server recovers from persistent disk; in a high-availability cluster, other nodes take over without losing execution state.
- How a run is recovered
- Restate restarts the failed handler and replays its journal: completed steps are replayed without re-execution, and execution resumes from the first incomplete step.[12][11][14] Replayed code must produce the same journal; otherwise the invocation fails with a journal mismatch error.
- Exactly-once or idempotency keys
- Restate's docs say invocations run exactly once and ctx.run side effects execute exactly once; the SDK's doc comment says an action may re-run if a failure hits between success and persisting its result.[11][12][13] Duplicate incoming requests are deduplicated only when the caller adds an idempotency key to the request headers.
- Who may advance a run
- Virtual Objects and Workflows have a single-writer guarantee, so only one handler modifies state at a time; a service that cannot send journal entries stops, and the Server retries it on another instance.[11][16] If an exclusive Virtual Object handler sleeps, all other calls to that object are queued; concurrency limits for other invocations are an opt-in flow-control feature.
- A tool call cut off by a crash
- Tool steps in ctx.run persist their result; an unfinished or failed one is retried with exponential backoff, by default up to 70 attempts before the invocation pauses.[12][11][17] Applies to tool code wrapped in ctx.run; the LangChain middleware does not journal tool calls automatically.
- A model request cut off by a crash
- Restate's agent docs wrap every LLM call in ctx.run or a durable middleware; each response is persisted and replayed on recovery, and execution resumes at the first incomplete step.[12] Applies when LLM calls are wrapped as the durable agents page shows, with ctx.run or an integration such as durableCalls, DurableRunner, or RestateAgent.
- Files, processes, and sandboxes
- Services stay stateless: the Restate Server stores all state and execution history and sends it with each request, and if a service crashes or restarts, ongoing executions are retried on new instances.[11] The pages we read do not mention files on a service's disk or a sandbox.
- Hosting model
- Your services embed the Restate SDK and run on your infrastructure, such as containers, serverless functions, VMs, or Kubernetes; the Restate Server runs as a single node, a cluster, or Restate Cloud.[11]
- Run length or retention
- Journals of completed invocations and idempotency keys are kept 24 hours by default; the timers page says there is no hard limit on how long a handler can sleep.[17][16][14] Retention is tunable; long sleeps keep an invocation on its original deployment, so the docs advise avoiding handlers that run for days or months.
- Human waits and timers
- Durable timers survive failures and restarts, and an agent can wait on a durable promise (an awakeable) for human approval, then resume where it left off even if the process restarted.[16][15][11] On FaaS platforms such as AWS Lambda, Restate suspends the handler while it sleeps or waits for external events.
Caveats
- The TypeScript SDK's doc comment says an action in ctx.run may run again if a failure occurs after it succeeds but before its result is persisted.[13]
- In-flight invocations stay on the deployment where they started, so long-running handlers require keeping old deployments until they finish.[14]
- When retry attempts run out, the default is to pause the invocation for a manual resume; configuring it to be killed instead skips compensation logic.[17]
DBOS
DBOS is an open-source library you install into your application; it checkpoints workflows and steps to a database and uses those checkpoints to recover workflows after failures.[18]
- Where state is stored
- The DBOS library checkpoints workflow inputs and step outputs to a system database: Postgres is recommended for production, and the Python SDK defaults to SQLite.[18][22] In TypeScript, DBOS uses Postgres by default; Conductor does not have access to this database.
- How a run is recovered
- DBOS calls each interrupted workflow again with its checkpointed inputs; steps with a checkpoint return the saved output instead of running, and execution continues normally from the first step without one.[18][21] Workflow functions must be deterministic, and with versioning DBOS only recovers workflows whose version matches the running application.
- Exactly-once or idempotency keys
- Steps are tried at least once but never re-executed after completing, so DBOS asks for idempotent steps; an assigned workflow ID acts as an idempotency key, so that workflow executes only once.[19][18][20] Transactions commit exactly once, and Java transactional step factories make database-write steps exactly once by committing output and write together.
- Who may advance a run
- Each workflow carries the ID of the executor that started it; a restarted executor recovers only its own pending workflows, and Conductor signals another executor to recover an unhealthy executor's workflows.[24][18] Without Conductor in a distributed setup, you assign executor IDs and must recover each workflow only once; enqueued workflows are picked up by processes polling the queue.
- A tool call cut off by a crash
- A step cut off by a crash has no checkpoint, so it is retried during recovery and may repeat its effect; a step that completed and was checkpointed is never re-executed.[18][20][22] Applies when each tool call is a step, as DBOS's AI quickstart instructs.
- A model request cut off by a crash
- DBOS's AI quickstart says to make each LLM call a step; a step interrupted by a crash is retried during recovery, and a completed one returns its checkpointed output.[22][18] Applies when LLM calls are annotated as steps, or wrapped by an integration such as Pydantic AI's DBOSAgent.
- Files, processes, and sandboxes
- Not stated in the sources we read. Looked for in [18][19][20][21][22][23][24][25].
- Hosting model
- DBOS is an open-source library inside your application with no separate orchestration server; your processes can run on Kubernetes, EC2, or serverless platforms, and Conductor is a recommended control plane off the execution path.[18]
- Run length or retention
- Conductor can delete completed workflows' history after a time or row threshold and cancel workflows after a global timeout; all three are off by default, and running workflows are never deleted.[25][19] These policies require Conductor; the docs describe durable sleeps lasting days, weeks, or months and very long workflow timeouts.
- Human waits and timers
- DBOS.sleep stores its wakeup time in the database and still wakes on schedule after restarts; DBOS.recv durably waits for a message, such as a human approval, across server restarts.[19][23] Messages sent with DBOS.send are persisted, so a send that completes is guaranteed to reach the destination workflow.
Caveats
- A step that writes to a database and crashes before its checkpoint is saved runs again on recovery and can write twice; Java transactional step factories commit the output and the write in one transaction.[20]
- An uncaught exception ends a workflow with status ERROR, and DBOS does not recover it.[19]
- With versioning, a workflow only recovers on processes running the application version it started on.[21]
- On files, the architecture page only advises keeping large ones in blob storage such as S3 and having steps return pointers to them, because the size of each checkpoint write follows the size of a step's output.[18]
Inngest
Inngest runs durable functions: an Inngest server, in Inngest Cloud or self-hosted, schedules runs and records each step's result, while your app serves the function code.[30][27]
- Where state is stored
- Inngest saves each completed step's result in the run's state, held by the Inngest server's queue and run-state store, whether in Inngest Cloud or on a self-hosted server.[26][29][30] A self-hosted server without external services keeps queue and run state in an embedded Redis-compatible store and persists to SQLite.
- How a run is recovered
- When a run resumes, Inngest re-enters the function and the SDK returns each completed step's saved result instead of running it again; code outside steps can run again.[29][28][26] Saved results are found by step ID, so step IDs must stay stable across deployments.
- Exactly-once or idempotency keys
- A step does not make an external action exactly once: if a provider's response is lost, the step can retry the action, so Inngest asks for idempotency keys on writes, payments, and messages.[26]
- Who may advance a run
- The Inngest server's runner schedules functions and resumes waits, and its executor runs steps, calling the function code your app serves over HTTP or Connect; flow-control rules such as concurrency limit active work.[30][27] On Inngest Cloud, plans include 5 (Free), 100 (Pro), or 500 (Business) concurrent steps, and a custom number on Enterprise.
- A tool call cut off by a crash
- Each tool call runs in its own step.run, and Inngest retries only the failed step; a tool that changed an external system before its result was saved can repeat that change.[29] Applies when the tool call is wrapped in step.run, as the durable agents page shows.
- A model request cut off by a crash
- Inngest's durable agents page runs each model call in step.run; Inngest saves completed steps, retries only the step that failed, and resumes after a crash without repeating earlier model calls.[29] Applies when model calls are wrapped in step.run, as the durable agents page shows.
- Files, processes, and sandboxes
- Inngest Sandboxes, in beta, run model-written code in an isolated Linux VM; each Sandbox call is a durable step, so a retry reuses the same Sandbox, and files and processes persist between tool calls.[29] In beta; the docs say to pause the Sandbox during approval waits, and you destroy it yourself on success and in a failure handler.
- Hosting model
- Inngest Cloud or a self-hosted Inngest server runs the engine, and your app hosts the function code separately, on your own servers or a serverless host, serving it through HTTP serve() or Connect; self-hosted single-node mode is labeled beta.[27][30][29] The self-hosting guide does not guarantee direct support for self-hosted instances.
- Run length or retention
- Runs, including sleeps and waits, last at most 30 days on Free, 90 on Pro, 366 on Business, and a custom length on Enterprise; on every plan, run state is capped at 32 MiB and a function at 1,000 steps.[27] These are Inngest Cloud limits; trace and log history is kept 24 hours on Free, 7 days on Pro, 14 days on Business, and up to 365 days on Enterprise.
- Human waits and timers
- step.sleep, step.sleepUntil, and step.waitForEvent suspend the run without holding a process, worker, or connection, so an agent can wait days for a person's approval event, with a timeout.[26][29][28] A single sleep can last up to 1 year, within the plan's maximum run length.
Caveats
- Changing a step's ID makes an in-progress run execute it as new work, which can repeat a payment, email, or resource creation.[28]
- A step can run for at most 2 hours, or less if the function host has a shorter timeout.[26]
- On a self-hosted server, PostgreSQL rows for events, runs, and traces are not removed automatically.[30]
Cloudflare Workflows
Cloudflare Workflows runs multi-step programs on Cloudflare Workers: a Workflow is a Worker script whose work is split into individually retryable steps that can persist state.[31][32]
- Where state is stored
- The Workflows engine persists the state each step returns, so an instance can continue from its last finished step after a network or infrastructure failure.[31][62] Only state returned from steps persists; a Workflow may hibernate and lose all in-memory state.
- How a run is recovered
- After an engine restart, completed steps are not rerun: their saved results are reused, keyed by step name. Logic outside steps may run again, and an interrupted step starts over.[31][33] Steps should be named deterministically so their state is cached.
- Exactly-once or idempotency keys
- A step might be retried multiple times, so the docs ask that steps be idempotent, for example by checking whether a customer was already charged before charging.[31] The docs call idempotency optional for some uses but recommend always trying to guarantee it.
- Who may advance a run
- The platform schedules instances: only running instances count toward the account's concurrency limit, beyond which instances queue; when a running instance starts waiting, a queued one is scheduled.[32]
- A tool call cut off by a crash
- A step cut off by an engine restart starts over from the beginning of that step; the docs' agent guide wraps each tool call in its own retryable step.[31][33] Side effects inside a retried step can repeat, so the docs ask for idempotent steps.
- A model request cut off by a crash
- Cloudflare's durable agent guide makes each LLM call a step: a failed call is retried automatically, and a finished call's response is persisted, so on resume it is skipped.[33] Stated in the Build a Durable AI Agent guide, which says the same patterns apply to any LLM SDK.
- Files, processes, and sandboxes
- A Workflow may hibernate and lose all in-memory state, so state must not be kept outside steps; only what steps return carries over.[31]
- Hosting model
- Cloudflare runs Workflows on its Workers platform: each Workflow is a Worker script and inherits Workers limits, such as per-invocation CPU time.[32] Workflows cannot be deployed to Workers for Platforms namespaces.
- Run length or retention
- An instance can run forever while each step stays within its CPU limit and the instance stays under the step cap: 1,024 steps on Workers Free; on Workers Paid, 10,000 by default and configurable up to 25,000. step.sleep lasts up to 365 days on both plans.[32] Per-step CPU time is 10 ms on Workers Free, and 30 seconds by default, configurable to 5 minutes, on Workers Paid. Completed instance state and logs are kept 3 days on Workers Free and 30 days on Workers Paid.
- Human waits and timers
- step.sleep and step.waitForEvent put an instance in a waiting state; the engine can hibernate it and wakes it for the sleep or event. The agent guide uses waitForEvent() for human approval lasting hours or days.[32][31][33]
Caveats
Vercel Workflow
Vercel Workflow (the Workflow SDK) is a programming model for durable functions: every state change is recorded in an event log, and workflow code is replayed against it after suspensions and failures.[42][37]
- Where state is stored
- An event log: every state change in a run is persisted as an event, and state is derived by replaying it. On Vercel, the Vercel World keeps it in managed persistence.[37][40][44] Other Worlds store it elsewhere: the Local World keeps workflow data in a local directory for development and testing, and community Worlds serve self-hosting.
- How a run is recovered
- Replay: workflow code re-runs against the event log, which holds each step's result, so the run resumes where it left off instead of starting over.[42][37]
- Exactly-once or idempotency keys
- Steps retry, and a retried step can repeat a side effect such as a charge; each step has a stable stepId to use as an idempotency key with third-party APIs.[39] Hook tokens can also deduplicate whole runs while a run is active.
- Who may advance a run
- Concurrent invocations can replay the same run and write to one shared event log; a per-run sequencer gives each write a distinct position, and the first recorded outcome counts.[37] Sealed logs apply to runs at specVersion 7 and above, the default for new runs.
- A tool call cut off by a crash
- If the function running a step crashes before reporting a result, the step is re-tried under its retry policy, by default up to 3 retry attempts, so side effects can repeat.[43][42] The docs name function timeouts, out-of-memory errors, and network issues as causes.
- A model request cut off by a crash
- The AI agents guide says Workflow SDK turns LLM calls, tool executions, and other async operations into retryable steps, whose results are persisted for replay.[41][42] Stated for agents built with WorkflowAgent, which runs the agent loop inside a workflow.
- Files, processes, and sandboxes
- Workflow code runs in a sandboxed environment without full Node.js access and is re-run from the event log each time the run resumes, using no compute while suspended. If the function invocation running a step crashes, the step is retried under your retry policy.[42][43] The pages we read do not mention files kept between invocations.
- Hosting model
- On Vercel, the Vercel World supplies durable storage and managed queuing, and Workflows invoke Vercel Functions billed at compute rates; through Worlds the same code also runs locally or self-hosted.[44][40] Self-hosting relies on community-maintained Worlds or one you build.
- Run length or retention
- No limit on run or sleep duration; every run allows 25,000 events, 10,000 steps, and 2 GB of entity storage, and replay is capped at 240 s. Stream storage size is unlimited. Data in Vercel's managed persistence is kept after a run completes for 1 day on Hobby, 7 days on Pro, and 30 days on Enterprise.[40] These are Vercel's limits; runs past 2,000 events or 1 GB of entity storage replay more slowly.
- Human waits and timers
- sleep() suspends a run, and hooks or webhooks pause it until external data, a user action, or an HTTP request arrives; both are stored as entities, and a waiting run resumes even after a deploy.[42][37][38] A waiting run resumes on the deployment that started it, not on newer code.
Caveats
AWS Lambda durable functions
AWS Lambda durable functions are regular Lambda functions that use a durable execution SDK to checkpoint steps and waits and recover by replay, for executions of up to one year.[45]
- Where state is stored
- Lambda keeps a checkpoint log of every durable operation, including step results and execution state, and saves it when the function pauses or is interrupted.[48]
- How a run is recovered
- Lambda invokes the function again from the beginning and replays the checkpoint log, using stored results for completed operations instead of re-executing them.[48][45] Code must be deterministic during replay.
- Exactly-once or idempotency keys
- Steps run at least once by default, so step logic must be idempotent; execution names act as idempotency keys for starting executions, and an at-most-once-per-retry option exists for side effects.[46][49] Neither step semantic guarantees exactly once across the whole workflow.
- Who may advance a run
- Lambda drives each execution, invoking the function again whenever it resumes; execution names are unique per account and Region, and a duplicate start with the same payload returns the existing execution.[48][46] A duplicate name with a different payload returns DurableExecutionAlreadyStartedException.
- A tool call cut off by a crash
- By default a step interrupted before it completes runs again on replay; with at-most-once per retry, the SDK instead marks it interrupted and raises a StepInterrupted error.[46][49] To run a step at most once end to end, combine at-most-once with a no-retry strategy.
- A model request cut off by a crash
- AWS's Pydantic AI integration checkpoints each model request and tool call as a durable step, so an interrupted or retried run resumes from the last completed step.[50] Stated for the pydantic-ai-harness integration; a run started outside the durable agent handler checkpoints nothing.
- Files, processes, and sandboxes
- Lambda is designed for compute that does not retain state between invocations, and one durable execution can span many invocations; progress carries over through checkpointed results.[47][48]
- Hosting model
- Durable functions are regular Lambda functions on Lambda's serverless model, with automatic scaling including scale-to-zero and no infrastructure to manage; SDKs cover JavaScript, TypeScript, Python, and Java.[45][48] Each invocation is still limited by the Lambda function timeout of at most 15 minutes.
- Run length or retention
- The execution timeout defaults to 24 hours, maximum 1 year; an execution allows 3,000 durable operations and 100 MB of written storage; history is kept 1 to 90 days, default 14.[48][47] Retention starts when the execution ends; then Lambda deletes its history and checkpoint data.
- Human waits and timers
- Waits pause for a time period, an external callback, or a polled condition without compute charges, which AWS suggests for human-in-the-loop workflows; Lambda then re-invokes the function and replays it.[48][45][46] Waits count against the execution timeout but not the Lambda function timeout.
Caveats
Azure Durable Functions
Azure Durable Functions is an extension of Azure Functions for stateful orchestrations; the same Durable Task model is also offered as portable SDKs backed by the Durable Task Scheduler.[53][52]
- Where state is stored
- An append-only execution history of each orchestration, saved at every checkpoint to the storage provider you configure, such as Azure Storage, MSSQL, or the Azure-managed Durable Task Scheduler.[52] The Azure Storage provider gives no transactional guarantee between tables and queues and relies on eventual consistency patterns.
- How a run is recovered
- When an orchestration gets new work, the orchestrator re-executes from the start; activities already in the history replay their recorded results instead of running again, rebuilding local state.[52][51] Orchestrator code must be deterministic for replay to work.
- Exactly-once or idempotency keys
- Activities run at least once: if a failure occurs after an activity completes but before its result is recorded, it might run again, so the docs ask for idempotent activity logic, such as upserts.[53]
- Who may advance a run
- Each orchestration instance is single-threaded and identified by an instance ID unique within its task hub; durable-entity locks let orchestrations guard critical sections against each other.[52] Critical sections are available for .NET and JavaScript orchestrations in Durable Functions 2.x.
- A tool call cut off by a crash
- Tool calls go in activities, which run at least once: an interrupted activity can run again, even one that finished before its result was recorded. Retry policies can also retry failed activities.[54][53][52]
- A model request cut off by a crash
- Microsoft's agentic patterns put LLM calls in activities, which are checkpointed, so after a crash execution resumes from the last completed step without re-consuming LLM tokens for finished calls.[54] Stated in Microsoft's Agentic application patterns guide for Durable Functions and the Durable Task SDKs.
- Files, processes, and sandboxes
- Orchestrator local state survives process recycles and VM reboots through checkpoints and replay; static variables in Azure Functions are not guaranteed to persist between executions.[52][51]
- Hosting model
- Durable Functions runs on Azure Functions with serverless hosting; the portable Durable Task SDKs run on any compute, including Azure Container Apps, Kubernetes, virtual machines, or locally, backed by the Durable Task Scheduler.[54][52] Support for the in-process model ends on November 10, 2026.
- Run length or retention
- An orchestration's lifespan can be seconds, days, months, or years, or it can be configured never to end, as an eternal orchestration.[52][51]
- Human waits and timers
- Durable timers and external events pause orchestrations; at a wait the orchestrator is unloaded from memory, and a timer firing or an event arriving wakes and replays it. External events suit human interactions.[52][51] Durable timers do not count toward orchestrator execution time.
Caveats
Trigger.dev
Trigger.dev runs long-running background tasks for your application on Trigger.dev Cloud or a self-hosted instance, pausing waiting tasks with process checkpoints.[55]
- Where state is stored
- Trigger.dev keeps a record of each run and its attempts; when a task waits, a CRIU checkpoint of its entire state is compressed and stored on disk, and subtask outputs are cached by idempotency key.[58][55] Checkpoints are taken at waits; a wait.for() or wait.until() shorter than 60 seconds doesn't checkpoint.
- How a run is recovered
- A run whose worker process crashes is marked Crashed and isn't retried. A task that throws is retried per its retry settings from the beginning, reusing cached subtask results; waits resume from checkpoints.[58][55][60] An out-of-memory failure is retried on a larger machine only if the task sets a retry for out-of-memory errors.
- Exactly-once or idempotency keys
- An idempotency key makes repeated triggers of a task start only one run, and subtask outputs are cached by key; a retried task still re-runs its own code from the beginning.[58][55]
- Who may advance a run
- Runs wait in queues and are dequeued to workers that execute them, within concurrency limits allocated per environment.[58][57][55]
- A tool call cut off by a crash
- A worker-process crash marks the run Crashed with no retry; a thrown error retries the task from the beginning under its retry settings, rerunning the call unless a cached subtask made it.[58][55][60] Out-of-memory failures are retried on a larger machine only when the task opts in.
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [55][56][57][58][59][60][61].
- Files, processes, and sandboxes
- When a task waits, CRIU checkpoints its entire state, including memory, CPU registers, and open file descriptors, then restores it into a new execution environment when the wait ends.[55] Waits shorter than 60 seconds don't checkpoint.
- Hosting model
- Trigger.dev builds your task code into a Docker image and runs it on Trigger.dev Cloud or your self-hosted instance, in a serverless architecture without timeouts; dev mode runs tasks on your machine.[55]
- Run length or retention
- maxDuration caps CPU time per attempt (minimum 5 seconds), excludes waits, and can be turned off. On Trigger.dev Cloud, a 14-day maximum TTL limits time spent queued, not running time. Logs are kept 1 day on Free, 7 days on Hobby and 30 days on Pro.[56][57] There is no maximum on delay.
- Human waits and timers
- wait.for, wait.until, and triggerAndWait pause a task and checkpoint it, releasing its resources, though time waits under 60 seconds don't checkpoint; wait.forToken pauses a run until a token is completed, as for human approvals.[55][59]
Caveats
Agent frameworks and libraries
LangGraph
A low-level orchestration framework and runtime for long-running, stateful agents built as graphs, with durable execution, streaming, and human-in-the-loop support.[68]
- Where state is stored
- A checkpointer you choose saves a snapshot of graph state at each super-step, keyed by thread ID: in memory, SQLite, Postgres, MongoDB, or Azure Cosmos DB.[64][66] InMemorySaver keeps checkpoints in RAM, and they are lost when the process restarts.
- How a run is recovered
- After a failure you resume the thread from its last checkpoint; nodes that finished in the failed super-step are not rerun, because their pending writes were stored.[64] It depends on the durability mode: "exit" saves no intermediate state, so a crash mid-run cannot be recovered, and "async" has a small risk of losing a checkpoint.
- Exactly-once or idempotency keys
- A resumed node runs again from the start, so the docs ask you to make node logic idempotent with idempotency keys, upserts, or read-before-write checks.[65] Completed task results inside a node are restored from the checkpointer rather than run again.
- Who may advance a run
- Not stated in the sources we read. Looked for in [64][65][66][67][68].
- A tool call cut off by a crash
- On resume, the node holding the tool call runs again from the start of its function, so code and side effects before the pause run again.[65] Work wrapped in a task that already completed is skipped, because task results are checkpointed.
- A model request cut off by a crash
- Model calls live in nodes, which run again from the start when a thread resumes; the docs say replay re-executes nodes after the checkpoint, including any LLM calls.[68][65][64]
- Files, processes, and sandboxes
- Not stated in the sources we read. Looked for in [64][65][66][67][68].
- Hosting model
- A framework you install and call from your own code with a checkpointer you configure; LangSmith's Agent Server is a separate option that handles persistence for you.[68][66] With LangSmith's Agent Server, checkpointers and stores are handled for you.
- Run length or retention
- A single execution may run at most 1000 super-steps by default (the recursion limit, since version 1.0.6); checkpoints accumulate until you prune them.[65][66] The recursion limit can be set per run in the config.
- Human waits and timers
- interrupt() saves graph state through the checkpointer and waits indefinitely until you resume the thread with Command(resume=...); the interrupted node then reruns from its beginning.[67] It survives a restart only with a persistent checkpointer, which the docs recommend for production.
Caveats
OpenAI Agents SDK
OpenAI's lightweight package for building agent apps, in which a Runner drives the loop of model calls, tool calls, and handoffs.[73][72]
- Where state is stored
- A paused run's RunState, which your application serializes and stores, for example in a database or queue; conversation history can live in a session store or on OpenAI's servers.[69][72] The SDK resumes from the RunState of a paused run or of a run stopped after a turn.
- How a run is recovered
- The core SDK resumes a run from a saved RunState after a pause or an after-turn stop; for runs that must survive process restarts, the docs point to Dapr, Temporal, Restate, and DBOS integrations.[72][69] The docs say a production application must provide recovery that reconciles tool side effects before retrying.
- Exactly-once or idempotency keys
- Consuming a stored snapshot once does not guarantee exactly-once tool side effects; the docs ask you to reconcile completed or uncertain side effects before recovery or another run.[70] Stated in the JavaScript SDK's guidance on server-side approval state.
- Who may advance a run
- Ownership is left to the application, which must atomically check ownership and consume a pending request so concurrent or replayed submissions cannot resume the same snapshot twice.[70][69] In shared storage, the docs call for a transaction or equivalent atomic conditional transition.
- A tool call cut off by a crash
- Recovery of an interrupted tool call is left to the application, which the docs say must reconcile tool side effects before retrying.[69][70]
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [69][70][71][72][73][74][151].
- Files, processes, and sandboxes
- Sandbox agents work in an isolated workspace that later runs can reconnect to through a sandbox session, saved session state, or a snapshot.[74][73] Applies to sandbox agents.
- Hosting model
- A lightweight package you call from your own code; durable orchestration across process restarts is available through integrations with Dapr, Temporal, Restate, and DBOS.[73][72]
- Run length or retention
- In Python, a run stops after 10 turns by default and raises MaxTurnsExceeded; passing max_turns=None disables the limit.[71][72][151] Turns are agent-loop turns, that is, model calls. With OpenAI-managed conversation state, response objects are kept 30 days by default.
- Human waits and timers
- A tool needing approval pauses the run; you store the serialized RunState and resume later, even from another process, without keeping a server running.[69][70] If approvals may sit for a while, the docs ask you to store a version marker with the state.
Caveats
- In the JavaScript SDK, if the provider reports that a model request may already have been accepted, the SDK fails closed instead of silently replaying it.[70]
- A serialized RunState is not authenticated by the SDK, so the docs say to deserialize snapshots only from trusted storage.[69]
- The pages we read do not describe a model request cut off by a crash of your process. Outside a crash, model requests are retried only if you opt in through ModelSettings.retry, apart from conversation_locked errors, which the SDK retries on its own, and a failed or incomplete non-streaming Responses call, or an attempt past ModelSettings.timeout, raises an error.[72]
Claude Agent SDK
Anthropic's SDK that runs an agent by spawning and supervising a claude CLI subprocess that owns a shell, a working directory, and session files on disk.[76]
- Where state is stored
- The conversation transcript, written by the CLI subprocess as JSONL files on local disk; a SessionStore adapter can mirror transcripts to your own backend.[75][76] In a container, default local disk is lost on restart, scale-down, or a move to another node unless a SessionStore mirrors the transcript.
- How a run is recovered
- You resume a stored session yourself after a restart, by session ID or by continuing the most recent session; the agent then has the earlier conversation as context.[75] Session files are local to the machine that created them, so another host needs a SessionStore or a copied session file.
- Exactly-once or idempotency keys
- Not stated in the sources we read. Looked for in [75][76][77][78][147][148][149].
- Who may advance a run
- One agent session maps to one subprocess; when scaling out, the docs advise pinning each session to one container by consistent hashing on its session ID.[76] Pinning is advice for long-running sessions served by a pool of containers behind a load balancer.
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [75][76][77][78][147][148][149].
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [75][76][77][78][147][148][149].
- Files, processes, and sandboxes
- Sessions keep the conversation, not the filesystem: working-directory files on a container's local disk do not survive a container restart, scale-down, or move to another node.[75][76] A mounted volume or object-store sync can keep working-directory files, and file checkpointing can snapshot and revert the agent's file changes.
- Hosting model
- An SDK you self-host: your code calls query(), which spawns a claude CLI subprocess on your machine or container; Anthropic's Managed Agents is the hosted alternative.[76]
- Run length or retention
- A session does not time out on its own, and the turn and spend caps (maxTurns and maxBudgetUsd) are off when unset.[76][77] Memory grows over long sessions, so the docs suggest capping session length or recycling subprocesses.
- Human waits and timers
- Approval prompts and clarifying questions go to your canUseTool callback, which can stay pending indefinitely while execution stays paused inside the running process.[78] To let the process exit, a PreToolUse hook can return a defer decision, and the run resumes later from the persisted session.
Caveats
- Writes to a SessionStore are a best-effort mirror: when a batch cannot be delivered, the SDK drops it and continues.[76]
- The pages we read do not describe a model request cut off by a crash of your process. What they do describe is a fallback: if you name a fallback model, a session switches to it when the primary model is overloaded or unavailable, and tries the primary again at the start of each user turn.[77]
- The SDK writes sessions to disk as Claude Code's local transcript files, and Claude Code's sessions page gives its transcripts a 30-day retention (cleanupPeriodDays); the SDK's own pages do not say whether that retention applies to sessions the SDK writes. On a container, local state does not survive a restart, scale-down, or move to another node.[75][122][76]
Sources for this system: [75][76][77][78][122][147][148][149].
Google ADK
Google's framework for building, evaluating, and deploying agents, whose Runner executes agents and records their events in a session service.[83][80]
- Where state is stored
- Session events and state are kept by the SessionService you choose: in application memory, in a relational database you manage, or on Google Cloud through VertexAiSessionService.[80] With InMemorySessionService, all conversation data is lost if the application restarts.
- How a run is recovered
- A resumable app logs completed steps as events; on resume by invocation ID, ADK reinstates completed events and tool results and restarts the workflow from the partially completed state.[79] Resume must be turned on (ADK Python 1.16 and higher) and is started by your call; custom agents need code changes.
- Exactly-once or idempotency keys
- On resume, tools run at least once and may run more than once; the docs ask you to make tools such as purchases check for and prevent duplicate runs.[79]
- Who may advance a run
- With DatabaseSessionService, an in-process lock serializes event appends for one session, and on PostgreSQL, MySQL, and MariaDB row-level locks guard against concurrent updates from several processes or replicas.[80] Applies to DatabaseSessionService.
- A tool call cut off by a crash
- On resume, ADK reinstates the results of tools that returned and re-runs the interrupted tool request, which may therefore run more than once.[79] Only for apps configured as resumable.
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [79][80][81][82][83].
- Files, processes, and sandboxes
- Not stated in the sources we read. Looked for in [79][80][81][82][83].
- Hosting model
- A framework you run yourself, calling its Runner from your code or serving agents with the ADK API server; VertexAiSessionService keeps sessions on Google Cloud.[79][80]
- Run length or retention
- max_llm_calls caps LLM calls per run at 500 by default; 0 or a negative value removes the cap, which the docs do not recommend for production.[82]
- Human waits and timers
- Tool Confirmation, an experimental feature, pauses a tool until a person or system answers with a FunctionResponse event, sent through the ADK API server or the runner.[81] Tool Confirmation does not support DatabaseSessionService or VertexAiSessionService.
Caveats
- Resuming from the ADK Web interface or the ADK command line is not supported.[79]
- The docs say not to modify a stopped workflow before resuming it.[79]
- Stored session events are kept as history grows: filters limit what is loaded without deleting them, and your application deletes a session's data with delete_session when it is no longer needed. The pages we read state no retention period, and the sessions page lists an expired session ID among the common causes of a SessionNotFoundError without saying when sessions expire.[80][82]
Mastra
An agent framework whose durable agents, a beta added in @mastra/core 1.45.0, wrap a regular agent so the agent loop runs inside a workflow.[84]
- Where state is stored
- Durable agents can checkpoint each run's state as workflow snapshots in the storage configured on Mastra, such as a PostgresStore.[84] By default (recovery.durableAgents: 'off'), only pending, paused, and suspended snapshots are written, not per-step running checkpoints.
- How a run is recovered
- Recovery re-drives a run left in running status from its last persisted snapshot, automatically on server start with recovery.durableAgents: 'auto' or manually with recoverActiveRuns().[84] With the default 'off' setting and no custom snapshot policy, running checkpoints are not written, so recovery finds nothing after a crash.
- Exactly-once or idempotency keys
- Recovery can reissue LLM calls and re-execute tool calls, including a whole sub-agent run, so the docs ask for idempotent tools or deduplicated external side effects.[84]
- Who may advance a run
- No distributed lease or lock yet: with automatic recovery on, every replica races to recover the same runs, so the docs advise your own leader election or a single replica.[84]
- A tool call cut off by a crash
- When recovery is on, the agent loop re-runs from the last persisted snapshot and can re-execute tool calls; on Inngest, each tool call is a memoized step that Inngest can retry.[84] Without recovery, a crashed run stays in running status with no automatic retry.
- A model request cut off by a crash
- Recovery re-runs the agent loop from the last persisted snapshot, which can reissue LLM calls, with real cost.[84] Running checkpoints are written by default only when recovery.durableAgents is 'auto'.
- Files, processes, and sandboxes
- Not stated in the sources we read. Looked for in [84].
- Hosting model
- A framework you run in your own server: createDurableAgent() runs in one process, createEventedAgent() runs in the background, and createInngestAgent() runs the workflow on the Inngest platform.[84]
- Run length or retention
- No run-length limit is stated. If you do not call cleanup(), Mastra deletes a run's cached events cleanupTimeoutMs after the run ends; setting it to 0 turns that timer off.[84]
- Human waits and timers
- When a tool call needs approval, the workflow suspends and waits for resume(); suspended snapshots are always persisted, so human-in-the-loop resume works without configuration.[84] Inngest agents persist only suspended snapshots, because Inngest's own replay provides durability.
Caveats
- Durable agents are in beta, and breaking changes may arrive without a major version bump.[84]
- Durable agent runs are excluded from the generic boot-time restart of active workflow runs.[84]
- By default the stream replay cache is in memory, so resumable streams work only within a single process.[84]
Sources for this system: [84].
Pydantic AI
An agent framework that makes runs durable by attaching an engine such as Temporal, DBOS, Prefect, or Restate, which wraps each model request and tool call as a durable unit.[85]
- Where state is stored
- The attached durable engine keeps the run's progress, not chat threads; with Temporal, the Temporal Server stores workflow state in its internal database.[85][87] With Temporal, a run is durable only when it executes inside a Temporal workflow.
- How a run is recovered
- The engine recovers the run: Temporal replays workflow code against saved inputs and decisions, and completed model requests and tool calls return recorded results instead of running again.[87] With DBOS a recorded step result is replayed on workflow recovery, and with Prefect a task cache hit reuses it.
- Exactly-once or idempotency keys
- A durable unit can run more than once when a worker fails after its side effect but before the checkpoint commits, so tools should be idempotent unless the engine offers an at-most-once mode.[86]
- Who may advance a run
- With Temporal, workers run the workflow and its activities, while the Temporal Server tracks program execution and preserves its state.[87] Stated for the Temporal integration.
- A tool call cut off by a crash
- Each tool call runs as its own durable unit, a Temporal activity, which Temporal retries under its retry policy and which restarts from the beginning if it fails part-way.[85][87] An async function tool can opt out of activity wrapping; MCP tools always run in an activity.
- A model request cut off by a crash
- Each model request runs as its own durable unit; with Temporal it is an activity whose default retry policy re-executes it without limit.[85][87] Under Temporal, the docs recommend turning off the provider client's own retries.
- Files, processes, and sandboxes
- Files come from a workspace capability you attach; with Temporal, every worker needs a LocalWorkspace directory at the same absolute path on shared storage.[87][86] Stated for the Temporal integration; the backend docs name sandbox operations as a planned future durable unit.
- Hosting model
- A Python library you embed, made durable by an engine such as a Temporal server; outside a workflow the agent runs as a normal, non-durable agent.[87]
- Run length or retention
- Set by the engine. With Temporal, each payload stored in workflow history is capped at 2MB by default, and an activity with no configured timeout gets a 60-second start_to_close_timeout.[87] Stated for the Temporal integration; activity timeouts can be configured.
- Human waits and timers
- A tool needing approval can end the run with DeferredToolRequests; the caller later starts a new run with the message history and results, and in a durable workflow a handler can wait for a signal.[88][87] With Temporal, delays between background polls use durable Temporal timers.
Caveats
Cloudflare Agents SDK
The Cloudflare Agents SDK is a library whose agents are Durable Objects: addressable, single-threaded instances with SQLite storage that wake on events and hibernate when idle.[36][62]
- Where state is stored
- Agent state, SQL tables, schedules, and fiber checkpoints live in the Durable Object's built-in SQLite storage and survive hibernation and restarts.[62][36] Class fields not stored through setState() or this.sql are lost on eviction.
- How a run is recovered
- runFiber() records work in SQLite and stash() saves snapshots; after eviction, onFiberRecovered() receives the last snapshot and your code decides what recovery means. It is not automatic replay.[63][62] AIChatAgent and Think wrap chat turns in fibers automatically; other in-progress work is lost unless it was checkpointed.
- Exactly-once or idempotency keys
- startFiber() takes an idempotency key so a retried submission joins or returns the existing job instead of starting a duplicate; recovery after eviction is left to your onFiberRecovered() code.[63][62] startFiber() is a durable acceptance API; an interrupted callback is not replayed automatically.
- Who may advance a run
- Each agent is one Durable Object, a single-threaded instance with a unique ID; every wake source for an agent name, such as requests, WebSockets, alarms, and email, routes to that same instance.[36][62][63] Several fibers can run at once inside one agent, each with its own SQLite row.
- A tool call cut off by a crash
- In Think, an interrupted tool call becomes an errored tool result before the next model call, so the model does not silently re-run it. Elsewhere, an interrupted fiber is not replayed automatically.[34][63] Applies to Think chat turns; repairInterruptedToolPart can change the repaired shape.
- A model request cut off by a crash
- AIChatAgent and Think wrap each chat turn in a fiber; after eviction the default persists partial output and continues or retries the turn when safe, with strategies varying by model provider.[62][34] onChatRecovery can return { continue: false } to prevent another model call.
- Files, processes, and sandboxes
- Agent memory is lost on eviction. An attached sandbox container keeps files only while it runs; when it stops, files are gone unless saved as a snapshot.[62][35] The docs' example keeps the container running 10 minutes after the agent goes inactive so files remain for the next turn.
- Hosting model
- Cloudflare runs each agent as a Durable Object and handles placement, scaling, and recovery; you manage no servers, and a hibernated agent consumes zero compute.[62][36] The SDK is the agents library; its Agent class extends Durable Objects.
- Run length or retention
- keepAlive() suits work measured in minutes, not hours; alarm handlers time out at 15 minutes; an interrupted fiber whose recovery keeps failing is discarded after fiberRecoveryMaxAgeMs, 24 hours by default.[62][63] Agents themselves are described as persisting for days, weeks, or months.
- Human waits and timers
- schedule() stores tasks in SQLite and fires alarms that wake a hibernated agent, while setTimeout timers are lost; human approval inside an agent is built yourself with state and WebSockets, or delegated to a Workflow.[62] For waits of hours or days, the docs persist the job ID in state and hibernate until a callback, poll, or workflow completion wakes the agent.
Caveats
- keepAlive() only reduces eviction; without runFiber(), work in progress is lost if the agent is evicted anyway.[63]
- Durable Objects are also evicted by code updates and runtime restarts, which the docs put at 1–2 times per day.[63]
- The beta PiHarness runs the Pi Durable harness inside an agent's Durable Object and follows Pi's own rules, such as not rerunning an unsafe tool and telling the model.[106]
Pi Durable
An experimental package from Earendil for long-running, durable agents: a harness that runs conversations, model requests, and tool calls as checkpointed tasks over a storage backend.[89]
- Where state is stored
- Conversations, task checkpoints, and documents are committed to a storage backend you choose: memory, SQLite, JSONL, or your own, such as a key-value store or Postgres.[89][91] Memory storage persists nothing; on SQLite, commits survive process crashes, but the newest may be lost on power or host failure.
- How a run is recovered
- Every step is a task that stores a checkpoint; after a crash, a new process opens the same storage and continues each unfinished task from its last checkpoint.[89][91][98] Interrupted work stays pending until resume(), a submission, or a wait starts the task scheduler.
- Exactly-once or idempotency keys
- A requestId deduplicates submissions within one conversation; task phases and hooks can run again after a crash, so the post uses an idempotency key and first-write-wins memos.[89][95][96] The post calls this an exactly-once submission; a repeated requestId in the same conversation returns the stored submission.
- Who may advance a run
- One process owns a storage at a time and other clients attach to that process; there is no cross-process locking.[89][91][103] The demo coding app takes its own file lock, which goes stale 10 s after the process holding it crashes.
- A tool call cut off by a crash
- An interrupted tool call reruns only if both its stored and its current replay policy say safe (the default is unsafe); otherwise the model is told it was interrupted and may have partially run.[92][94][89][93] A tool that no longer resolves after the restart is treated as unsafe.
- A model request cut off by a crash
- An interrupted model request is sent again with no declaration needed; its partial answer stays in the transcript, marked as aborted.[89][99][91] Partial answers are committed at most every 100 ms, so a crash loses at most that window.
- Files, processes, and sandboxes
- Tools work through an execution environment the application supplies, such as your laptop, a remote VM, or an in-memory sandbox; the env function builds it for every tool call.[89] The post says application state, including the sandbox a conversation runs in, lives in documents committed with the transcript.
- Hosting model
- A library you embed in a JavaScript process. The post says its SQLite and JSONL storage also run on Bun or inside a Cloudflare Durable Object with a small adapter.[89][106] Cloudflare documents a beta PiHarness that runs it in a Durable Object.
- Run length or retention
- No limit on run length, total history, or storage is stated. The post describes a harness that supports infinitely long conversations; compaction bounds the active transcript, and older messages always stay in storage. Each tool result is cut to its tool's output limits before it is stored.[89][106][92] Cloudflare's page notes that Pi Durable cannot delete a conversation yet, and that on its PiHarness one model request that streams for more than 15 minutes can be cut off.
- Human waits and timers
- Tasks get timers that survive restarts and can wait on other tasks with no code running; a sleep waits for an absolute wake-up time, which the built-in retry and poll phases keep in their checkpoints.[89][91][98][99][106] There is no built-in approval step for tool calls; the post's approval example asks from a hook and stores the answer in a memo.
Caveats
- Pi Durable is experimental, and its API may change between releases.[89][91]
- The package's own test expects a real bash command cut off by a close and reopen to be reported as interrupted, not rerun.[93]
- JSONL storage does not flush to disk before each commit unless you pass fsync: true.[101][91]
- On Cloudflare's beta PiHarness, one model request that streams for more than 15 minutes can be cut off.[106]
What we found reading the v1.0.0 code
- Checkpoint unit
- The harness runs one task for each model request, one for each tool call, and one for compaction. When a harness opens its storage, tasks that were running are switched back to pending and continue from their last committed state. The unit is a step inside a task, which the code calls a phase. Our reading: anything a phase does before its next commit can happen again after a crash.[89][98]
- Built-in tools
- The four built-in coding tools, read, write, edit, and bash, declare no replay setting, so after a crash even a read is reported as interrupted instead of being run again.[97]
- Compaction
- With the built-in defaults the next request waits for a summary once the context passes the model’s window minus 16,384 tokens, and a background summary starts 32,768 tokens before that. When a provider rejects a request as too long, the code compacts once and tries again.[89][100][99]
- Spend
- Each conversation records token use and cost in a document, and “Failed and aborted attempts count too.” We searched the package source for a turn limit or a budget and found none. Spend is recorded, not capped.[91]
Sources for this system: [89][91][92][93][94][95][96][97][98][99][100][101][103][106].
Vendor agents and hosted runtimes
Claude Managed Agents
Anthropic's hosted agent harness, in beta, that runs Claude as an autonomous agent in an Anthropic-managed cloud sandbox or a self-hosted sandbox.[108]
- Where state is stored
- Anthropic keeps each session's event history, conversation, sandbox state, and outputs server-side. History is kept until the session is deleted; sandbox state is kept 30 days from sandbox creation.[108][109] Claude Managed Agents is in beta.
- How a run is recovered
- Not stated in the sources we read. Looked for in [108][109][110][111][112][137].
- Exactly-once or idempotency keys
- Not stated in the sources we read. Looked for in [108][109][110][111][112][137].
- Who may advance a run
- Anthropic's platform runs each session's agent loop, and events you send wait in a queue behind earlier events until the agent processes them.[108][109]
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [108][109][110][111][112][137].
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [108][109][110][111][112][137].
- Files, processes, and sandboxes
- When a session goes idle, its sandbox is checkpointed, keeping the filesystem, installed packages, and files the agent created. After 30 days from sandbox creation, a resumed session starts from a fresh sandbox.[109] Activity does not extend the 30-day window.
- Hosting model
- A vendor product in beta: Anthropic runs the agent harness, and sessions run in an Anthropic-managed cloud sandbox or a self-hosted sandbox on your own infrastructure; it is also offered on Claude Platform on AWS.[108] Claude Managed Agents is in beta.
- Run length or retention
- Sandbox state is kept 30 days from sandbox creation; session history until deletion. First-party Managed Agents has no autonomous-session runtime limit; on Claude Platform on AWS, a session runs autonomously for up to 6 hours.[109][110] On Claude Platform on AWS, any user-role event reauthenticates the session so it can continue.
- Human waits and timers
- A tool call needing confirmation, or a custom tool call, pauses the session as idle with stop reason requires_action until you send a confirmation or result. Sessions and their history persist between interactions.[109]
Caveats
- A session that reaches its spending budget pauses idle instead of terminating, and its history and sandbox are preserved.[111]
- Session runtime is billed only while the session is running, not while it is idle, rescheduling, or terminated.[137]
- Deleting a session permanently removes its record, events, and sandbox.[112]
- In beta, behaviors may be refined between releases.[108]
- The pages we read do not describe how a run is recovered after a crash. After a transient error the session shows the status rescheduling while the platform retries automatically, and an unrecoverable error ends the session as terminated; the pages do not say what is retried or from which point, or whether a crash counts as a transient error.[112]
OpenAI Agents API
OpenAI's hosted API that runs the Codex agent harness for your application, with durable sessions and an optional OpenAI-hosted or self-hosted sandbox.[113]
- Where state is stored
- OpenAI keeps each session's configuration, conversation, and saved work, including saved messages and tool calls, and says it manages sessions, context compaction, and recovery.[119][113]
- How a run is recovered
- For a failed turn, you check saved work, wait until the session is idle, and send a message asking it to continue only unfinished work; a failed session needs a new session.[116][113][114] OpenAI says it manages recovery, but the pages we read do not describe how; after a process crash, the API does not guarantee that pending input is recovered.
- Exactly-once or idempotency keys
- Message submissions take an idempotency key, reused on retries. For functions with side effects, you store results by session, turn, and call ID and check the outcome before running one again.[119][118][116] A failed turn may already have changed files or called external tools.
- Who may advance a run
- OpenAI's harness runs each session. With a self-hosted sandbox, your application uses one component per session's environment, so repeated or concurrent requests do not create duplicate environments.[113][114]
- A tool call cut off by a crash
- A mid-turn sandbox disconnect can fail a tool and does not restart a killed command. For a function tool, you check whether a call took effect before running it again.[114][118] The disconnect statements are made for self-hosted sandboxes.
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [113][114][116][117][118][119][151].
- Files, processes, and sandboxes
- In an OpenAI-hosted sandbox, files persist across turns while the sandbox exists, and files published from its outputs folder stay downloadable after it expires. Self-hosted replacement compute does not get the old files.[117][114] An idle hosted sandbox can be deleted after an hour without activity or keep-alives.
- Hosting model
- A vendor product: OpenAI runs the Codex harness and keeps sessions; the agent's sandbox is OpenAI-hosted, self-hosted on compute your application manages, or omitted.[113][114]
- Run length or retention
- An OpenAI-hosted sandbox can be deleted once activity and keep-alives stop for an hour; this timeout is not configurable. A self-hosted executor has up to five minutes to connect for new input.[117][114]
- Human waits and timers
- When the agent needs a function result or an environment connection, the session reports requires_action and waits. After a disconnect, your application retrieves the session to find pending actions and submits saved results.[119][118]
Caveats
- The API does not guarantee recovery of pending input after a process crash, so you check the outcome before retrying.[114]
- A completed turn does not guarantee every tool succeeded.[119]
- Streams do not replay missed events; after a disconnect you retrieve the session and its saved items.[119]
- Deleting a session neither stops a self-hosted environment nor emits a webhook.[114]
- The pages we read do not describe a model request cut off inside OpenAI's harness. A model overload or a connection, timeout, or service failure fails the turn, and the docs say to retry the unfinished work after a delay, with a limit on attempts.[116]
Sources for this system: [113][114][116][117][118][119][151].
OpenAI Responses background mode
A mode of OpenAI's Responses API that runs a long request asynchronously while the client polls or streams the response.[115]
- Where state is stored
- The response runs asynchronously and the client polls it by ID. Even with store=false, response data is stored temporarily, roughly 10 minutes, to allow polling.[115] OpenAI background responses are kept about ten minutes unless stored.
- How a run is recovered
- If the client's connection drops, the response keeps running; the client reconnects by polling the response or by resuming a stream after the last sequence number it received.[115] The page covers a dropped client connection, not a failure on OpenAI's side.
- Exactly-once or idempotency keys
- Not stated in the sources we read. Looked for in [115][151].
- Who may advance a run
- Not stated in the sources we read. Looked for in [115][151].
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [115][151].
- A model request cut off by a crash
- The model response runs in the background, so a dropped client connection does not stop it; the client polls or reconnects to the stream later.[115] The page does not say what happens if generation fails on OpenAI's side.
- Files, processes, and sandboxes
- Not stated in the sources we read. Looked for in [115][151].
- Hosting model
- A vendor API: setting background to true on a Responses API request makes OpenAI run it asynchronously while the client polls, streams, or cancels it.[115]
- Run length or retention
- With store=false, as in Zero Data Retention projects, response data is kept roughly 10 minutes for polling. In Modified Abuse Monitoring projects, a background response outlives polling only with store=true set explicitly.[115] OpenAI background responses are kept about ten minutes unless stored.
- Human waits and timers
- Not stated in the sources we read. Looked for in [115][151].
Caveats
- The time to first token is higher for a background response than for a synchronous one.[115]
- Cancelling a background response twice is idempotent and returns the final response.[115]
- The pages we read do not say whether compaction applies to background requests. The Responses API, which background mode uses, offers server-side compaction through context_management and compact_threshold, and a standalone compact endpoint.[151][115]
Codex cloud
OpenAI's Codex coding agent running tasks in cloud VMs prepared from a published environment, started and reviewed from ChatGPT on the web, mobile, or desktop.[120][121]
- Where state is stored
- Each task has its own workspace in the cloud; an existing task continues with its own saved files, including uncommitted changes and installed tools.[120][121]
- How a run is recovered
- Not stated in the sources we read. Looked for in [120][121][151].
- Exactly-once or idempotency keys
- Not stated in the sources we read. Looked for in [120][121][151].
- Who may advance a run
- Each task keeps separate working files, and from Slack or Teams only a follow-up from the same connected account continues a task; another participant's request does not.[121]
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [120][121][151].
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [120][121][151].
- Files, processes, and sandboxes
- Each task runs in a VM with its own isolated workspace from the published environment, and keeps its saved files and installed tools; saved VM state is recoverable for up to seven days by default.[121]
- Hosting model
- A vendor product: OpenAI runs Codex tasks in the cloud from ChatGPT on the web, mobile, or desktop app, so work continues while your computer is asleep.[121][120]
- Run length or retention
- By default, a task's saved VM state is recoverable for up to seven days after you last start a turn or resume the task.[121]
- Human waits and timers
- During setup Codex asks you for missing details or access, and tasks started from Slack or Teams can show connection and approval prompts for you to complete.[120][121]
Caveats
- Saved state does not replace source control, so important work should be committed.[121]
- A new task starts from the published setup, not from another task's state.[121]
- The pages we read do not describe a crash during a turn. Reopening a task continues its work, and by default a task's saved VM state is recoverable for up to seven days after you last start a turn or resume the task.[121]
Claude Code
Anthropic's coding agent, run as local sessions in your terminal, as background sessions kept running by a local supervisor, or as cloud sessions on Anthropic-managed VMs.[122][124][123]
- Where state is stored
- Local sessions are saved continuously to local transcript files, in JSONL, and background sessions keep local background-session state. A reopened cloud session gets a fresh VM with its conversation history restored.[122][124][123] For cloud sessions, the conversation comes back when a reclaimed VM is replaced.
- How a run is recovered
- Resuming reloads the saved transcript. If a background session's process exits unexpectedly, the supervisor restarts it; after a machine shutdown, attaching or replying restarts the session from where it left off.[122][124] Past 48 hours since its last progress, a session stopped by a shutdown shows as stopped and asks before resuming.
- Exactly-once or idempotency keys
- A tool cut off by a crash is not rerun on resume, and Claude is told to check whether it took effect; agent view never restarts a shell-command row, since that would rerun the command.[122][124] Claude is told to check unless CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set.
- Who may advance a run
- A local supervisor runs each background session as its own process; Claude Code won't start a session's process while another live process has its conversation open. Resuming in two terminals interleaves both into one transcript.[124][122]
- A tool call cut off by a crash
- A tool still running when the process ended neither finishes nor reruns on resume; Claude sees the call marked as cut off and is told to check whether it took effect.[122] Claude is told to check unless CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set. Before v2.1.281, the cut-off call was dropped or shown as one you interrupted.
- A model request cut off by a crash
- An interrupted turn continues automatically on resume only when CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set to 1; Claude Code then sends a continuation message instead of resending the prompt.[125][150] Claude Code sets a one-hour bound itself when it restarts a crashed agent view session that inherited its conversation from an interactive session; a turn whose last request failed with an API error resumes only while that error is under six hours old.
- Files, processes, and sandboxes
- Local and background sessions work in your own files; background sessions survive sleep but stop at shutdown. An idle cloud session's VM pauses with its files saved; a reclaimed VM is rebuilt fresh.[142][124][126][123] Background work running when a cloud VM is reclaimed, such as subagents and shell commands, is not restored.
- Hosting model
- A vendor product: a CLI on your machine, with a local supervisor for background sessions, or cloud sessions on Anthropic-managed VMs or an organization's self-hosted environment.[142][124][123]
- Run length or retention
- Transcripts are kept 30 days by default (cleanupPeriodDays). A foreground command gets 2 minutes by default and up to 10 on request, and an API request times out after 10 minutes. A finished or waiting background session's process stops after about an hour unattended. An idle cloud VM pauses after a few minutes and can later be reclaimed.[122][124][126][125] A stopped background process resumes where it left off on the next attach or reply.
- Human waits and timers
- A background session paused on a permission prompt keeps running; after a shutdown, one waiting on your input stays under Needs input. A cloud session's question can be answered until environment expiry.[124][123] A cloud session waiting for an MCP connector approval counts as inactive and can expire during the wait.
Caveats
- A background session that outlives its login stops making progress once the credential expires.[145]
- Background subagents, shell commands, and workflows that ended with the previous process appear on resume only as notes that they did not finish.[122]
- Agent view, which hosts background sessions, is in research preview.[124]
- Resuming sends the whole conversation again; after a break longer than the cache lifetime, nothing is left in the cache to read.[150]
- Persisted state such as product memory, project memory files, mounted workspaces, and the state directories of long-running agents is reloaded each time the agent starts, so an injection there persists.[142]
Sources for this system: [122][123][124][125][126][142][145][150].
GitHub Copilot cloud agent
GitHub's hosted coding agent that researches, plans, and changes code on a branch in an ephemeral GitHub Actions environment, and can open a pull request.[127]
- Where state is stored
- Work is pushed as commits on a branch, and the session log stays on GitHub.com after the session's environment is destroyed.[127][128]
- How a run is recovered
- A session that stays stuck times out after an hour. To retry, you unassign and reassign the issue, or post the same pull request comment again.[129]
- Exactly-once or idempotency keys
- Not stated in the sources we read. Looked for in [127][128][129].
- Who may advance a run
- Copilot works on one branch at a time and opens exactly one pull request per task; it responds only to comments from people with write access to the repository.[127][129]
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [127][128][129].
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [127][128][129].
- Files, processes, and sandboxes
- Each session works in its own ephemeral development environment on GitHub Actions, which is destroyed when the session ends.[127][128]
- Hosting model
- A vendor product: GitHub runs the agent in a GitHub Actions-powered environment, for repositories hosted on GitHub.[127]
- Run length or retention
- Each session has a maximum execution time of 59 minutes, a hard limit that cannot be extended or bypassed; a shorter timeout can be set with timeout-minutes. The session log remains available on GitHub.com after the session ends.[127][128] A task that exceeds the limit times out and stops.
- Human waits and timers
- Follow-up instructions come as @copilot mentions on a pull request assigned to Copilot; the comment is passed to the agent, which then starts new work.[129]
Caveats
- GitHub Actions workflows do not run automatically on Copilot's pushes; a person approves them.[129]
- Cloud agent sessions are shared by default with people who have access to the repository.[128]
- The session log remains available on GitHub.com after the session's environment is destroyed; the pages we read state no retention period.[128]
Cursor cloud agents
Cursor's coding agent run in isolated VMs on Cursor's AWS infrastructure, which can also be launched and managed through an API to work on your repositories.[130][131]
- Where state is stored
- For every run Cursor stores the conversation history, kept indefinitely by default, and encrypted point-in-time copies of the VM disk; a new run uses the agent's current conversation and workspace state.[130][131]
- How a run is recovered
- Not stated in the sources we read. Looked for in [130][131][132].
- Exactly-once or idempotency keys
- Agent creation accepts a client-supplied agentId for idempotent creates: posting the same ID again returns 409 agent_id_conflict instead of creating a duplicate agent.[131] This covers creating agents through the public-beta API, not the agent's tool side effects.
- Who may advance a run
- Only one run can be active per agent; starting another while one is creating or running returns 409 agent_busy until it ends or is cancelled.[131]
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [130][131][132].
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [130][131][132].
- Files, processes, and sandboxes
- Agents run in isolated VMs whose disks are snapshotted; the workspace persists across runs. A snapshot unused for 90 days is deleted, and each start or resume from it extends that by 90 days.[130][131]
- Hosting model
- A vendor product: Cursor runs agents in isolated VMs on its AWS infrastructure, and runs can instead use Self-Hosted Machines.[130]
- Run length or retention
- Conversation history is kept indefinitely by default, or 90 days under an Enterprise policy; environment snapshots are deleted after 90 days unused, on every plan. A subscription lasts at most 180 days.[130][132] Custom retention windows such as the 90-day policy are in early access for select Enterprise teams.
- Human waits and timers
- An agent can subscribe to pull request activity, CI results, Slack or Linear events, or timers, then end its turn and wake when a matching event arrives as a follow-up.[132] A subscription lasts at most 180 days.
Caveats
- Cloud agents run all terminal commands without asking for approval, unlike the foreground agent.[130]
- Cancelling a run is final; to continue, you start a new run on the same agent.[131]
- The Cloud Agents API v1 is in public beta.[131]
- Environment snapshots cannot be deleted on demand; they follow the 90-day window.[130]
- The pages we read do not describe recovery after a crash, or say whether a crash counts as a recoverable error. A run that ends in a recoverable error leaves the agent idle and accepting follow-ups; a follow-up run continues from the current conversation and workspace, and snapshots let agents resume without recloning. On self-hosted pools, a follow-up whose claimed worker stays offline returns to the queue once the reconnect window ends.[131][130]
Devin
Cognition's hosted coding agent; each session runs on its own VM, and dynamic workflows orchestrate many sessions from a deterministic Python script.[135]
- Where state is stored
- Sessions snapshot to disk when they sleep. In a dynamic workflow, every agent call's result is recorded against a run ID, which is what makes resuming possible.[134][135] The snapshot-on-sleep statement appears on Devin's macOS support page.
- How a run is recovered
- An interrupted or timed-out dynamic workflow run resumes by run ID: the script reruns from the top, completed agent calls replay recorded results, and unfinished work runs in new sessions.[135] This describes dynamic workflows; the pages do not describe crash recovery for a single session.
- Exactly-once or idempotency keys
- Workflow agent calls are keyed by a hash of prompt, schema, and settings, so the script must make the same calls each time; completed calls replay, while failed agents rerun in new sessions.[135] This describes dynamic workflows.
- Who may advance a run
- Not stated in the sources we read. Looked for in [133][134][135].
- A tool call cut off by a crash
- Not stated in the sources we read. Looked for in [133][134][135].
- A model request cut off by a crash
- Not stated in the sources we read. Looked for in [133][134][135].
- Files, processes, and sandboxes
- A session's disk is snapshotted when it sleeps, and everything on disk survives a wake; running processes such as dev servers and simulators do not and must be restarted.[134] Stated on Devin's macOS support page.
- Hosting model
- A vendor product: each Devin session runs on its own virtual machine, with Linux, Windows, and macOS machines available.[135][134][133]
- Run length or retention
- A session sleeps after 30 minutes of inactivity by default; Enterprise customers can have this set between 5 and 120 minutes. A dynamic workflow run's default and maximum budget is seven days.[133][135]
- Human waits and timers
- An idle session sleeps after a period of inactivity and wakes when you send another message. Workflow runs can be set to wait for your approval before each run starts.[133][134][135] That everything on disk survives a wake, and running processes do not, is stated on Devin's macOS support page.
Caveats
- Every workflow agent is a separate Devin session, so one run can use far more ACUs than a single session.[135]
- Editing a workflow prompt reruns that agent and everything downstream of it.[135]
- Stopping a workflow cancels the script and puts the remaining child sessions to sleep; recorded results stay resumable.[135]
- The pages we read do not describe a tool call cut off inside a Devin session. What they describe is whole agent calls in a dynamic workflow: each agent call spawns an agent and waits for its structured output; if an agent fails, for example because its session died, the script decides whether to skip the item, substitute a default, retry, or fail the run, and a resumed run retries failed agents with new sessions.[135]
LangSmith Agent Server
LangChain's server for deployed LangGraph agents, with built-in persistence and a task queue, run on LangSmith cloud or on your own infrastructure.[136]
- Where state is stored
- Assistants, threads, runs, and cron jobs are stored in PostgreSQL, and checkpoints of graph state are written at each step, in PostgreSQL by default or in MongoDB or a custom backend.[136][64] LangSmith cloud manages the database; on your own infrastructure you set it up yourself.
- How a run is recovered
- Checkpoints let an interrupted worker's run resume from the last checkpoint. A run that fails with a retriable error goes back on the queue and resumes from the last checkpointed step.[136][107] Retries stop after BG_JOB_MAX_RETRIES, 3 by default, and the run is then marked failed.
- Exactly-once or idempotency keys
- The server runs LangGraph graphs, whose docs say a resumed node runs again from the start, repeating side effects before the pause; they ask for idempotent nodes using idempotency keys, upserts, or read-before-write checks.[65][136] This rule comes from the LangGraph documentation for the graphs the server runs.
- Who may advance a run
- A queue worker takes a lease on each run, and the queue allows at most one run per thread at a time; each worker runs up to 10 runs concurrently by default.[136][107]
- A tool call cut off by a crash
- A tool call inside an unfinished node runs again when the run resumes, because LangGraph restarts the interrupted node from the beginning of its function.[65][107] This rule comes from the LangGraph documentation; the server resumes runs from the last checkpointed step.
- A model request cut off by a crash
- A model call inside an unfinished node is made again when the run resumes, since the node restarts from the beginning; LangGraph's docs note that re-executed nodes repeat their LLM calls.[65][64] From the LangGraph documentation for the graphs the server runs.
- Files, processes, and sandboxes
- Server containers are stateless; run data is always read from and written to PostgreSQL, and Redis stores only ephemeral data.[136]
- Hosting model
- An engine service you deploy with your graphs, a PostgreSQL database, and a task queue: on LangSmith cloud, which manages the database, or self-hosted or hybrid on your own infrastructure.[136][107]
- Run length or retention
- A background run’s timeout, BG_JOB_TIMEOUT_SECS, defaults to 86400 seconds and can be increased, and a run is retried at most 3 times by default. Cloud deployments end API requests after 1 hour, but runs can continue longer.[107][136] Resumable stream output is kept in Redis for 120 seconds by default; no retention period is stated for threads or runs.
- Human waits and timers
- Human-in-the-loop pauses use LangGraph interrupts: the thread's state is checkpointed, and a later request resumes it with Command(resume=...). Cron jobs are stored in PostgreSQL with other run data.[64][65][136]
Caveats
- With the default async durability mode, checkpoints are written after each step, and a crash can occasionally lose the latest write.[136][64]
- At least one queue worker must be listening, or runs are orphaned.[136]
- Resumable stream output stays in Redis for 120 seconds by default; the docs point to checkpoints for long-term durability.[107]
- Resumable stream output is kept in Redis for 120 seconds by default (RESUMABLE_STREAM_TTL_SECONDS). The pages we read state no retention period or size limit for threads, runs, or checkpoints, which are stored in PostgreSQL; deleting or pruning a thread removes its checkpoints.[107][136]
Chapter 9
How Pi Durable differs, and what it teaches.
In short: Pi Durable checkpoints every model request, tool call, and compaction as a task of its own in storage you choose; among the systems as the table describes them, no other has its rule for a cut-off tool call, though Cloudflare’s PiHarness runs Pi itself and AWS’s at-most-once step mode comes nearest, while most of its other answers are shared with other systems.
The page opened with Pi Durable. This chapter sets it beside the other 25 systems on twelve questions, and then lists what we think it teaches. Nine are questions of chapter 8. Its tenth, run length or retention, becomes two, a time limit on a run and history, storage, and retention, so that a source that states no time limit is not counted together with one that is silent. The twelfth is compaction. Every answer below is a cell with its own sources. Two answers count as the same kind when the table gives them the same kind code, and the kind is always named.
- Where at most two other systems in the table share Pi Durable’s kind of answer. A model request cut off by a crash (sends the request again): only Mastra and Cloudflare Agents SDK share it; a tool call cut off by a crash (reruns it only if it is declared safe): no other system in the table shares it; history, storage, and retention (keeps records rather than expiring them): only LangGraph shares it; files, processes, and sandboxes (uses an environment you supply): only Pydantic AI shares it.
- Where five or more others in the table share it. Where state is stored (kept in storage you provide or choose, 6 others); how a run is recovered (resumes from the last saved point, 5 others); who may advance a run (one owner at a time, 6 others); hosting model (a library inside your process, 7 others); human waits and timers (timers and waits that survive restarts, 11 others); time limit on a run (states no time limit on a run either way, 5 others); compaction of the model’s context (compacts the context itself, 6 others).
- Outside the table. A model request cut off by a crash: Cloudflare’s PiHarness, which runs Pi Durable itself inside a Durable Object, documents the same: Pi keeps the partial answer it stored and makes the model call again.[106] A tool call cut off by a crash: Cloudflare’s PiHarness, which runs Pi Durable itself inside a Durable Object, documents the same rule: a tool marked
replay: "safe"runs again, and any other tool does not, while the model gets an interrupted result. In our reading, the nearest relative among the other systems is AWS: a durable step runs again by default, and at-most-once per retry instead raises a StepInterrupted error to your code.[106][49] Time limit on a run: On Cloudflare’s PiHarness, which runs Pi Durable inside a Durable Object, an alarm invocation runs for up to 15 minutes; the harness hands off to a new alarm every 10 minutes, but one model request that streams for more than 15 minutes can be cut off.[106]
Marks in the diagram:
- the same kind of answer as Pi Durable
- a different kind of answer
- not stated in the sources we read
Columns, left to right: 1, where state is stored; 2, how a run is recovered; 3, a model request cut off by a crash; 4, a tool call cut off by a crash; 5, who may advance a run; 6, hosting model; 7, human waits and timers; 8, time limit on a run; 9, history, storage, and retention; 10, compaction of the model’s context; 11, exactly-once or idempotency keys; 12, files, processes, and sandboxes.
The diagram as text, question by question
- Where state is stored. Pi Durable: storage backend you choose: memory, SQLite, JSONL, or your own. The same kind of answer, kept in storage you provide or choose: DBOS, Azure Durable Functions, LangGraph, OpenAI Agents SDK, Google ADK, and Mastra. A different kind: Temporal, Restate, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Trigger.dev, Claude Agent SDK, Pydantic AI, Cloudflare Agents SDK, Claude Managed Agents, OpenAI Agents API, OpenAI Responses background mode, Codex cloud, Claude Code, GitHub Copilot cloud agent, Cursor cloud agents, Devin, and LangSmith Agent Server. Not stated in the sources we read: none.
- How a run is recovered. Pi Durable: continues unfinished tasks from their last checkpoints. The same kind of answer, resumes from the last saved point: LangGraph, Mastra, Cloudflare Agents SDK, Claude Code, and LangSmith Agent Server. A different kind: Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, OpenAI Agents SDK, Claude Agent SDK, Google ADK, Pydantic AI, OpenAI Agents API, OpenAI Responses background mode, GitHub Copilot cloud agent, and Devin. Not stated in the sources we read: Claude Managed Agents, Codex cloud, and Cursor cloud agents.
- A model request cut off by a crash. Pi Durable: sent again; partial answer kept and marked aborted. The same kind of answer, sends the request again: Mastra and Cloudflare Agents SDK. A different kind: Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, LangGraph, Pydantic AI, OpenAI Responses background mode, Claude Code, and LangSmith Agent Server. Not stated in the sources we read: Trigger.dev, OpenAI Agents SDK, Claude Agent SDK, Google ADK, Claude Managed Agents, OpenAI Agents API, Codex cloud, GitHub Copilot cloud agent, Cursor cloud agents, and Devin. Outside the table: Cloudflare’s PiHarness, which runs Pi Durable itself inside a Durable Object, documents the same: Pi keeps the partial answer it stored and makes the model call again.
- A tool call cut off by a crash. Pi Durable: reruns only if stored and current policy both say safe. The same kind of answer, reruns it only if it is declared safe: no other system as the table describes it. A different kind: Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, LangGraph, OpenAI Agents SDK, Google ADK, Mastra, Pydantic AI, Cloudflare Agents SDK, OpenAI Agents API, Claude Code, and LangSmith Agent Server. Not stated in the sources we read: Claude Agent SDK, Claude Managed Agents, OpenAI Responses background mode, Codex cloud, GitHub Copilot cloud agent, Cursor cloud agents, and Devin. Outside the table: Cloudflare’s PiHarness, which runs Pi Durable itself inside a Durable Object, documents the same rule: a tool marked
replay: "safe"runs again, and any other tool does not, while the model gets an interrupted result. In our reading, the nearest relative among the other systems is AWS: a durable step runs again by default, and at-most-once per retry instead raises a StepInterrupted error to your code. - Who may advance a run. Pi Durable: one process owns a storage; no cross-process locking. The same kind of answer, one owner at a time: Restate, DBOS, Azure Durable Functions, Claude Agent SDK, Cloudflare Agents SDK, and Cursor cloud agents. A different kind: Temporal, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Trigger.dev, OpenAI Agents SDK, Google ADK, Mastra, Pydantic AI, Claude Managed Agents, OpenAI Agents API, Codex cloud, Claude Code, GitHub Copilot cloud agent, and LangSmith Agent Server. Not stated in the sources we read: LangGraph, OpenAI Responses background mode, and Devin.
- Hosting model. Pi Durable: library you embed in a JavaScript runtime. The same kind of answer, a library inside your process: DBOS, LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, Mastra, and Pydantic AI. A different kind: Temporal, Restate, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, Cloudflare Agents SDK, Claude Managed Agents, OpenAI Agents API, OpenAI Responses background mode, Codex cloud, Claude Code, GitHub Copilot cloud agent, Cursor cloud agents, Devin, and LangSmith Agent Server. Not stated in the sources we read: none.
- Human waits and timers. Pi Durable: restart-safe task timers and waits on other tasks. The same kind of answer, timers and waits that survive restarts: Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, Cloudflare Agents SDK, and Cursor cloud agents. A different kind: LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, Mastra, Pydantic AI, Claude Managed Agents, OpenAI Agents API, Codex cloud, Claude Code, GitHub Copilot cloud agent, Devin, and LangSmith Agent Server. Not stated in the sources we read: OpenAI Responses background mode.
- Time limit on a run. Pi Durable: no time limit stated. The same kind of answer, states no time limit on a run either way: Mastra, OpenAI Agents API, OpenAI Responses background mode, Codex cloud, and Cursor cloud agents. A different kind: Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, Pydantic AI, Cloudflare Agents SDK, Claude Managed Agents, Claude Code, GitHub Copilot cloud agent, Devin, and LangSmith Agent Server. Not stated in the sources we read: none. Outside the table: On Cloudflare’s PiHarness, which runs Pi Durable inside a Durable Object, an alarm invocation runs for up to 15 minutes; the harness hands off to a new alarm every 10 minutes, but one model request that streams for more than 15 minutes can be cut off.
- History, storage, and retention. Pi Durable: messages kept; no deletion yet. The same kind of answer, keeps records rather than expiring them: LangGraph. A different kind: Temporal, Restate, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Trigger.dev, OpenAI Agents SDK, Mastra, Pydantic AI, Cloudflare Agents SDK, Claude Managed Agents, OpenAI Agents API, OpenAI Responses background mode, Codex cloud, Claude Code, and Cursor cloud agents. Not stated in the sources we read: Azure Durable Functions, Claude Agent SDK, Google ADK, GitHub Copilot cloud agent, Devin, and LangSmith Agent Server.
- Compaction of the model’s context. Pi Durable: a built-in task that pins the range it summarizes. The same kind of answer, compacts the context itself: OpenAI Agents SDK, Google ADK, Pydantic AI, Claude Managed Agents, OpenAI Agents API, and Claude Code. A different kind: Temporal, Inngest, and Cloudflare Agents SDK. Not stated in the sources we read: Restate, DBOS, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, LangGraph, Claude Agent SDK, Mastra, OpenAI Responses background mode, Codex cloud, GitHub Copilot cloud agent, Cursor cloud agents, Devin, and LangSmith Agent Server.
- Exactly-once or idempotency keys. Pi Durable: requestId dedupes submissions; rerun phases use idempotency keys or memos. The same kind of answer, a mixed answer: Restate, OpenAI Agents API, Claude Code, and Devin. A different kind: Temporal, DBOS, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, LangGraph, OpenAI Agents SDK, Google ADK, Mastra, Pydantic AI, Cloudflare Agents SDK, Cursor cloud agents, and LangSmith Agent Server. Not stated in the sources we read: Claude Agent SDK, Claude Managed Agents, OpenAI Responses background mode, Codex cloud, and GitHub Copilot cloud agent.
- Files, processes, and sandboxes. Pi Durable: environment you supply, built for every tool call. The same kind of answer, uses an environment you supply: Pydantic AI. A different kind: Temporal, Restate, Inngest, Cloudflare Workflows, Vercel Workflow, AWS Lambda durable functions, Azure Durable Functions, Trigger.dev, OpenAI Agents SDK, Claude Agent SDK, Cloudflare Agents SDK, Claude Managed Agents, OpenAI Agents API, Codex cloud, Claude Code, GitHub Copilot cloud agent, Cursor cloud agents, Devin, and LangSmith Agent Server. Not stated in the sources we read: DBOS, LangGraph, Google ADK, Mastra, and OpenAI Responses background mode.
Explainer 4
Pi Durable, question by question
Choose a question to see how every other system answers it, family by family, or choose one system to set against Pi Durable on every question.
A tool call cut off by a crash. Pi Durable’s kind of answer: reruns it only if it is declared safe. Of the other 25 systems as the table describes them, none gives the same kind of answer, 18 give a different kind, and 7 are not stated in the sources we read. The note under Pi Durable’s answer covers configurations outside the table.
Pi Durable. Kind of answer: reruns it only if it is declared safe.
An interrupted tool call reruns only if both its stored and its current replay policy say safe (the default is unsafe); otherwise the model is told it was interrupted and may have partially run.[92][94][89][93] A tool that no longer resolves after the restart is treated as unsafe.
Built-in tools, from reading the v1.0.0 code. The four built-in coding tools, read, write, edit, and bash, declare no replay setting, so after a crash even a read is reported as interrupted instead of being run again.[97]
Outside the table. Cloudflare’s PiHarness, which runs Pi Durable itself inside a Durable Object, documents the same rule: a tool marked replay: "safe" runs again, and any other tool does not, while the model gets an interrupted result. In our reading, the nearest relative among the other systems is AWS: a durable step runs again by default, and at-most-once per retry instead raises a StepInterrupted error to your code.[106][49]
Durable-execution engines (9)
Runs the cut-off call again (8)
- Temporal: activity-backed tool is retried.[5][2] Stated for the OpenAI Agents SDK integration; a plain @function_tool runs inside the Workflow and must not do network, database, or file system I/O.
- Restate: ctx.run tool step retried with backoff.[12][11][17] Applies to tool code wrapped in ctx.run; the LangChain middleware does not journal tool calls automatically.
- DBOS: interrupted step retried on recovery.[18][20][22] Applies when each tool call is a step, as DBOS's AI quickstart instructs.
- Inngest: tool step retried; effects may repeat.[29] Applies when the tool call is wrapped in step.run, as the durable agents page shows.
- Cloudflare Workflows: interrupted step reruns from its start.[31][33] Side effects inside a retried step can repeat, so the docs ask for idempotent steps.
- Vercel Workflow: crashed step re-tried under its retry policy.[43][42] The docs name function timeouts, out-of-memory errors, and network issues as causes.
- AWS Lambda durable functions: rerun on replay by default; at-most-once option raises an error.[46][49] To run a step at most once end to end, combine at-most-once with a no-retry strategy.
- Azure Durable Functions: activities rerun under at-least-once execution.[54][53][52]
Does not recover it automatically (1)
- Trigger.dev: crashed runs stop; thrown errors retry the whole task.[58][55][60] Out-of-memory failures are retried on a larger machine only when the task opts in.
Other agent frameworks and libraries (7)
Runs the cut-off call again (4)
- LangGraph: node with the tool call reruns from the start.[65] Work wrapped in a task that already completed is skipped, because task results are checkpointed.
- Google ADK: interrupted tool request is re-run on resume.[79] Only for apps configured as resumable.
- Mastra: re-executed from the last snapshot when recovery is on.[84] Without recovery, a crashed run stays in running status with no automatic retry.
- Pydantic AI: tool call is an activity, retried from its start.[85][87] An async function tool can opt out of activity wrapping; MCP tools always run in an activity.
Does not rerun it; the model is told (1)
- Cloudflare Agents SDK: interrupted tool calls become errored results in Think.[34][63] Applies to Think chat turns; repairInterruptedToolPart can change the repaired shape.
Does not recover it automatically (1)
- OpenAI Agents SDK: left to the application; reconcile side effects first.[69][70]
Not stated in the sources we read (1)
Vendor agents and hosted runtimes (9)
Runs the cut-off call again (1)
- LangSmith Agent Server: rerun with its node from the last checkpoint.[65][107] This rule comes from the LangGraph documentation; the server resumes runs from the last checkpointed step.
Does not rerun it; the model is told (1)
- Claude Code: not rerun; Claude is told to check.[122] Claude is told to check unless CLAUDE_CODE_RESUME_INTERRUPTED_TURN is set. Before v2.1.281, the cut-off call was dropped or shown as one you interrupted.
Does not recover it automatically (1)
- OpenAI Agents API: not restarted; you check effects before rerunning.[114][118] The disconnect statements are made for self-hosted sandboxes.
Not stated in the sources we read (6)
- Claude Managed Agents: looked for in [108][109][110][111][112][137].
- OpenAI Responses background mode: looked for in [115][151].
- Codex cloud: looked for in [120][121][151].
- GitHub Copilot cloud agent: looked for in [127][128][129].
- Cursor cloud agents: looked for in [130][131][132].
- Devin: looked for in [133][134][135].
How the comparison is made: every answer is a cell from the comparison table in chapter 8, or, for compaction, an answer we added from the same sources, and it keeps its own citations. Two answers count as the same kind when the table gives them the same kind code; the kind is named in plain words above each group. Groups follow a fixed order: Pi Durable’s kind first, then the other kinds, then the systems whose sources are silent. Nothing is scored or ranked.
What Pi Durable teaches
- A model request and a tool call need different rules after a crash. Pi Durable sends a cut-off model request again with no declaration, keeping the partial answer marked as aborted, and reruns a cut-off tool call only if both the stored and the current declaration say
safe; the default isunsafe.[89][92][94] Eight of the nine engines in the table retry both as durable steps instead, and Temporal notes that a retried model call is “an independently sampled answer rather than a continuation”.[5] In our reading, the split puts the caution where the risk is: a resent request costs tokens and returns a new sample, while a repeated tool call can repeat an effect. - The checkpoint can sit at every message. The harness runs built-in tasks, “one for each model request, one for each tool call, and one for compaction”, each with “a checkpoint after every step”, and it commits partial answers and tool output at most every 100 ms.[89][91] Calls can run at the same time: in the post’s demo, “A subagent runs three searches in parallel, each a durable task.”, and the README’s example sets
toolExecution: "parallel".[89][91] In our reading, a crash therefore leaves in doubt each task that was unfinished, from its last checkpoint, and up to 100 ms of its output, however many tasks that is. Engines reach a boundary this fine when each model call and each tool call is its own step, which is what their agent guides ask for.[22][29][33] - One owner is an assumption to enforce. Pi Durable’s README is plain: “One process owns a storage at a time; there is no cross-process locking.”[91] Some engines enforce one writer inside their own service: Temporal assigns each execution to a history shard, and Restate offers a “Single-writer guarantee”.[10][11] In our reading, running Pi Durable in more than one process means adding a lease and a fencing check yourself, as chapter 5 describes.[140]
- Compaction is part of the record. Pi Durable runs compaction as a task of its own and pins the range it will summarize in its checkpoint; a comment in the code reads “The context at
tailis immutable, so this is the rangeselectchose.”[105] In our reading of that code, a process that restarts in the middle of a compaction summarizes the same range again, and the cut never separates a tool call from its result. The post adds that “The older messages always stay in storage.”[89] Among the other systems, compaction is built in for some and left to your code by others, and for 16 of the 26 systems the pages we read do not say whether the system compacts its context; Explainer 4 lists which. - A library leaves the service work to its host. Pi Durable runs only while a process runs it: work interrupted by a crash “stays pending” until
resume(), a submission, or a wait starts the task scheduler.[91] It has no cross-process locking, its execution environment has no snapshot or restore operation, it has no approval or permission step for tool calls yet, and we found no turn limit or budget in its source; it records spend instead.[91][102][106] Engine services such as Temporal, Restate, or Inngest run part of this work for you, scheduling, retrying, and keeping runs, as chapters 3 and 8 describe. - Safe by default has a cost. The four built-in coding tools declare no replay setting, so after a crash even a read is reported as interrupted instead of being run again.[97] Cloudflare’s page on Pi suggests marking a tool safe “when running it twice is harmless, such as a read or a whole-file write.”[106] In our reading, unsafe by default is the right failure for writes, and it leaves the host to declare its reads.
What these lessons rest on
- Pi Durable is new. Earendil released it on 1 October 2026 as an experimental package, and we read one release, v1.0.0, without running it.[90][91]
- Sentences marked in our reading are our inferences from the post and the code, not statements the sources make, and we did not test them.
- The comparison uses the kind codes of chapter 8’s table, which are coarse: two systems with the same kind of answer can still differ in detail, which is why every answer is shown with its own sentence and sources.
- The map in chapter 8 is broader on storage. Its column for storage you provide or choose also takes records kept in files on the machine that runs the agent or in memory, which this chapter counts as different kinds from Pi Durable’s storage backend that you choose; a system can therefore sit in Pi Durable’s column on the map and still give a different kind of answer here on where state is stored.
- Compaction is not a column of chapter 8’s table. We answered it for every system from the sources already read; for 16 of the 26 systems the pages we read do not say whether the system compacts its context, which is a gap in what we read, not evidence that those systems lack it.
- The two limit questions split chapter 8’s run length or retention column, using the pages saved for each system. An answer that a source states no time limit is kept apart from a source that says nothing either way, and for 6 of the 26 systems the pages we read state neither a limit on history or storage nor how long records are kept; anything they do say about storage is in the system’s note.
Chapter 10
A crash, system by system.
In short: Pick a run, a moment for the process to die, and up to three systems, and the simulator shows what each one’s documentation says happens next, or says that it is not documented.
Explainer 5
Crash the run
An invented run with up to five steps. Pick the run, the moment the process dies, and up to three systems. Each step’s outcome comes from that system’s cited sources; where the sources are silent, the step says it is not documented. Steps after the crash point follow what the sources say about the run as a whole: if it is not picked up again, continues only under a condition, or is not covered, the later steps say so. Each column also names the setup its outcomes assume. The reference case with no durable record assumes someone starts the task over.
The rest of the run. Temporal: the run continues; LangGraph: the run continues only under the condition its column states; Pi Durable: the run continues only under the condition its column states.
Temporal
After the crash: The run continues on its own. It picks up where the last recorded event in its Event History left off.[9]
These outcomes assume: Model calls, and tools that do I/O, run as Activities, as in Temporal’s OpenAI Agents SDK integration; workflow code is deterministic.[5][1]
- 1. Plan. It had finished. Completed Activities are not re-executed during replay; their return values are recorded in the Event History.[2]
- 2. Search the issue tracker. It had finished. Completed Activities are not re-executed during replay; their return values are recorded in the Event History.[2]
- 3. Deploy. An Activity whose Worker crashed before reporting completion is retried, which can repeat its side effect unless it is idempotent. The deploy can happen twice unless the receiving service honors an idempotency key.[2]
- 4. Wait for a person’s approval. It runs after recovery, as the run continues.
- 5. Write the final answer. It runs after recovery, as the run continues.
LangGraph
After the crash: The run continues only under the condition stated here. Your code starts recovery: after a failure you can restart the graph on the same thread from the last successful step.[64]
These outcomes assume: A persistent checkpointer, such as SQLite or Postgres. With InMemorySaver, “When the process restarts, all checkpoints are lost.”[66] The sync durability mode, which “ensures that LangGraph writes every checkpoint before continuing execution”. With exit, “you cannot recover from system failures (like process crashes) mid-execution”; with async, “there is a small risk that LangGraph does not write checkpoints if the process crashes during execution.”[64]
- 1. Plan. It had finished. Finished nodes are not rerun: earlier super-steps are in checkpoints, and the writes of nodes that succeeded in the failed super-step are stored as pending writes.[64]
- 2. Search the issue tracker. It had finished. Finished nodes are not rerun: earlier super-steps are in checkpoints, and the writes of nodes that succeeded in the failed super-step are stored as pending writes.[64]
- 3. Deploy. The node holding the tool call runs again from the start when the thread resumes, repeating side effects before the pause. The deploy can happen twice unless the receiving service honors an idempotency key.[65]
Pi Durable
After the crash: The run continues only under the condition stated here. A new process opens the same storage; work interrupted by the crash stays pending until resume(), a submission, or a wait starts the task scheduler.[89][91]
These outcomes assume: SQLite or JSONL storage that survives the process, opened by one process at a time.[91]
- 1. Plan. It had finished. Finished tasks are not run again; only tasks left running go back to pending. In the post's demo, only the unfinished search runs again after the restart.[91][98][89]
- 2. Search the issue tracker. It had finished. Finished tasks are not run again; only tasks left running go back to pending. In the post's demo, only the unfinished search runs again after the restart.[91][98][89]
- 3. Deploy. It is not declared safe, so it does not run again, and the model is told it was interrupted. The call reruns only if both the stored and the current replay policy say safe (default unsafe); otherwise the model is told it was interrupted and may have partially run.[92][94]
Shapes in the timelines:
- kept: its saved result is used
- runs again
- runs again only under the condition its sentence states
- not rerun; the model is told
- a wait that resumes
- a wait that resumes only if its state was stored
- left as it was; recovery is not automatic
- not documented
- runs next
- runs next only under the condition its column states
- does not run, because the run is not picked up again
An illustration, not a test: we did not run any of these systems. Shapes in each timeline follow the legend above; every outcome is also written as a sentence. Change the setup a column assumes and its outcomes can change.
Chapter 11
Which approach fits your agent.
In short: Six questions narrow the 26 systems to those that fit, by stated rules applied to the comparison table; it is a reading aid, not a ranking and not a recommendation of any vendor.
Explainer 6
Six questions
Answer six questions about your agent. The result lists every system that fits your answers, in the order of the comparison table, with the cautions its cells raise and the cells that made it fit, each with its source. It is a reading aid, not a ranking and not a recommendation of any vendor.
Question 1 of 6.
Systems that fit your answers
The six questions, and the answers each one offers:
Do you want to embed a library, run or rent an engine, or have a vendor run the agent?
A library inside my own application; An engine I run or rent, with my code in its workers or functions; A product that runs the agent for me; Not decided.
Where should the agent run?
On servers, containers, or machines I operate; On a platform that runs my code for me, such as a serverless or managed service; Inside a vendor’s product that runs the agent; Not decided.
How long can one run last, from start to finish, waits included?
Up to an hour; From an hour to a day; From a day to 30 days; More than 30 days.
What do the agent’s tools do?
They only read; They write, but repeating a write is harmless; They make changes that must happen once, such as payments, deploys, or messages.
Does a run wait for people?
No; Yes, for approvals or answers in the middle of a run.
Do you already run one of these?
None of these; Temporal; AWS; Azure; Cloudflare; Vercel; LangChain or LangGraph.
Chapter 12
Costs and other hazards.
In short: Long runs pay to re-send their history, and runs that nobody watches need caps on turns and spend, care with what they reload, and credentials that outlast them.
Every model request in an agent loop sends the conversation so far. Server-side conversation state does not avoid this. OpenAI’s docs: even with previous_response_id, “all previous input tokens for responses in the chain are billed as input tokens in the API.”[151] Prompt caching is what makes long runs affordable. On Anthropic’s list prices a cache read costs a tenth of normal input on most models, while writing to the 5-minute cache costs 1.25 times normal input and the 1-hour cache 2 times.[137]
A cache only helps while it is warm and unchanged. Changing tool definitions “invalidates the entire cache”.[147] Resuming a conversation “sends the whole conversation again,” and after a break longer than the cache lifetime “there is no cache left to read”.[150] A crash, a slow human approval, or a redeploy can each make the next request pay to write the whole prefix to the cache again.
Explainer 7
What a long conversation costs to re-send
Set the size of a run. The calculator counts input tokens only and compares three cases: no caching, a cache that is warm on every turn, and a cache that has expired before every turn, as after repeated restarts or long waits.
List prices per million tokens: $2.00 input, $2.50 to write the 5-minute cache, $0.20 to read it.
| Case | Input cost |
|---|---|
| No prompt caching | $88.40 |
| Cache warm on every turn | $9.81 |
| Cache expired before every turn | $110.50 |
44,200,000 input tokens are sent over 200 turns. The last turn alone costs $1.05 if the cache has expired and $0.089 if it is warm.
From turn 91 on, each request would be larger than the 1M-token context window that Anthropic’s pricing page gives Claude 4.6 and later models; the last would hold 4,100,000 tokens. A real run would need compaction or truncation before then, so the costs shown are an unconstrained extrapolation.[137]
An arithmetic illustration, not a bill. Request k sends the starting context plus k turns of new tokens. With a warm cache, each request reads the previous prefix and writes the new tokens at the 5-minute rate. Output tokens, tool-definition overhead, and other price modifiers are left out. Prices from Anthropic’s pricing page, read 2 October 2026.[137]
Other meters
- Compaction is a model call. Anthropic: “Compaction requires an additional sampling step, which contributes to rate limits and billing.”[149]
- Tokenizers differ. Anthropic says its updated tokenizer maps the same input to “roughly 1.0–1.35×” as many tokens as before,[152] and OpenRouter measured “32–34% more native tokens” for production-scale prompts.[153]
- Harnesses differ. In the Limbo study, “a Codex CLI episode consumed about 153k tokens, against 12k for the minimal scaffold.”[156]
- Orchestration is metered too. Temporal Cloud starts “at $50 per million actions”;[7] on Inngest “A function run with five steps uses six executions.”[27] Claude Managed Agents adds $0.08 per session-hour, counted only while the session is running.[137]
- Waiting can be free or not. AWS Lambda durable functions’ waits “suspend execution without incurring compute charges,”[45] and sleeping Cloudflare Workflows instances do not count toward concurrency limits.[32] A user running Pi Durable on Cloudflare Durable Objects reported that a host cannot tell when the harness is only sleeping, so the object stays awake and billed.[104]
Loops that run up a bill
An agent that runs unattended can spend unattended. OWASP lists runaway cost as a security risk, “Denial of Wallet”.[144] Lan Tian’s blog recounts an autonomous agent that tried to scan the DN42 hobby network for about 24 hours before it was shut down; an email from an address claiming to be its operator then asked for donations toward an AWS bill of $6,531.30.[146] Caps help only when set: the Claude Agent SDK’s turn and spend caps are “off when unset”,[77] the OpenAI Agents SDK stops Python runs after 10 turns by default,[71] and a Claude Managed Agents budget “is enforced between model requests, not mid-request.”[111] Pi Durable records spend but does not cap it.[91]
Injected instructions that come back
Persistence also preserves attacks. Anthropic’s engineering team names the state directories of scheduled and long-running agents among the places where “An injection that lands in any of these is reloaded each time the agent starts.”[142] Meta’s “Rule of Two” guidance concedes that “a background process where human-in-the-loop is disruptive or ineffective” is hard to fit into its rule.[143]
Credentials that expire mid-run
A run can outlive its login. Claude Code’s docs warn that a background session that outlives its login “stops making progress once the credential expires”.[145]
Chapter 13
What the research measures.
In short: Recent papers crash agents on purpose and count what happens twice, and they agree that recovering the outcome is not the same as executing once.
The results below are the authors’ own; we read the papers but did not rerun any experiment. Nine of the twelve were first posted in 2026, and none of the twelve arXiv records lists a journal reference. Treat the numbers as preprint results unless a venue says otherwise.
| Paper | What it tested | Central result | Limits |
|---|---|---|---|
| Crab, April 2026[154] | Checkpoint and restore of agent sandboxes, aligned with conversation turns. | Recovery correctness rose from 8 to 13% with chat history only (13% and 8% on shell-intensive Terminal-Bench with Claude Code and iFlow-cli, 9% on code-repair SWE-bench) to 100%, within 1.9% of fault-free execution time. Over 75% of turns produced no recovery-relevant state. | Shell-intensive and code-repair workloads chosen by the authors. |
| Resume Means Resume, August 2026[155] | Five agent workflow frameworks probed for what “resume” means, with a formal model of the expected behavior. | LangGraph 1.2.9 is “exactly-once across interrupts, at-least-once across crashes”. With k processes resuming one parked interrupt, the gated effect fired k times. | Pinned releases and a deterministic harness without a model; current versions may differ. |
| Where Does Exactly-Once Live?, September 2026[156] | Duplicate side effects across 25,930 episodes, nine models, and three production harnesses, in a simulated sandbox of six services. | In the paper’s first experiment, frontier models “instructed to act exactly once” duplicated a write whose acknowledgement was lost in 0.5% of episodes; the two weaker models did so in 18%. The same frontier models duplicated in 56% of episodes when the request was still in flight and committed late, and in 74% when the transport delivered it twice. The drop from 28% to 4% comes from a separate experiment with a different setup: a counterfactual tool contract in which every write accepts an idempotency key. | Simulated services. The author proves that no verification-only policy is exactly-once under late commits without a bound on in-flight time. The runs with a key on every write were added after preregistration and are exploratory. |
| Atomix, February 2026[157] | Transactions for tool calls, against checkpoint replay and saga compensation. | Irreversible sends leaked in 0 of 500 trials with full transactions, 200 of 500 with checkpoint replay, 400 of 500 with saga compensation. | “We do not claim semantic validation, distributed deployment, or full crash-safe exactly-once.” |
| Guardrailed Meta-Agent Loops, September 2026[158] | 240 injected crashes in a self-improving agent testbed. | Every run recovered the expected outcome; only 210 kept the same trace, because 30 pre-commit crashes repeated a planner call. | One calibrated, deterministic simulation. |
| AgentRewind, August 2026[159] | Rewinding an agent’s context and workspace together after a mistake. | Task success on 82 tasks rose from 62.2% (continuing after failure) to 87.8% with GPT-5.4, averaged over three runs. | “Effects outside the workspace filesystem, such as network requests, external-service calls, and external runtime state, cannot be undone.” |
| Why Do Multi-Agent LLM Systems Fail?, March 2025[160] | A failure taxonomy developed from 150 traces of five frameworks by six expert annotators, then used to label MAST-Data, 1,642 traces from seven frameworks, using a calibrated LLM annotator. | 14 failure modes in three categories. In the agreement study, three human annotators reached kappa 0.88; the LLM annotator agreed with expert labels at kappa 0.77. | Built from observed traces; no crashes injected. |
| AgentFold, October 2025[161] | Learned context folding for long web tasks. | 36.2% on BrowseComp for a 30B-parameter agent. | Context management, not crash recovery. |
| CompactionRL, July 2026[162] | Reinforcement learning with compaction in the loop. | 66.4% on 200 sampled SWE-bench Verified tasks, 6.6 points above the base model with inference-time compaction. | A sample of SWE-bench Verified, not the full set. |
| AutoCompact, October 2026[163] | Training a coding agent to decide when to compact. | SWE-bench Verified rose from 30.4% to 39.6%. | One scaffold; reinforcement learning ran on 32K-token sequences. |
| SagaLLM, March 2025[164] | Saga-style compensation and validation for multi-agent planning. | Reports improvements in consistency, validation accuracy, and coordination over standalone models on planning problems. | Relaxes strict ACID guarantees by design. |
| Towards an Agent Operating System, July 2026[165] | An argument, not an experiment. | Proposes consolidating agent platforms around abstractions extended from operating-system primitives. | Proposes primitives and describes prototypes; reports no measurements. |
Read together, the papers agree on one thing: recovering the outcome is not the same as executing once. Guardrailed Meta-Agent Loops says so outright: its findings “show why successful outcome recovery is insufficient evidence of exactly-once execution.”[158]
Chapter 14
What to do with this.
In short: Durable systems solve the bookkeeping, and the judgment about side effects stays with the people who build the tools.
- Decide, per tool, whether a rerun is harmless. Default to no. Pi Durable defaults to unsafe;[94] Cloudflare suggests marking a tool safe “when running it twice is harmless, such as a read or a whole-file write.”[106]
- Give every external write an idempotency key the receiving service honors. A key that only your harness checks does not stop the second charge.[138][156]
- Plan what happens after “may have partially run”. Give the model a way to read the real state before it tries again, and do not take its report of success as proof.[92][156]
- Treat the sandbox as state. Snapshot it if the agent depends on files or processes; the transcript will not restore a browser or a half-written file.[154][109][55]
- Enforce one owner with a lease and a fencing check if more than one machine can open the same storage.[91][140]
- Pin or migrate code deliberately for runs that will see a deploy.[6][21][98]
- Cap turns and spend, and alert on them. Some harnesses leave caps off by default or have none.[77][91]
- Treat persisted context as input you did not write. Anything saved can be replayed into the next session, including an injection.[142]
- Watch the cache. Keep prefixes stable and expect a full-price request after a crash or long wait.[150][137]
Choosing among the families is mostly about who operates what. Engines such as Temporal or Restate bring replay and versioning, at the cost of running a separate service and, in Temporal’s case, determinism rules.[4][11][14] Libraries such as DBOS or Pi Durable live inside your process with storage you own.[18][89] Vendor agents keep the state for you, under the vendor’s limits.[109][127] Chapter 11 turns these trade-offs into six questions, and chapter 9 sets out how Pi Durable differs.
Chapter 15
Where a data warehouse fits.
In short: In our reading, the recovery store is for resuming one run, and a warehouse copy of run history is for learning from many; the study tested no warehouse in either role.
Chapter 1 calls durability a record that outlives the process: a new process reads it and continues.[89][62] Pi Durable commits that record to storage you choose: memory, SQLite, JSONL, or your own (chapter 9).[89][91] Chapters 2, 5 and 8 describe what particular designs require: Pi Durable checkpoints each step, DBOS stores wake-up times, shared storage has to reject a stale writer, and the OpenAI Agents SDK docs call for an atomic conditional transition there.[89][19][140][70] We evaluated no warehouse, BigQuery included; none of the 26 systems is listed with one as its durable store, and whether a warehouse could meet those requirements is untested.
In our reading, chapter 14’s advice suggests reviewing history across runs: were keys sent, how did the model respond to “may have partially run”, and which runs merit spend alerts? In our reading, those checks need complete enough records of keys, interrupted tool calls, what followed and spend. Chapter 13 reports one calibrated, deterministic simulation: the expected outcome was recovered after all 240 injected crashes, yet 30 traces changed because pre-commit crashes repeated a planner call.[158]
In our reading, that review is the warehouse’s best position, and the recovery store stays where a run resumes. Our example is BigQuery Agent Analytics (BQAA), which Haiyuan works on; we did not run its SDK. The BQAA SDK README calls BigQuery a “Google Cloud analytics data warehouse” and says the SDK is “read-only over that table” of agent events.[166] It describes trace reconstruction, per-event-type views, turn-count and cost metrics, evaluation with an LLM judge, by trajectory and across trials, and regression detection through BigQuery SQL or Python.[166] It also describes Agent Context Graph decision traces, “the requests an agent handled, the options it weighed, and the outcomes it committed”, and long-horizon cross-session memory.[166] It does not say whether those events record idempotency keys or interrupted tool calls.[166] In our reading, that memory puts the warehouse back in the loop, so chapter 14’s rule applies: treat persisted context as input you did not write.[142]
Chapter 16
What we could not confirm.
In short: These are the claims we could not check and the lookups that failed; a failed lookup is a gap, not evidence that something is absent.
- We did not run any of the 26 systems. Every cell in chapter 8 and every outcome in chapter 10 comes from documentation, code, or papers, not from tests.
- 34 of the 260 cells in chapter 8 say Not stated in the sources we read. Each names the pages we looked in; a later page or a support answer may settle it. On 3 October 2026 we read every saved page for each system again to re-check every answer marked not stated, here and in chapters 9 and 10, and corrected those that a page does answer.
- The map in chapter 8, the comparison in chapter 9, and the six questions in chapter 11 sort systems by rules we wrote and apply to the cells; the rules are stated with each explainer. They are reading aids, not rankings.
- The decision aid in chapter 11 reads where a system can run from its hosting cell, and its run-length limits from its limits cell. A hosting option or a limit that the pages we read do not mention is treated as not described, not as unavailable or unlimited.
- Chapter 9 compares Pi Durable on three questions that are not columns of chapter 8’s table: a time limit on a run and history, storage, and retention, which split its run length or retention column, and compaction. Those answers come from the pages we had already read for each system. For compaction we searched them but did not look for further pages, so its 16 silent answers mark a gap in our reading.
- The simulator in chapter 10 states, for each system, the setup its outcomes assume, such as LangGraph’s persistent checkpointer and durability mode. With another setup the outcomes can differ, and we did not test any of them.
- We read only the pages listed in the sourcebook. Official pages we found but did not cite, such as Trigger.dev’s pages on recovering chat agents and Claude Managed Agents’ operations guide for self-hosted sandboxes, may settle some of the silent cells.
- Some vendor pages disagree with each other. Cloudflare’s page on long-running agents gives Workflows “30 minutes per step”, while its Workflows limits page says “Each step can run for an unlimited wall time.”[62][32] The table uses the limits page. GitHub’s troubleshooting page says a stuck Copilot session “will time out after an hour”, while its overview gives a 59-minute hard limit.[129][127]
- Devin’s statement that sessions snapshot to disk when they sleep appears under its macOS heading; we did not confirm it for Linux or Windows sessions.[134]
- For Pi Durable we read the v1.0.0 source but did not run it. The hazards described in chapters 4 and 5, such as two owners or a lost intent record after a power cut, are inferences from the code, not observed failures.
- We did not run Cloudflare’s
PiHarness, which is in beta. We report its documentation only. - We did not test any data warehouse, BigQuery included, as the storage a run resumes from or as a history of runs. We did not run the BigQuery Agent Analytics SDK, which Haiyuan works on; chapter 15 reports what its README says.[166]
- We did not check whether a warehouse copy of a run is complete. Chapter 8 notes that the Claude Agent SDK’s SessionStore mirror is best-effort and drops a batch it cannot deliver.[76]
- We did not check conference proceedings, so the table in chapter 13 gives arXiv dates rather than venues, including for the three 2025 papers.
- Meta’s Rule of Two page returned HTTP 400 to a browser-style request and HTTP 200 to a plain one. We checked the quoted text in the 200 response.
- Price tables rendered by scripts on some vendor pages, including Restate and DBOS, and AWS’s per-operation rates for durable functions, were not captured. We quote only prices we could read.
- Many vendor documentation pages show no date. For those, the sourcebook gives the date we read them.
- We did not rerun any paper’s experiments, audit their code, or check their proofs. Most are preprints.
- Lan Tian’s post gives the AWS bill as $6531.30 in its heading and as $6531.10 in one sentence; the quoted email says “aws bill 6531,30$.” The bill itself is the claim of an unidentified sender.[146]
Sourcebook
Sources.
Researched 2 to 3 October 2026, Pacific time, from primary documentation, repositories, papers, and vendor posts. Each source was opened and read for this study unless the sourcebook says otherwise. Quotations were matched against the copies we fetched. Vendor documentation can change after the date given. This is an independent synthesis on Haiyuan’s hub, not a publication of any vendor.
Durable-execution engines
- 1Temporal: Workflow Definition
Determinism: replayed code "makes the same Workflow API calls in the same sequence, given the same input".
- 2Temporal: Activity Definition
An Activity is observed as completed exactly once but "may be executed multiple times".
- 3Temporal: Workflow Execution limits
Event History is limited to 51,200 Events or 50 MB.
- 4Temporal: troubleshooting execution failures
A non-determinism error stops progress, and "This will not clear up on its own."
- 5Temporal: OpenAI Agents SDK integration (Python)
Model calls run as Activities "so they retry durably and are not repeated during Workflow replay." A code comment in its streaming example adds that a retried model call "is an independently sampled answer rather than a continuation" (from two comment lines, line break removed).
- 6Temporal: Worker Versioning
Pinned workflows run "entirely on the Worker Deployment Version where it started".
- 7Temporal Cloud pricing
Pay-as-you-go "Starting at $50 per million actions".
- 8Temporal: Timers and Start Delays
Timers are persisted and resolve after a Worker or Temporal Service outage; a Timer can last from one second to several years.
- 9Temporal: Workflow Execution overview
Durability is "the absence of an imposed time limit"; replay resumes an Execution from its Event History, and Workers cache Workflow state.
- 10Temporal: Temporal Server
The History Service persists Execution state to the Event History, History Shards allow one concurrent operation per partition, and closed executions are kept for a Retention Period of at least 1 day.
- 11Restate: key concepts
Restate "replays the journal, skipping completed steps and resuming from exactly where it left off".
- 12Restate: durable agents
Claims "Side effects are executed exactly once." Compare the SDK comment in the next source.
- 13Restate TypeScript SDK: context.ts
Doc comment: "There is a small window where an action may be re-run, if a failure occurred between a successful run and persisting the result" (line break removed).
- 14Restate: versioning
In-flight invocations stay on the deployment they started on.
- 15Restate: Approvals with Pause & Resume
Durable promises (awakeables) let an agent wait for human approval and resume even if the process restarts.
- 16Restate: Scheduling & Timers (TypeScript)
Timers survive failures and restarts, there is no hard limit on sleep length, and calls to a sleeping exclusive Virtual Object handler are queued.
- 17Restate: Service Configuration
Default retry policy (70 attempts, then pause) and 24-hour default retention of completed invocations' journals and idempotency keys.
- 18DBOS: architecture
"While your application runs, DBOS checkpoints those workflows and steps to a Postgres database."
- 19DBOS: workflows tutorial (Python)
Recovery from the last completed step; steps never re-executed after they complete; a workflow ID acts as an idempotency key.
- 20DBOS: step factory tutorial (Java)
Names the crash window in which a step runs again and can write twice.
- 21DBOS: upgrading workflow code
Recovery only resumes workflows whose version matches the running application.
- 22DBOS: AI Quickstart
Tells developers to make each LLM and tool call a step; the Python SDK defaults to SQLite, with Postgres recommended for production.
- 23DBOS: Reliable Human-in-the-Loop
DBOS.recv durably waits for human input across server restarts and code upgrades; sent messages are persisted.
- 24DBOS: Workflow Recovery
Each workflow carries the ID of the executor that started it; recovery should happen once per workflow, automatically with Conductor.
- 25DBOS: Workflow Retention Policies
Conductor's time and row retention thresholds and global timeout are disabled by default; running workflows are never deleted.
- 26Inngest: multi-step functions
"A step does not make an external action exactly once."
- 27Inngest: Durable Execution limits
Maximum run length including sleeps: 30 days (Free), 90 (Pro), 366 (Business), custom (Enterprise). A run with five steps uses six executions.
- 28Inngest: versioning
Resumed runs use current code and reuse results from steps whose IDs still match; a changed step "can repeat a payment, email, or resource creation".
- 29Inngest: Durable Agents
Each model call and tool call runs in step.run; waits hold no worker; Sandboxes (beta) keep files and processes between tool calls.
- 30Inngest: Self-host Inngest
A self-hosted Inngest server schedules runs and holds run state while your app serves the function code; single-node mode is labeled beta.
- 31Cloudflare Workflows: rules of Workflows
"Workflows may hibernate and lose all in-memory state".
- 32Cloudflare Workflows: limits
step.sleep up to 365 days; waiting instances do not count toward concurrency limits.
- 33Build a Durable AI Agent
Workflows guide that makes each LLM call and tool call a retryable step whose result is persisted and skipped on resume.
- 34Durable recovery
Think wraps chat turns in fibers, persists partial output, and turns interrupted tool calls into errored tool results.
- 35Sandbox
An agent's sandbox is a container whose files last while it runs and are gone after it stops unless snapshotted.
- 36Agent class internals
Agents are Durable Objects: globally addressable, single-threaded instances with SQLite storage.
- 37Vercel Workflow SDK: event sourcing
State is derived by replaying a persisted event log.
- 38Vercel Workflow SDK: versioning
"Workflow runs are pinned to the deployment that starts them."
- 39Vercel Workflow SDK: idempotency
A retried step can charge a user twice; each step has a stable stepId to use as an idempotency key.
- 40Vercel Workflow: pricing and limits
Maximum run duration and sleep duration: no limit. Maximum replay duration 240 s.
- 41Building Durable AI Agents
Workflow SDK turns LLM calls and tool executions into retryable steps; tool steps retry up to 3 times by default.
- 42Workflows and Steps
Step results are persisted for replay, steps retry up to 3 times by default, and sleep() or webhooks suspend a workflow.
- 43Step executed multiple times
A step whose function invocation crashes before reporting a result is re-tried under its retry policy.
- 44Deploying
Worlds are pluggable storage and queue adapters: the Local World, the Vercel World, or community Worlds for self-hosting.
- 45AWS Lambda durable functions
Executions of up to one year; replay skips completed work; waits incur no compute charges.
- 46AWS Lambda durable functions: idempotency
The execution name is an idempotency key; business logic must still be idempotent.
- 47AWS Lambda quotas
3,000 durable operations per durable execution, which cannot be increased; 100 MB of durable storage written.
- 48Basic concepts (Lambda durable functions)
Checkpoint log and replay; execution timeout 24 hours by default and at most 1 year; retention 14 days by default, 1 to 90.
- 49Idempotency and retries (AWS Durable Execution SDK Developer Guide)
Steps are at-least-once per retry by default; at-most-once per retry raises StepInterrupted instead of re-executing.
- 50Pydantic AI (AWS Durable Execution SDK Developer Guide)
The Pydantic AI integration checkpoints each model request and tool call as a durable step.
- 51Azure Durable Functions: orchestrator code constraints
Event sourcing with replay; orchestrations can run "for days, months, years, or even as an eternal orchestration".
- 52Durable orchestrations
Append-only history in a storage provider, replay, single-threaded instances, durable timers, and external events.
- 53Programming model overview (Durable Task)
Activities run at least once, and the docs ask for idempotent activity logic.
- 54Agentic application patterns
Activities wrap LLM calls and tool invocations; Durable Functions runs on Azure Functions and the Durable Task SDKs on any host.
- 55Trigger.dev: how it works
CRIU checkpoints of a task's entire state, "including memory, CPU registers, and open file descriptors".
- 56Trigger.dev: max duration
maxDuration "sets a maximum compute time limit for tasks": it counts CPU time per attempt, excludes waits, has a 5-second minimum, and can be turned off with timeout.None.
- 57Trigger.dev: limits
On Trigger.dev Cloud "all runs have an enforced maximum TTL of 14 days". The page explains that "TTL governs how long a run may sit queued waiting for a concurrency slot"; it is not a limit on running time. Its "Log retention" table gives 1 day on Free, 7 days on Hobby, and 30 days on Pro.
- 58Runs
Run states and attempts; a run whose worker process crashed is marked Crashed and won't be retried.
- 59Wait for token
Waitpoint tokens pause runs until completed, for approval and human-in-the-loop flows.
- 60Machines
Out-of-memory errors are retried on a larger machine only if the task sets a retry for them.
- 61Trigger.dev: AI agents overview
Example agent tasks, and a durable multi-turn chat agent built with chat.agent(): "A durable session per conversation, with streaming and resumability handled for you."
Agent frameworks and libraries
- 62Cloudflare Agents: long-running agents
"Agents are durable identities, not always-on processes."
- 63Cloudflare Agents: durable execution with fibers
runFiber() checkpoints with stash() and calls onFiberRecovered() after an eviction; keepAlive() alone loses in-progress work if the object is evicted.
- 64LangGraph: checkpointers and durability modes
The exit, async, and sync durability modes and what each loses in a crash.
- 65LangGraph: Graph API, re-execution
A resumed node "runs again from the start of its function".
- 66Persistence
InMemorySaver and MemorySaver keep checkpoints in RAM and lose them on restart; checkpoints accumulate unless pruned; the Agent Server handles persistence.
- 67Interrupts
interrupt() saves state through the checkpointer and waits indefinitely for resume; the interrupted node reruns from its beginning.
- 68LangGraph overview
LangGraph is a low-level orchestration framework and runtime you install with pip.
- 69OpenAI Agents SDK (Python): human in the loop
RunState "is designed to be durable" and can be stored and restored.
- 70OpenAI Agents SDK (JavaScript): human in the loop
A consumed snapshot "does not guarantee exactly-once tool side effects".
- 71OpenAI Agents SDK (Python): run_config.py
DEFAULT_MAX_TURNS = 10.
- 72Running agents
Resuming from a RunState, the max_turns limit, client- versus OpenAI-managed history, and the Dapr, Temporal, Restate, and DBOS integrations for process restarts.
- 73OpenAI Agents SDK
The SDK is a lightweight package; lists sandbox agents with resumable sandbox sessions.
- 74Quickstart (Sandbox Agents)
Sandbox agents get a persistent workspace; later runs reconnect through a sandbox session, saved session state, or a snapshot.
- 75Claude Agent SDK: sessions
The SDK writes the conversation to disk; sessions persist the conversation, not the filesystem.
- 76Claude Agent SDK: hosting
Container-local agent state does not survive a restart; a session does not time out on its own.
- 77Claude Agent SDK: configuration
Turn and spend caps exist; "Both caps are off when unset."
- 78Handle approvals and user input
The canUseTool callback can stay pending indefinitely; a PreToolUse hook can defer so the process can exit and resume later from the persisted session.
- 79Google ADK: resume
Resume restarts from the partially completed state; tools run at least once and may run more than once.
- 80Google ADK: sessions
With the in-memory session service, "All conversation data is lost if the application restarts."
- 81Get action confirmation for ADK Tools
Experimental Tool Confirmation pauses a tool for a FunctionResponse; DatabaseSessionService and VertexAiSessionService are not supported.
- 82Runtime Configuration
max_llm_calls caps LLM calls per run, default 500.
- 83Agent Development Kit (ADK)
What ADK is, and the Runner that manages execution and coordinates with backend services.
- 84Mastra: durable agents
A crashed run stays running with no automatic retry; recovery can reissue model and tool calls; no distributed lease or lock yet.
- 85Pydantic AI: durable execution overview
"A durable engine keeps one run alive across crashes and restarts."
- 86Pydantic AI: durable execution backends
A durable unit can run more than once; tools should be idempotent.
- 87Durable Execution with Temporal
Model requests and tool calls run as Temporal activities; replay, worker, retry, payload-size, timeout, and workspace rules.
- 88Deferred Tools
Approval and external tools can end a run with DeferredToolRequests and resume in a new run with the message history and results.
Pi Durable: posts, code, and issues
- 89Pi Durable
The announcement post for Pi Durable: its definitions, recovery rules, requestId, memos, and compaction defaults. These are the vendor's own claims; where the page relies on them, it checks them against the v1.0.0 code.
- 90Pi 1.0
Release post for Pi 1.0. Says Pi Durable "is available today as an experimental package" and that both are MIT licensed.
- 91pi-durable README at the v1.0.0 release
The experimental notice, "no cross-process locking", the SQLite durability note, the 100 ms progress commits, and spend tracking in pi.usage.
- 92tool.ts: the tool task and its recovery rule
Commits the call's intent before execute() runs. On recovery it reruns only when the stored and the current declaration both say safe; otherwise it reports that the tool "was interrupted and may have partially run".
- 93harness-tools-recovery.test.ts: the interrupted result the model sees
Expected tool results after a crash: any saved output, then a harness note such as "[error] Tool bash was interrupted and may have partially run".
- 94harness/types.ts: the replay declaration
Declares replay as "safe" or "unsafe", with "Default `unsafe`".
- 95types.ts: what a requestId is
Documents requestId as a "Host-provided deduplication key, scoped to the conversation."
- 96submissions.ts: how a repeated requestId is handled
A submission whose requestId is already stored returns the existing submission; the same key with a different submission type throws.
- 97The built-in read, write, edit, and bash tools
We searched these files for a replay declaration and found none, so all four default to unsafe. The four files on the main branch still had none on 2 October.
- 98scheduler.ts: reopening, memos, sleeping, and task versions
On open, tasks left running go back to pending. A memo keeps the first value written. sleep() is an in-process timer loop. A stored task version is compared with the installed one before the task runs again.
- 99generation.ts: model requests after a crash
Appends an interrupted partial answer as an entry with stopReason "aborted" and sends the request again; compacts once when a request is too long. Retry and poll waits keep their wake-up time in the checkpoint.
- 100agent.ts: default retry and compaction settings
maxRetries 3; reserveTokens 16384; keepRecentTokens 20000; backgroundTokens 32768.
- 101jsonl/storage.ts: the JSONL backend
The fsync option is documented as "Defaults to false."
- 102env/index.ts: the execution environment interface
ExecutionEnv combines file-system and shell operations. It has no snapshot or restore operation.
- 103The durable demo app's session lock
The demo takes a file lock with proper-lockfile: "A lock left by a crashed process goes stale after 10 s".
- 104Issue 10325: let a host tell when a harness is only sleeping
Reports that closing and reopening mid-sleep works, and that an in-process timer keeps a Durable Object awake and billed.
- 105compaction.ts: the compaction task
A durable task with select, summarize, and retry phases. The range to summarize is pinned in the checkpoint ("The pinned summarization request."), and the cut never falls on a tool result.
- 106Cloudflare Agents docs: Pi
A beta PiHarness that stores Pi's tables in a Durable Object's SQLite and restarts evicted objects from a 30-second heartbeat alarm. Lists recovery behavior and limitations.
Vendor agents and hosted runtimes
- 107LangSmith Agent Server: self-hosted environment variables
A run that fails with a retriable error goes back on the queue and resumes from the last checkpointed step.
- 108Claude Managed Agents: overview
"Claude Managed Agents is stateful by design".
- 109Claude Managed Agents: events and streaming
An idle session's sandbox is checkpointed; sandbox state is kept only 30 days after the sandbox is created.
- 110Claude Platform on AWS
On AWS a session runs autonomously for up to 6 hours; first-party Managed Agents has no autonomous-session runtime limit.
- 111Claude Managed Agents: budgets
"The cap is enforced between model requests, not mid-request."
- 112Claude Managed Agents: session operations
Session statuses: rescheduling means a transient error occurred and the platform is retrying automatically; terminated follows an unrecoverable error.
- 113OpenAI Agents API: overview
"OpenAI manages sessions, orchestration, context compaction, and recovery".
- 114OpenAI Agents API: environment lifecycle
No guaranteed recovery of pending input after a process crash; replacement compute does not get the old files.
- 115OpenAI: background mode
Responses run server-side and are polled; data is kept about 10 minutes unless stored.
- 116OpenAI Agents API: errors and recovery
A failed turn may already have changed files or called tools; you check saved work and ask the session to continue only unfinished work.
- 117OpenAI Agents API: OpenAI-hosted sandboxes
Files persist across turns while the sandbox exists; it can be deleted after an hour without activity or keep-alives.
- 118OpenAI Agents API: functions
Pending function calls wait in required_actions; for side effects, store results by session, turn, and call ID and check the outcome before rerunning.
- 119OpenAI Agents API: run and continue sessions
Sessions keep configuration, conversation, and saved work; each message submission takes an idempotency key.
- 120Codex cloud
"Each task has its own workspace and can keep working while your computer is asleep."
- 121Codex Cloud: cloud environments
Each task runs in a VM; a task's saved VM state is recoverable for up to seven days after its last turn or resume.
- 122Claude Code: sessions
A tool cut off by a crash "doesn't finish or run again when you resume"; Claude is told to check whether it took effect.
- 123Claude Code on the web
A reclaimed cloud VM comes back with the conversation; background work such as subagents and shell commands is not restored.
- 124Claude Code: agent view and background sessions
A separate supervisor process keeps dispatched sessions running.
- 125Claude Code: environment variables
CLAUDE_CODE_RESUME_INTERRUPTED_TURN continues an interrupted turn with a continuation message instead of resending the prompt.
- 126Claude Code: configure cloud environments
An idle cloud session's VM pauses with its files saved and can later be reclaimed; a reclaimed VM is rebuilt fresh.
- 127About GitHub Copilot cloud agent
An ephemeral environment on GitHub Actions; each session has a hard maximum of 59 minutes.
- 128About GitHub Copilot session data
A cloud agent session's environment is destroyed when the session ends; the session log stays on GitHub.com.
- 129Troubleshooting GitHub Copilot cloud agent
A stuck session times out after an hour; you retry by unassigning and reassigning the issue.
- 130Cursor cloud agents: security and network
Conversation history is kept indefinitely by default; environment snapshots are kept for at most 90 days of inactivity.
- 131Cursor Cloud Agents API
Only one run can be active per agent; a client-supplied agentId makes agent creation idempotent; the workspace persists across runs.
- 132Cursor cloud agents: capabilities
Subscriptions let an agent end its turn and wake on pull request, CI, Slack, Linear, or timer events; a subscription lasts at most 180 days.
- 133Devin: usage
Devin sleeps after 30 minutes of inactivity by default.
- 134Devin: macOS support, session sleep and wake
Disk survives a sleep; "Running processes do not".
- 135Devin: dynamic workflows
An interrupted run resumes by run ID; the default and maximum budget for a run is seven days.
- 136LangSmith Agent Server
PostgreSQL persistence, per-step checkpoints that let an interrupted worker's run resume, leased queue workers, and at most one run per thread at a time.
Concepts, hazards, and costs
- 137Anthropic API pricing
Model and cache prices used in the cost explainer; Managed Agents runtime of $0.08 per session-hour, counted only while running.
- 138Stripe API: idempotent requests
Stripe stores the first result for an idempotency key "regardless of whether it succeeds or fails".
- 139You Cannot Have Exactly-Once Delivery
"Within the context of a distributed system, you cannot have exactly-once message delivery."
- 140How to do distributed locking
Fencing tokens need the storage server to reject writes whose token has gone backwards.
- 141SQLite: write-ahead logging
"All processes using a database must be on the same host computer; WAL does not work over a network filesystem."
- 142How we contain Claude across products
Persisted agent state is a prompt-injection vector that is "reloaded each time the agent starts".
- 143Agents Rule of Two: A Practical Approach to AI Agent Security
Concedes that a background process is hard to fit into its rule. The page answered our browser-style request with HTTP 400 and a plain request with HTTP 200.
- 144OWASP LLM10:2025 Unbounded Consumption
Treats runaway cost as a security risk under "Denial of Wallet".
- 145Claude Code: identity and access
A background session that outlives its login "stops making progress once the credential expires".
- 146AI Agent Bankrupted Their Operator While Trying to Scan DN42
Recounts an autonomous agent that ran for about 24 hours before it was shut down. An email to the DN42 list from an address claiming to be its operator asked for donations toward an "aws bill 6531,30$"; the post headlines the figure as $6531.30.
- 147Anthropic: prompt caching
Changing tool definitions invalidates the entire cache.
- 148Anthropic: compaction on demand
Images, documents, uploads, and fetched URLs in the summarized range are gone.
- 149Anthropic: threshold compaction
Compaction is an extra sampling step that counts toward rate limits and billing.
- 150Claude Code: prompt caching
Resuming sends the whole conversation again; after a break longer than the cache lifetime there is no cache left to read.
- 151OpenAI: conversation state
With previous_response_id, earlier input tokens in the chain are still billed as input.
- 152Introducing Claude Opus 4.7
The updated tokenizer maps the same input to roughly 1.0 to 1.35 times as many tokens.
- 153Opus 4.7's New Tokenizer: What It Actually Costs
Measured 32 to 34 percent more native tokens for production-scale prompts.
Research papers
- 154Crab: A Semantics-Aware Checkpoint/Restore Runtime for Agent Sandboxes
Recovery correctness from 8 to 13% (chat history only) to 100% on the authors' workloads, within 1.9% of fault-free time.
- 155Resume Means Resume: A Machine-Checked Conformance Contract for Checkpoint, Interrupt, and Resume Semantics in Workflow Persistence Layers
Probes five agent workflow frameworks at pinned releases; finds re-executed work after SIGKILL and effects fired k times under concurrent resumes.
- 156Where Does Exactly-Once Live? Model, Harness, and Tool-Contract Effects on Duplicate Side Effects in LLM Agents
25,930 episodes in a simulated sandbox. Duplicate rates by fault type, the effect of idempotency keys, and harness token costs.
- 157Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflows
Irreversible-effect leakage: 0 of 500 with full transactions, 200 of 500 with checkpoint replay, 400 of 500 with saga compensation.
- 158Guardrailed Meta-Agent Loops: Stress-Testing Policy Pinning, Budget Bounds, and Crash Recovery
240 injected crashes: every run recovers the outcome, but only 210 keep the same trace.
- 159AgentRewind: Recoverable Execution for Long-Horizon LLM Agents
Rewinding context and workspace together lifts task success on 82 tasks; effects outside the workspace cannot be undone.
- 160Why Do Multi-Agent LLM Systems Fail?
Develops a failure taxonomy (14 modes in 3 categories) from 150 traces of five frameworks, with human inter-annotator agreement of kappa 0.88, then labels MAST-Data, 1,642 traces from seven frameworks, with an LLM annotator calibrated to kappa 0.77.
- 161AgentFold: Long-Horizon Web Agents with Proactive Context Management
Learned context folding for long web tasks; 36.2% on BrowseComp.
- 162CompactionRL: Reinforcement Learning with Context Compaction for Long-Horizon Agents
Training with compaction reaches 66.4% on 200 sampled SWE-bench Verified tasks, 6.6 points above the base model with inference-time compaction.
- 163AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents
Learning when to compact lifts SWE-bench Verified from 30.4% to 39.6%.
- 164SagaLLM: Context Management, Validation, and Transaction Guarantees for Multi-Agent LLM Planning
Applies the saga pattern with compensation to multi-agent planning; relaxes strict ACID guarantees.
- 165Towards an Agent Operating System - Lessons from Classical and Cloud OS
Argues that agent platforms should consolidate around abstractions extended from classical and cloud operating-system primitives.
Agent analytics in a data warehouse
- 166BigQuery Agent Analytics SDK README on the main branch
Calls BigQuery a "Google Cloud analytics data warehouse" and the SDK "read-only over that table" of agent events; describes trace reconstruction, evaluation, Agent Context Graph decision traces, and long-horizon cross-session memory.