How Agentic Durable Execution Cuts Rework and Token Spend in Long-Running Agents
Long-running AI agents re-spend tokens on every completed step after a failure. Agentic durable execution ends the rework by resuming at the failure point instead of restarting from the top.
Haziqa Sajid
Technical Writer
Picture this. An autonomous agent has been running for forty-three minutes. It has queried three internal APIs, called an LLM eleven times, pulled context from a vector database, invoked two tools, and is halfway through drafting the final response. Then the request to the LLM provider times out on call number twelve, an exception propagates up the stack, and the process dies.
Without durable execution, the next run starts from step one. Every API call gets repeated. Every LLM invocation happens again. The vector database gets hit a second time. The tokens you already paid for get paid for again, and the wall clock resets to zero.
This is not a token-per-call problem. Smaller models or better prompt engineering will not fix it. Semantic caching lowers the per-call price when a new call is similar to an earlier one, but it does not stop the re-run from happening. The workflow is still traversing steps it has already completed, still calling tools and APIs that were not cacheable to begin with. This is a workflow execution problem, and it belongs in a different category of waste, which is paying twice for work that was already completed.
This is the waste that Diagrid Catalyst's agentic durable execution eliminates. Workflows resume from the exact step that failed instead of restarting from the top, completed steps stay committed across crashes and restarts, and the tokens you already paid for don't get paid for again.
This article walks through the mechanics of that waste, how agentic durable execution eliminates it by resuming from the exact point of failure, and why "we already save state" does not get you to the same place.
Why long-running agents make failure disproportionately expensive
A chatbot fits into one request-response turn. If it fails, you retry. One call in, one call out, and the token cost of a retry roughly equals the token cost of the original call.
An agent is a different category entirely. A single user request expands into a chain of reasoning steps, tool calls, sub-agent invocations, and LLM calls that can run for minutes or hours. Each step consumes tokens. Each step produces a state that the next step depends on. And each step is a potential failure point.
Now consider what happens when step 8 of a longer workflow throws an exception without durable execution. The standard retry pattern, which requires restarting from the top, worked fine for the chatbot. For the agent, it means paying for steps 1 through 7 twice, even though they completed the first time successfully. If the workflow fails again on the retry, you are paying for those same completed steps a third time.

Figure 1. Without durable execution, a failure at step 8 means restarting from step 1 and re-paying every completed step's token cost.
The problem compounds along two axes. Longer workflows mean more completed steps at risk of being re-executed. Failures late in the workflow mean a higher fraction of total spend gets paid twice on restart. Together they produce an ugly property: the more valuable the work an agent is doing, the more expensive its failures become.
Generic LLM cost optimization does not touch this. Cheaper models change the per-call price. Caching cuts repeated identical calls. Neither addresses re-executing an entire workflow's worth of committed work because a single downstream step happened to fail.
How agentic durable execution handles failures
Legacy durable execution engines bet on replay. Record the inputs to each step, re-run the workflow, and get the same result because deterministic code produces the same output for the same input.
But "preserving progress" means something different for agents than for the deterministic systems this idea grew up in. Agents reason, branch, and make non-deterministic tool calls. Replaying an agent's reasoning does not guarantee reproducing the original trajectory. Durable execution retrofitted for agents ends up either losing its guarantees or constraining the agent so hard it stops being useful.
Diagrid Catalyst's agentic durable execution addresses exactly this issue. It is a reliable and secure platform for running agentic workloads in production, with the Dapr runtime, state stores, and message brokers managed for you. The durable execution capability is one part of what it delivers, and it works by making one specific guarantee: the runtime commits workflow state after every step, so if a failure occurs, execution resumes from the exact step that failed rather than the beginning.
At a high level, the pattern looks like this. When a workflow starts, the runtime records it. When a step completes, the runtime commits the result before advancing. When a step fails, the runtime keeps everything already committed and marks the failing step for retry. On resume, whether that is seconds later after a transient network error or hours later after a full pod restart, the workflow picks up exactly where it left off.

Figure 2. With agentic durable execution, committed steps stay committed. The runtime resumes at the failing step, and the earlier work is never re-executed.
The result is that re-execution of already-completed work drops to zero. Steps 1 through 7 in the earlier example are paid for once regardless of what happens at step 8. The runtime does not care whether the failure was a timeout, an out-of-memory error, an entire node going down, or a deploy that restarted the service. From the workflow's perspective, it is the same event: pause, wait for the environment to recover, resume from the next step.
What durable execution changes about token cost
Without durable execution, a workflow that fails at step N re-executes steps 1 through N-1 on every restart attempt. If the completed steps cost T tokens and the workflow needs R retries, rework costs on the order of T × R. Real runs vary at the edges, but the shape holds. Every retry re-pays for work that has already been completed, and the total scales with the retry count.
With durable execution, that same workflow pays for steps 1 through N-1 exactly once, regardless of R. The healthy-run cost is unchanged. The rework cost goes to zero.

