AI agent runtimes are becoming durable event-sourced workflow systems
An agent that survives crashes, approvals, rate limits and multi-day waits cannot live as an in-memory loop. Production runtimes are adopting checkpoints, task state machines, event histories, resumable run snapshots, durable timers and replay-aware orchestration. The difficult boundary is making nondeterministic model calls and external side effects recoverable without repeating, losing or silently changing work.
What is happening?
A durable agent does not simply remember a conversation. It keeps a trustworthy record of what step was reached, which tool calls were requested, which effects completed, what is waiting for approval and what can safely run again after a crash. The runtime stores checkpoints or an event history, reconstructs state on another worker and resumes from a known boundary. Model calls and tools are usually treated as external activities whose results are recorded. That separation lets the orchestration replay without charging for the same model call or repeating the same real-world action. It also creates new responsibilities for versioning, retention, access control and recovery testing.
Why this trend is moving
- 01Agents increasingly run for minutes, hours or days while waiting for humans, external systems, rate limits, timers or remote agents.
- 02A single goal may span many model calls, tool invocations, handoffs and partial artifacts, making process memory insufficient.
- 03Frameworks now expose checkpoints, resumable run snapshots, thread state, durable sessions and task lifecycle protocols as first-class features.
- 04Human approval requires a stable pause boundary that survives worker restarts and preserves the exact action awaiting review.
- 05Retries can duplicate payments, messages, file writes or database changes unless tool effects are idempotent and externally reconciled.
- 06Long-lived runs outlast application deployments, so workflow code, prompts, tools and state schemas must be versioned and migrated safely.
- 07A2A and MCP task models make remote agent work asynchronous, cancellable and pollable, expanding the recovery boundary beyond one runtime.
- 08Audit, privacy and deletion obligations now apply to event histories, checkpoints, traces, artifacts and human decisions—not just chat messages.
What this means in practice
- Give each workflow, task, step, tool invocation, approval and artifact an immutable identity and explicit lifecycle state.
- Separate deterministic orchestration from nondeterministic model calls and side-effecting tools, then persist their accepted results.
- Require idempotency keys or reconciliation logic for every tool that can create an external effect.
- Define checkpoint and event-retention policies by sensitivity, legal need, recovery window and storage cost.
- Version workflow definitions, prompts, tool schemas and state formats because active runs may resume under newer code.
- Model cancellation as a state transition plus compensating work; stopping a worker does not automatically undo completed effects.
- Test crash, timeout, duplicate-delivery, stale-approval, partial-artifact and replay scenarios—not only successful conversations.
- Measure recovery correctness and cost per completed durable task, not only response quality or average latency.
What the headline leaves out
This is the practical technical view: how the system is put together, where it can fail, and what a real deployment asks from the team running it.
How it is built
A durable agent runtime begins with an authenticated task envelope containing tenant, goal, policy, workflow version, input digest and retention class. An orchestrator creates a workflow identity and appends an initial event. A deterministic state machine selects the next node, while model calls, retrieval, remote-agent requests and tools execute as isolated activities with timeouts, retries and idempotency keys. Accepted results are appended to an immutable event history and folded into checkpointed state. A pause manager records approvals, elicitation requests, timers or external-event waits without holding a worker. A dispatcher resumes the workflow on any compatible worker. An effect ledger tracks requested, committed, failed and compensated side effects. A version router keeps old runs on compatible code or migrates state explicitly. Observability correlates events, traces, costs and artifacts. Retention and deletion services govern histories, checkpoints and outputs independently.
How inference behaves
On each transition, the runtime loads the latest checkpoint or rebuilds state by replaying history. Deterministic orchestration decides which activity should occur next. If an activity result already exists for the same invocation identity, replay consumes the recorded result rather than repeating the call. Otherwise the worker executes the model or tool, records the outcome and advances state atomically. Human approval creates an interruption event with a frozen action digest and expiry. Resumption validates the approver, workflow version and pending action before continuing. External events, A2A status updates or MCP task results are correlated through durable IDs. Cancellation prevents new work, attempts to stop active activities and triggers compensation where policy requires it. Recovery is successful only when reconstructed state, effect ledger and external systems agree.
What the tests can miss
Use production-shaped traces with short chats, long tool chains, parallel branches, human waits, remote tasks, cancellations and deployments during active runs. Inject worker crashes before and after model calls, tool execution, event persistence and checkpoint commits. Simulate duplicate deliveries, delayed webhooks, stale approvals, reordered status updates, database failover, schema changes and retention deletion. Report successful resume rate, duplicate-effect rate, lost-effect rate, replay divergence, checkpoint latency, event volume, recovery time objective, recovery point objective, stale-run count, approval integrity, compensation success, trace completeness, storage growth, model and tool cost, and semantic task success after recovery. Compare in-memory loops, checkpoint-only systems, event-history replay and external workflow engines under the same failures.
What deployment involves
Start by assigning durable identities and an append-only effect ledger to the highest-risk tools. Move model and tool calls behind explicit activity boundaries with bounded retries. Add checkpoints at stable graph or workflow boundaries and validate state serialization. Introduce pause and resume for one approval flow before supporting arbitrary long-running work. Canary deterministic replay with shadow recovery and compare reconstructed state. Add workflow-version routing before deploying logic changes while runs are active. Integrate A2A or MCP tasks only after correlation, cancellation and late-result handling are proven. Define retention and deletion before history volume grows. Promote to wider use only after chaos tests demonstrate no duplicate or lost external effects.
Where the risks sit
Durable histories can contain prompts, tool arguments, credentials, retrieved records, reasoning summaries, approvals and generated artifacts. Encrypt state at rest and in transit, separate tenant namespaces, minimize stored payloads and use references for secrets. Bind approvals to exact action digests, actor identity, expiry and policy version. Authenticate push notifications and reject replayed or out-of-order updates. Limit task creation, history size, checkpoint frequency, fan-out, retry count and retention to prevent resource exhaustion. Treat workflow migration and manual state edits as privileged audited operations. Deletion must cover checkpoints, event histories, traces, artifacts, caches and external systems where the workflow copied data.
What it really costs
Complete cost includes model and tool calls, workflow workers, event and checkpoint storage, database indexes, queues, timers, polling, webhook delivery, replay CPU, trace export, encrypted retention, dead-letter handling, compensation, manual recovery and version support for old runs. Fine-grained checkpoints reduce recovery work but increase write volume. Long histories improve auditability but raise storage and replay cost. Compare cost per correctly completed and recoverable task, including duplicated calls, abandoned runs, stale approvals and operator intervention—not only cost per model response.
What the evidence supports
The evidence shows a strong convergence from several directions. LangGraph, OpenAI Agents SDK and Microsoft Agent Framework expose persistent state, resumable execution, checkpoints and human interruption. Temporal and Durable Functions provide established event-history replay, activities, timers, retries and version constraints. A2A defines stateful remote tasks with interrupted and terminal states, streaming and push updates. MCP adds experimental durable task state machines, polling, deferred results and cancellation. Research such as StateFlow and tau-bench reinforces that explicit states, transitions and reliable tool interaction matter for long-horizon performance. The implementation details differ, but the shared production lesson is stable: agent reliability is becoming a distributed workflow and state-management problem.
How it works in practice
A production agent runtime is becoming a durable workflow engine: it must persist state, record accepted nondeterministic results, replay orchestration safely, isolate side effects, survive long waits and preserve enough versioned evidence to recover without duplicating or losing real-world actions.
How the parts work together
The headline technology is only one part of the product. Reliability, security and cost are usually decided by the handoffs around it.
- 01
Authenticate and classify the task
Create a tenant-scoped workflow identity, bind the user goal to an immutable input digest, assign policy and retention classes, and record the workflow, prompt, model and tool-catalog versions that govern the run.
- 02
Append the initial event
Persist task-created and input-accepted events before starting work. The durable record, not worker memory, becomes the source of truth for status, correlation and later reconstruction.
- 03
Execute deterministic orchestration
A state machine or graph selects the next node from recorded state. It may branch, fan out, wait or finish, but replay must make the same orchestration decisions from the same accepted history.
- 04
Run nondeterministic activities
Model calls, retrieval, tools, remote-agent requests and external APIs execute outside replayable orchestration with explicit invocation IDs, timeouts, retry policies, credentials and idempotency controls.
- 05
Commit results and effects
Record accepted activity outputs, usage, artifacts and effect-ledger transitions atomically enough that recovery can distinguish not-started, requested, committed, failed and uncertain outcomes.
- 06
Checkpoint or compact state
Materialize current workflow state at stable boundaries to shorten recovery. Keep enough event history to audit the fold, detect divergence and rebuild when a checkpoint is corrupt or incompatible.
- 07
Pause without holding compute
Persist approvals, elicitation requests, timers, rate-limit waits and remote-task dependencies as durable waiting states. Resume only after validating actor, action digest, expiry and correlation identity.
- 08
Recover, replay and migrate
A compatible worker loads a checkpoint or replays history, consumes recorded activity results and advances from the next safe boundary. Version routing or explicit migration handles runs created under older code and schemas.
- 09
Close, compensate and retain
Emit a terminal state, reconcile external effects, execute required compensations, seal artifacts and apply independent retention or deletion policies to events, checkpoints, traces and outputs.
Estimate the limits before the demo
These equations are planning tools rather than substitutes for testing. They help expose a design that is unlikely to fit its hardware, budget, reliability or risk limits.
Expected duplicate-effect exposure
E_dup = Σ_i P(retry_i after uncertain commit) × Impact_i × (1 − Idempotency_i) Duplicate risk concentrates where a worker can fail after an external system commits but before the runtime records success. Strong idempotency or reconciliation reduces the residual exposure.
- A read-only search has low impact even when repeated.
- A payment, email send or ticket creation needs a stable external idempotency key.
- A tool returning an ambiguous timeout should enter reconciliation rather than blind retry.
Recovery work
R_work = Events_since_checkpoint × Replay_cost + Uncertain_effects × Reconciliation_cost Checkpoint frequency changes replay work, but side-effect ambiguity often dominates actual recovery effort.
- Frequent checkpoints shorten replay but increase writes and storage.
- Recorded model results prevent replay from purchasing the same inference again.
- An uncertain external commit may require querying the destination system before continuing.
Durable completion goodput
G_durable = Correct_completed_tasks / (Compute_time + Wait_overhead + Recovery_time + Operator_time) Raw task throughput hides workflows that complete incorrectly, duplicate effects or require manual repair after failure.
- A faster in-memory loop can have lower durable goodput if crashes restart the whole task.
- Human wait time should not consume active worker capacity.
- Recovery drills reveal operator effort that normal benchmarks omit.
Retention footprint
Storage = Σ_t (Event_bytes_t × Retention_t + Checkpoint_bytes_t × Count_t + Artifact_bytes_t × Retention_t) Event histories, materialized checkpoints and artifacts have different value and sensitivity, so one global retention period is rarely appropriate.
- Keep compact effect metadata longer than raw prompts when audit needs allow it.
- Large artifacts can live in object storage while events retain content-addressed references.
- Deletion workflows must remove derived checkpoints and traces, not only the latest state.
Conversation memory and durable execution solve different problems
A session can preserve prior messages yet still lose the current step, repeat a tool call or forget that an approval was already granted. Durable execution must preserve control state, not only conversational context.
The minimum durable record includes workflow identity, current node, accepted inputs, activity identities, results, pending approvals, timers, external correlations and terminal status. Message history is only one field in that state.
This distinction matters because an apparently fluent resumed conversation can still be operationally wrong. The user may see the right words while the system sends a second refund or abandons an already-created artifact.
- Memory answers: what context should the model see?
- Durability answers: what work happened, what is pending and what may safely happen next?
- Audit answers: who or what authorized each transition and effect?
Event history becomes the operational source of truth
Event-sourced and checkpointed runtimes record meaningful transitions rather than relying on a mutable object inside one worker. Current state is produced by folding accepted events or loading a materialized snapshot plus later events.
A useful event envelope carries workflow ID, step ID, event type, sequence or logical time, actor, input and output digests, workflow version, tool or model version, correlation IDs and policy metadata. Payloads should be minimized and encrypted when sensitive.
Event ordering must be explicit. Remote callbacks, push notifications and retries may arrive late or more than once. The runtime needs deduplication, monotonic state transitions and a policy for events that conflict with a terminal state.
- Append intent before work when loss would be dangerous.
- Append accepted outcome before advancing orchestration.
- Use terminal-state guards so late callbacks cannot reopen a completed or cancelled task.
Deterministic orchestration must isolate nondeterministic work
Replay re-runs orchestration code to rebuild state. Calls to models, clocks, random generators, network services and mutable databases cannot execute freely inside that replay path because they may return different results.
Durable systems therefore treat model calls and tools as activities. The first execution records an accepted result. Later replay reads that result from history and reaches the same orchestration decision without repeating the activity.
The boundary is architectural, not cosmetic. A helper function that quietly reads current time or fetches remote configuration can make replay diverge. Determinism reviews should cover libraries, callbacks, routing logic and dynamic prompt construction.
- Use recorded logical time inside orchestration.
- Keep random choices as recorded activity outputs or deterministic seeds.
- Version mutable policy inputs and resolve them before a replay-sensitive decision.
The effect ledger is more important than the retry loop
Network timeouts are ambiguous. A destination may have committed an action even though the caller did not receive the response. Retrying without identity can create duplicates; assuming failure can lose completed work.
Each side-effecting tool call should receive a durable invocation ID that is also sent to the destination as an idempotency key or business reference. The runtime records requested, dispatched, acknowledged, committed, failed, compensated or uncertain status.
When the destination does not support idempotency, recovery needs reconciliation: query by business key, inspect a ledger, or require human review. Exactly-once execution is usually an application protocol built on at-least-once delivery, not a property supplied by the queue alone.
- Reads can usually retry more freely than writes.
- Create operations need stable external identities.
- Updates need version checks or compare-and-set semantics.
- Irreversible actions need stronger approval and evidence.
Approval is a durable state transition, not a modal dialog
A human may answer hours after the original worker is gone. The pending request must therefore include the exact action, arguments, resource identity, risk classification, policy version and expiry that were shown for approval.
Resumption verifies the approver and compares the stored action digest with the action about to execute. If the plan changed, credentials expired or target state drifted, the old approval should not silently authorize the new action.
Accept, decline, cancel and timeout are different outcomes. The workflow should model each explicitly, including escalation, re-planning, compensation and user-visible status.
- Never approve only a vague natural-language summary for a high-impact tool.
- Expire approvals when context or target state can materially change.
- Record who approved, when, under which policy and from which authenticated channel.
A2A and MCP extend durability across service boundaries
Remote agent work increasingly returns a task identity rather than a synchronous answer. The caller may poll, stream, receive push updates, provide more input, cancel or retrieve a deferred result later.
Local workflow state must map remote states into its own lifecycle without assuming identical semantics. A remote input-required or auth-required state may pause the parent workflow; a late completion after local cancellation may require artifact quarantine or compensation.
Correlation IDs, authenticated callbacks, sequence handling and terminal-state rules become part of the agent contract. Protocol support does not automatically make the underlying execution durable; both sides must persist enough state to honor the lifecycle.
- Persist remote task ID and context ID before disconnecting.
- Verify webhook authenticity and ownership before accepting updates.
- Treat optional notifications as hints; keep a polling or reconciliation path.
- Define retention and deletion expectations across both organizations.
Checkpoint boundaries trade write cost for recovery work
Checkpointing after every small mutation can create excessive storage and contention. Checkpointing only at the end can make long tasks expensive to recover. The useful boundary is usually a stable superstep, node completion or accepted external result.
Checkpoints must be schema-versioned and integrity-checked. A corrupt or incompatible checkpoint should fall back to an earlier snapshot plus event replay rather than becoming a single point of failure.
Compaction can summarize old conversational context while preserving operational events and effect metadata. The system should distinguish model context compaction from audit-history deletion.
- Measure checkpoint write latency and size at the tail, not only average.
- Retain enough history to validate or rebuild snapshots.
- Test recovery when the newest checkpoint is missing or partially written.
Active workflows turn every deployment into a compatibility decision
A workflow started under one graph, prompt, tool schema or model may resume after several deployments. Replaying old history through changed orchestration can cause nondeterminism or reinterpret stored state incorrectly.
Production systems need a policy: pin active runs to the old worker, route by workflow version, patch only explicitly compatible changes, or migrate state through a tested transformer. Silent best-effort continuation is unsafe.
Model and tool upgrades can also alter behavior even when orchestration code is unchanged. Store version identities with accepted results, and canary resumed runs that cross a version boundary.
- Keep old workflow code available for the maximum supported run lifetime.
- Version prompts and tool contracts as deployable dependencies.
- Reject resume when required migrations or capabilities are unavailable.
Cancellation stops future work; compensation handles completed work
A cancel request may arrive while a model call, tool or remote agent is already running. The runtime can mark the workflow cancelled and attempt to stop outstanding work, but it cannot assume the external world rolled back.
Compensation is domain-specific. It may delete a draft, revoke a reservation, send a corrective message or open a manual case. Some actions are irreversible and can only be acknowledged and contained.
Cancellation races need clear precedence. Once a task is terminal, late completion events should not change its public state, though they may update an internal reconciliation record.
- Propagate cancellation with durable correlation IDs.
- Record whether each activity honored cancellation.
- Run compensation as its own observable, retryable workflow.
- Surface partially completed outcomes honestly to the user.
Logs are not enough for reconstructing an agent decision
Distributed logs can be incomplete, reordered or sampled. A durable workflow needs a canonical execution history plus traces that explain model calls, tools, handoffs, approvals, retries, waits and costs.
Trace IDs should link to workflow, task, step, model request, tool invocation, remote task and artifact identities. The canonical state machine and the observability system should agree on terminal status and effect outcomes.
Operational dashboards should highlight stuck waits, repeated retries, uncertain effects, stale approvals, version-incompatible runs, dead letters and histories approaching retention limits.
- Separate canonical events from optional high-volume diagnostics.
- Do not sample away approval or side-effect evidence.
- Make manual state edits and replay forks visible as privileged events.
Durability multiplies the number of places sensitive data can persist
An agent may copy the same personal or confidential value into messages, normalized state, model requests, tool arguments, checkpoints, traces, artifacts and remote tasks. Deleting one session row does not remove those derivatives.
Classify fields before persistence. Store secrets by reference, redact model traces where possible, encrypt tenant data and apply purpose-specific retention. Operational effect metadata may need to outlive raw content, but that should be an explicit policy.
Time travel and replay are powerful but can expose historical data or revive actions the user believed were deleted. Authorization should be evaluated for historical inspection and fork operations, not only live execution.
- Inventory every persistence layer and backup path.
- Use content-addressed artifacts with revocable access controls.
- Propagate deletion to remote systems and derived indexes.
- Test restore procedures against deletion and legal-hold rules.
Recovery correctness must be tested with adversarial timing
Normal integration tests rarely hit the dangerous windows: after an external commit but before event persistence, during checkpoint replacement, between approval and execution, or while a deployment changes replay logic.
A useful chaos harness can terminate workers at named boundaries, duplicate queue deliveries, delay callbacks, reorder remote updates, corrupt a checkpoint, fail a database leader and force a version migration. The expected effect ledger and terminal state should be asserted after each run.
Evaluation must also preserve task quality. A recovered agent that avoids duplicate effects but loses crucial context or changes its answer is not fully correct.
- Run the same failure seed repeatedly to verify deterministic recovery.
- Compare external-system truth with internal effect state.
- Measure operator steps required to repair uncertain outcomes.
- Keep a rollback path for both code and in-flight workflow state.
What a benchmark worth believing should report
A performance number means little unless the workload, system configuration and quality bar are fixed. This is the minimum record a team should keep.
| Metric | How to measure it | Why it matters |
|---|---|---|
| Resume success rate | Share of interrupted runs that reach the correct terminal state without manual state repair | The primary promise is reliable continuation after process or infrastructure failure. |
| Duplicate-effect rate | Externally duplicated writes per 10,000 side-effecting activity attempts | Retries are harmful when they repeat business actions. |
| Lost-effect rate | Committed external effects missing from durable workflow state or expected effects never dispatched | A system can avoid duplicates while still silently losing work. |
| Replay divergence | Runs whose reconstructed control state differs from the recorded expected state under the same history | Divergence identifies nondeterministic orchestration and incompatible deployments. |
| Recovery time objective | P50, P95 and P99 time from worker loss to resumed useful progress | A recoverable workflow may still violate the product service level if recovery is slow. |
| Approval integrity | Rate of resumed actions whose digest, actor, expiry and policy version match the approved record | Human control is only meaningful when approval binds to the actual action. |
| Checkpoint efficiency | Checkpoint bytes, write latency and replay events avoided per task | Checkpointing has a real storage and tail-latency cost. |
| Remote task reconciliation | Correct handling of duplicate, delayed, missing and post-cancellation A2A or MCP updates | Distributed agent workflows fail at protocol and correlation boundaries. |
| Semantic recovery quality | Task correctness after recovery compared with uninterrupted execution under matched inputs | Operational consistency must not erase context or degrade the final result. |
| Complete durable-task cost | Model, tool, worker, queue, storage, replay, compensation and operator cost per correct completed task | Response-level cost misses abandoned runs and recovery overhead. |
Four sensible deployment patterns
Checkpointed graph runtime
- Where it fits
- Interactive agents with explicit nodes, human approvals and moderate-duration workflows
- What you take on
- Simple integration, but side-effect idempotency and version routing remain application responsibilities.
External durable workflow engine
- Where it fits
- High-value, long-running or cross-service tasks that need timers, retries, event history and strong operational tooling
- What you take on
- Adds infrastructure and deterministic-code constraints but provides mature recovery primitives.
Session plus serialized run snapshot
- Where it fits
- Approval-based agents that pause at a small number of controlled boundaries
- What you take on
- Lower complexity, but less suitable for broad arbitrary replay or many parallel activities.
Protocol-backed remote task orchestration
- Where it fits
- A2A or MCP work delegated to independently operated agents or long-running tools
- What you take on
- Improves interoperability while adding callback authentication, correlation and lifecycle-mapping complexity.
Effect-ledger wrapper around an existing agent loop
- Where it fits
- Incremental hardening where rewriting the full runtime is not yet practical
- What you take on
- Reduces duplicate writes first, but in-memory control state can still be lost between durable boundaries.
Hybrid durable core with ephemeral micro-agents
- Where it fits
- A governed workflow owns state while short-lived specialist agents perform bounded activities
- What you take on
- Keeps replay boundaries clear, but requires strict contracts for specialist inputs, outputs and retries.
Where projects usually go wrong
Worker crash after external commit
What you see: The activity retries and creates a duplicate action
What to do: External idempotency key, durable invocation ID and post-timeout reconciliation.
Nondeterministic replay
What you see: Recovered control flow selects a different node or tool than the original run
What to do: Keep model, time, randomness and mutable I/O outside orchestration; version routing for active runs.
Stale approval
What you see: An old approval authorizes changed arguments or a changed target resource
What to do: Bind approval to action digest, target version, expiry, approver and policy revision.
Checkpoint corruption or incompatibility
What you see: The latest state cannot deserialize or resumes with missing fields
What to do: Checksums, schema versions, previous snapshots and event-history rebuild.
Late remote completion after cancellation
What you see: A cancelled parent task publishes an unexpected artifact or effect
What to do: Terminal-state guard, quarantine late results and reconcile or compensate externally.
Unbounded history growth
What you see: Storage, replay latency and context costs increase continuously
What to do: Purpose-specific retention, checkpoint compaction, artifact references and archival tiers.
Cross-tenant state collision
What you see: A resumed workflow loads another tenant or session state
What to do: Tenant-scoped composite keys, authorization on every state read and isolated encryption domains.
Retry storm
What you see: Provider outage triggers synchronized model or tool retries and worsens overload
What to do: Exponential backoff, jitter, retry budgets, circuit breakers and durable timers.
Incomplete deletion
What you see: Deleted user data remains in checkpoints, traces, artifacts or remote tasks
What to do: Data-lineage inventory and deletion workflow covering all derivatives and backups.
Compensation failure
What you see: Cancellation or rollback leaves a partial real-world transaction
What to do: Compensation as a durable workflow with retries, escalation and explicit partially-completed status.
A checklist you can actually use
- Define immutable workflow, task, step, activity, approval and artifact identities.
- Separate deterministic orchestration from model calls, tools and mutable external reads.
- Assign idempotency or reconciliation controls to every side-effecting tool.
- Record effect state independently from conversational history.
- Specify checkpoint boundaries and validate snapshot integrity and schema versions.
- Define replay behavior for model results, retrieval outputs and remote callbacks.
- Bind approvals to exact action digests, actor identity, expiry and policy version.
- Model accept, decline, cancel, timeout and auth-required as distinct transitions.
- Version workflow code, prompts, model configuration, tools and state migrations.
- Keep compatible workers or migration paths for the maximum active-run lifetime.
- Authenticate A2A or webhook updates and deduplicate every remote event.
- Define terminal-state precedence and late-result handling.
- Set retention and deletion policies for events, checkpoints, traces and artifacts.
- Instrument stuck waits, uncertain effects, retry storms and replay divergence.
- Run crash injection at pre-commit, post-commit and checkpoint boundaries.
- Measure cost and correctness per completed recoverable task, including operator work.
Terms worth knowing
- Activity
- A nondeterministic or side-effecting unit executed outside replayable orchestration and recorded as an accepted result.
- Checkpoint
- A materialized snapshot of workflow state at a durable execution boundary.
- Compensation
- A follow-up action intended to reverse or contain an already-completed side effect.
- Deterministic replay
- Re-executing orchestration against recorded history so it reaches the same control decisions.
- Durable timer
- A persisted wait that does not require a worker to remain active.
- Effect ledger
- A durable record of requested, committed, failed, uncertain and compensated external actions.
- Event history
- An ordered record of accepted workflow transitions and activity outcomes.
- Event sourcing
- Deriving current state by folding an append-only sequence of domain events.
- Idempotency key
- A stable request identity that lets a destination recognize and suppress duplicate effects.
- Interrupt
- A persisted pause awaiting human input, approval or another external event.
- Late result
- An activity or remote-task outcome arriving after local cancellation, timeout or terminal completion.
- Logical time
- Replay-safe time derived from workflow history rather than the current wall clock.
- Pending write
- A completed node output persisted before the full superstep checkpoint commits.
- Reconciliation
- Comparing internal workflow state with an external system to resolve an uncertain effect.
- Recovery point objective
- The maximum acceptable amount of durable progress that can be lost after failure.
- Recovery time objective
- The target time to restore useful workflow progress after failure.
- Run snapshot
- Serialized state sufficient to resume a paused or interrupted agent execution.
- Workflow version
- The immutable identity of orchestration logic and compatible state schema used by an active run.
Primary references and technical starting points
These sources support the architecture, runtime, benchmark and security claims. Vendor capabilities can change, so the article records the distinction between established evidence, measured product behavior and editorial interpretation.
- 01 LangGraph overview — durable execution and long-running stateful agentsdocs.langchain.com
- 02 LangGraph persistence — checkpoints, threads, pending writes and replaydocs.langchain.com
- 03 LangGraph interrupts — persistent pause and resume semanticsdocs.langchain.com
- 04 LangGraph time travel — replay and checkpoint forksdocs.langchain.com
- 05 LangGraph v1 — stable durable runtime primitivesdocs.langchain.com
- 06 OpenAI Agents SDK — sessions, human intervention and tracingopenai.github.io
- 07 OpenAI Agents SDK sessions — persistent history and interrupted-run resumeopenai.github.io
- 08 OpenAI Agents SDK RunState — serializable pause and resume boundaryopenai.github.io
- 09 OpenAI Agents SDK running agents — loop, state and continuation strategiesopenai.github.io
- 10 OpenAI Agents SDK tracing — model, tool, handoff and guardrail spansopenai.github.io
- 11 OpenAI Agents SDK usage — per-run request and token accountingopenai.github.io
- 12 OpenAI Agents SDK JavaScript sessions — resumable runs and custom storageopenai.github.io
- 13 Microsoft Agent Framework Durable Extension — persistent sessions and recoverylearn.microsoft.com
- 14 Durable Task extension for Microsoft Agent Frameworklearn.microsoft.com
- 15 Microsoft Agent Framework workflow execution — deterministic superstepslearn.microsoft.com
- 16 Microsoft Agent Framework workflows — graphs, HITL and checkpointinglearn.microsoft.com
- 17 Microsoft Agent Framework state — visibility, isolation and persisted threadslearn.microsoft.com
- 18 Microsoft Agent Framework checkpoints — save and resume workflow statelearn.microsoft.com
- 19 Microsoft Agent Framework events — lifecycle, progress and approval eventslearn.microsoft.com
- 20 Azure Durable orchestration versioning — replay-safe deploymentslearn.microsoft.com
- 21 Azure Durable Functions overview — state, checkpoints, retries and recoverylearn.microsoft.com
- 22 Temporal documentation — durable execution fundamentalsdocs.temporal.io
- 23 Temporal platform — event history, activities, timers and recoverytemporal.io
- 24 Temporal agentic AI — durable tools, conversations and human interventiontemporal.io
- 25 Temporal AI agent framework pattern — retries, HITL and audit historygo.temporal.io
- 26 A2A protocol 0.3 specification — stateful task lifecyclea2a-protocol.org
- 27 A2A key concepts — tasks, artifacts, streaming and push updatesa2a-protocol.org
- 28 A2A streaming and asynchronous operations — disconnected long-running tasksa2a-protocol.org
- 29 A2A life of a task — interrupted, terminal and follow-up statesa2a-protocol.org
- 30 MCP base protocol — lifecycle, messages, capabilities and metadatamodelcontextprotocol.io
- 31 MCP tasks — durable state machines and deferred result retrievalmodelcontextprotocol.io
- 32 MCP cancellation — stopping in-progress requestsmodelcontextprotocol.io
- 33 MCP elicitation — accept, decline and cancel user decisionsmodelcontextprotocol.io
- 34 Amazon Bedrock agent session state — persistent context and action resultsdocs.aws.amazon.com
- 35 Amazon Bedrock trace events — orchestration, observations and failuresdocs.aws.amazon.com
- 36 Amazon Bedrock custom orchestration — explicit multi-step state transitionsdocs.aws.amazon.com
- 37 Amazon Bedrock SessionState API — invocation correlation and persisted attributesdocs.aws.amazon.com
- 38 Google ADK BaseSessionService — sessions, events and state deltasgoogle.github.io
- 39 StateFlow — state-driven workflows for language-model agentsarxiv.org
- 40 tau-bench — reliable tool-agent-user interaction evaluationarxiv.org