
Coding-agent infrastructure has a messaging problem.
Most articles describe agents as if the hard part were model quality, prompt design, or tool selection. In production, however, a less glamorous failure mode often matters more: the process running the agent can crash, time out, or disappear before the session is complete.
That is the problem addressed by durable-harness for coding agents, an experimental open-source package designed to preserve coding-agent sessions across failures. It wraps existing harnesses instead of requiring teams to rewrite them, stores session progress in durable logs, and uses queued work to allow another function to continue after the original execution dies.
The engineering is important. So is the way the idea is explained.
A strong technical article needs a title that creates tension without making claims the implementation cannot support. The following four controversial blog title formulas are designed for that job. Each formula includes an example related to agent reliability, the engineering idea behind it, and implementation considerations for teams evaluating durable execution.
1. “Your [familiar tool] Is Not Built for [production condition]”
Example:
“Your Coding Harness Was Built for a Laptop, Not a Cloud Failure”
This formula is effective because it challenges an assumption many engineering teams hold: if a coding harness works locally, it should work unchanged in a serverless or distributed environment.
That assumption is incomplete.
Harnesses such as Pi, OpenCode, Claude Code, and Codex were generally designed around long-running local processes. The process, session history, workspace files, and tool execution environment are usually close together. If the process remains alive, the harness can continue from its in-memory state or local files.
Cloud execution changes the failure model. A function may time out while a model request is still running. A replacement function may start on a different machine. The original disk may no longer be available. Even worse, the system may not know whether a model or tool call completed before the failure.
The problem resembles moving a workshop from a garage to a fleet of temporary shipping containers. In the garage, the tools, notes, and unfinished work are all in one place. In the containers, any one unit can disappear. Without an external record, the next worker cannot tell whether a task was completed or merely started.
That is where durable-harness becomes useful. Rather than asking the coding harness to become a distributed system, the package places an adapter around it. The adapter stores the session in a Workflow SDK World, an interface that bundles storage, queues, and streams behind a common abstraction.
For each turn, the system can record:
- The intent before a model or tool call begins
- The outcome after the call completes
- The session transcript or event data
- The state of work that has completed, started, or not yet started
- The information required for a replacement function to continue
This creates a durable log for the agent session. A dead function no longer automatically means lost work.
The implementation question is not simply whether logs exist. It is whether the log is authoritative enough to support recovery. Teams should define the states that matter and make them explicit. “Request sent” is not the same as “model response committed.” “Command started” is not the same as “workspace change verified.”
The title formula works because it exposes an infrastructure mismatch. Local-first harnesses are not defective; they are optimized for a different environment. The controversial point is that cloud deployment does not magically provide durability. If the execution model changes, the state model must change too.
2. “Stop Replaying [expensive or dangerous action]”
Example:
“Stop Replaying Agent Calls After a Crash”
A retry is normally presented as a safety mechanism. If a request fails, try again. That logic is reasonable for many idempotent operations. It becomes dangerous when the operation may already have succeeded.
Suppose an agent asks a model to inspect a repository and generate a plan. The function crashes after the model returns but before the application writes a local completion marker. A replacement function sees no completion marker and calls the model again. The result may be similar, but the team has paid twice for the inference and potentially introduced divergent reasoning.
Now consider a tool that opens a pull request, sends a message, modifies an external ticket, or deploys a change. Blind replay can produce duplicate side effects.
A durable log gives the recovery process more precise information. After a crash, it can show which calls completed, which were running, and which never started. Completed calls can be read from the log rather than executed again.
This is the core of agent session recovery: recovery is not equivalent to restarting the entire turn. It is selective continuation based on recorded state.
The phrase safe vs never replay is useful here. Tool policies should distinguish between operations that may be safely repeated and operations that must never be repeated automatically.
A practical policy might look like this:
- Safe to replay: Read-only repository inspection, deterministic parsing, local analysis, or a metadata lookup with no side effect.
- Replay with verification: Operations that can be repeated only after checking an idempotency key, resource version, or previous result.
- Never replay: Sending messages, creating external records, merging code, charging a customer, or triggering an irreversible deployment.
The distinction is similar to restarting a dishwasher versus resending a wire transfer. Restarting the dishwasher may waste time but usually does not create a second financial obligation. Repeating the transfer without checking its status can create a serious duplicate.
For implementation, every tool should have an explicit replay classification. Do not leave this decision to a generic retry wrapper. Store the tool intent, arguments, execution status, and result where possible. For external side effects, use idempotency keys or a read-before-write verification step.
Model calls also deserve attention. Teams may decide that completed model calls should always be read from the durable log and never re-run. That approach can prevent duplicate token billing and reduce nondeterministic divergence. However, it increases the importance of log retention, access control, and schema compatibility.
A controversial title earns attention by challenging “retry everything” as a universal reliability strategy. The engineering lesson is more nuanced: retries are valuable only when the system knows what happened before the failure.
3. “Your Agent Does Not Need More Intelligence. It Needs a Better [Operational Primitive]”
Example:
“Your Coding Agent Does Not Need More Prompts. It Needs Durable Logs”
Agent teams often respond to unreliable behavior by improving prompts, adding evaluators, or switching models. Those interventions can help reasoning quality, but they do not solve process loss.
An agent that produces excellent code but forgets the last five completed tool calls after a timeout is not reliable. It is merely capable inside a fragile execution boundary.
This formula redirects attention from intelligence to operations. The missing primitive may be durable state, a queue, workspace isolation, or an explicit recovery protocol.
In durable-harness, workflow durable logs act as the operational memory of a session. Harness-specific files can be mirrored into the log, including Claude Code transcripts, Codex rollouts, and OpenCode event stores. That matters because recovery must understand the harness’s own record, not just a generic application database.
The queue is equally important. Each turn is backed by a queue message, including infrastructure associated with Vercel Queues. If the original function dies, another function can take over the queued work. The queue provides continuation; the durable log provides context and decision history.
Think of the queue as a relay baton and the log as the race’s official timing sheet. Passing the baton without recording the race state is not enough. Recording the state without arranging for another runner to continue is also incomplete. Durable execution needs both.
Workspace design introduces another implementation boundary. Commands selected by the model should not depend on the temporary function’s own disk. Possible approaches include:
- A virtual workspace stored in the session log
- A non-durable in-memory scratch workspace
- A Vercel Sandbox with a Drive-backed workspace directory
The virtual workspace is useful for constrained tasks. It provides a bash-compatible shell without network access and is described as supporting about 500 files. Typed JSON documents stored in the log, such as task lists, have a 64 KB limit each. Those constraints are not minor details; they determine whether the workspace fits a small code change or a larger repository operation.
A team should select the workspace based on workload:
- Use virtual storage for compact, deterministic artifacts.
- Use memory for temporary data that can be regenerated.
- Use a sandbox-backed workspace for broader coding operations or harnesses that require filesystem behavior.
The title formula is controversial because it implies that adding intelligence may be the wrong next investment. In many systems, reliability gains come from making state observable and recoverable before making the model more sophisticated.
4. “The Popular Architecture Is Overkill for [Specific Use Case]—Until It Fails”
Example:
“A General Agent Platform May Be Overkill—Unless You Need Coding-Agent Recovery”
Durable-harness should not be treated as a universal replacement for workflow engines or agent platforms. Its value comes from its specific position: an adapter layer for existing coding harnesses.
That distinction matters when comparing it with systems such as Temporal with the OpenAI Agents SDK, Inngest AgentKit, or the Cloudflare Agents SDK. Those platforms may provide broader orchestration capabilities, while durable-harness focuses on preserving coding-agent sessions through adapters and a Workflow SDK World.
The deployment model is also intentionally flexible. The same agent code can run on Vercel, locally, or in a self-hosted Postgres World. Additional World implementations may use systems such as MongoDB, Redis, or Turso. A team can begin with a managed environment and move toward self-hosting when data residency, cost, or operational control becomes more important.
Self-hosting is attractive, but it introduces responsibilities:
- Database backups and restoration testing
- Queue availability and delivery guarantees
- Log retention and sensitive-data handling
- Version compatibility between adapters and harnesses
- Monitoring for stuck turns and repeated failures
- Access controls around source code and model transcripts
The package is identified as an experimental 0.0.x release under the Apache-2.0 license. No latency or throughput benchmarks have been published, so teams should not infer production performance from the architecture alone. Build a small proof of concept and measure recovery time, log growth, queue delay, duplicate-call prevention, and workspace behavior under failure.
A useful test plan should deliberately terminate functions at several points:
- Before a model call begins
- After the model response returns
- During tool execution
- After a tool completes but before the result is committed
- During workspace synchronization
- While a replacement function is starting
The objective is not merely to prove that the agent eventually resumes. It is to prove that it resumes without duplicating unsafe actions, losing transcript state, or corrupting workspace data.
Looking ahead, durable execution is likely to become a baseline expectation for cloud-based coding agents. As agents operate for longer periods and perform more consequential actions, “the process crashed” will no longer be an acceptable explanation for lost work. Future systems will likely combine durable logs with stronger provenance, tool-level idempotency, checkpoint-aware model APIs, and standardized replay policies.
The most durable title formula may therefore be the simplest: challenge the architecture before the architecture challenges you. Coding agents do not become production-ready merely because they can write code. They become production-ready when their work can survive the ordinary failures of distributed systems.