Figure 3. Cumulative token spend across three attempts. The gap between the lines (0k, 7k, 14k) is rework, which durable execution eliminates.
Two properties of this are worth pulling out.
First, the savings scale with workflow length. A 3-step workflow that fails at step 3 wastes the tokens for steps 1 and 2 on restart. A 30-step workflow that fails at step 28 wastes the tokens for 27 completed steps. The longer and more complex your agents get, the more durable execution is worth. Teams that start with short workflows and grow into longer ones often find this out the hard way, when a month-over-month LLM bill jumps, and nobody can explain why.
Second, the savings show up in step-level execution history rather than as an abstract number. When you can see which steps ran, which committed, and which resumed from state, you can measure the rework you did not do. That turns the savings from theoretical into auditable, which matters when finance asks where the number came from.
However, there is a limitation. Durable execution does not make a healthy workflow cheaper. If your agent runs to completion on the first try, the token cost is the same whether or not durability is on. What durable execution does is remove the tax that failures used to impose on top of that healthy cost. In production, where failure is a given rather than an exception, that tax is where the money actually goes.
Why "we already save state" is not the same
Ask a team how they'll solve this, and the answer is usually "we save state". Checkpoints, conversation history, agent memory. It feels like the fix. It isn't, quite. Saving state and durable execution are architecturally distinct. Saving state means the data exists somewhere, whether that's a conversation history, a checkpoint file, or a snapshot of the agent's memory. Durable execution means the runtime uses that state to guarantee which units of work run and which get skipped on resume. The first is a data property. The second is an execution guarantee.
Take a checkpoint-based framework like LangGraph. Its checkpointer saves state at node boundaries, so after each graph node completes, a checkpoint gets written. On resume, execution jumps back to the last checkpoint and continues from there. That is a real improvement over restarting from the top, but it leaves two gaps that agentic durable execution closes.
The first gap is granularity. Checkpointing is per-node. If a node contains multiple LLM calls and tool invocations and it fails partway through, the entire node re-executes on resume, including everything that is already completed inside it. Agentic durable execution commits at the step level, so a failure inside a step does not cause its earlier work to re-run.
The second gap is where the recovery guarantee lives. In a checkpoint framework, recovery semantics are the application's concern. Retry policies, idempotency handling, and edge cases like partial writes to external systems are things the team building the agent has to reason through and implement by hand. With agentic durable execution, the runtime provides those semantics as a formal guarantee. Completed steps are marked as completed at the infrastructure level and skipped on resume.
Durability is a guarantee about what runs and what does not, enforced by the runtime. Checkpointing only records where the workflow stopped; the logic for what to do next has to be written separately on top of it. Durable execution bundles both together, so the runtime itself knows how to resume and continue the workflow from that point.
There is a second-order benefit here for engineering teams. When failure recovery is the runtime's job, it stops being the application's job. Nobody has to hand-roll checkpointing for every new agent. Nobody has to reason through retry semantics for every new tool call. Nobody has to explain to a new hire why one workflow retries idempotently and another one does not. The rework you were doing on failure recovery code disappears at the same time the rework you were doing on tokens does.
The bottom line
Rework in long-running agents was a cost with an unpleasant shape. It compounded with workflow length. It compounded with failure rate. And it grew as agents took on more valuable, longer-running tasks, which is exactly the direction production workloads are moving. Agentic durable execution turns that variable, compounding cost into a fixed one: every completed step is paid for once, regardless of what fails later. The engineering time your team spent building and maintaining ad-hoc recovery paths comes back with it.
The same execution history that makes durability work is also what makes verifiable execution possible. Once every step is committed to a persisted record, that record can be cryptographically signed, chained, and attested. The workflow log that lets Diagrid Catalyst resume from step 8 without re-paying for steps 1 through 7 is the same log that verifiable execution signs and chains, giving compliance teams a defensible record of exactly what the agent did and cryptographic proof that nothing was altered afterward. Resilience and defensible trust turn out to share a foundation, which is worth exploring on its own.


