Engineering practice7 min read

When a coding agent's work survives a crash

Vercel's durable-harness separates an agent's work from the process running it. The important engineering question is how to resume safely without repeating side effects.

By: Yonatan GelfmanAI-assisted writing

The change: from process lifetime to task lifetime

A coding agent may read a repository, edit files, create a pull request, and then wait while CI runs. The operating-system process or serverless function doing that work can time out, lose its connection, or be replaced before the task is finished. If the agent’s only memory lives in that process, recovery means starting over and hoping it can infer what already happened.

On October 19, 2026, Vercel announced durable-harness, an adapter intended to let existing coding harnesses—including Pi, OpenCode, Codex, and Claude Code—resume from recorded execution state. The system records intents and outcomes for model and tool calls; after an interruption, a new worker can read the log and continue. Vercel also describes replay policies for tools: a read can be safe to repeat, while an external action may need verification before the agent proceeds. This is the vendor’s description of its implementation, not an independent performance evaluation. Read Vercel’s engineering explanation.

Why “just retry it” is not enough

Retry is simple when an operation is both repeatable and harmless. It is dangerous when the operation changes another system. Imagine a worker calls an API to create a pull request. The remote service creates it, but the worker dies before it records the response. Retrying blindly could create a duplicate. For a refund, a purchase, or a public post, the same failure mode can have a direct cost.

The hard case is the gap between a side effect and its acknowledgement. A durable log can preserve what the worker knew, but it cannot automatically make a separate API and a local database one atomic transaction. The application still needs an explicit strategy: use an idempotency key when the service supports one; query the remote state before retrying; mark operations that must never replay; and require confirmation before actions with meaningful consequences.

This is familiar distributed-systems engineering in a new wrapper. An agent makes the sequence less predictable because its next tool call depends on model output, but the basic failure question remains: after an uncertain outcome, can we establish what happened before acting again?

What “durable” has to include

Persistence is only one piece. A dependable long-running agent needs at least:

  • Recoverable state: enough of the conversation, plan, and tool results to continue without guessing.
  • Defined replay rules: per action, whether it can be repeated, must be checked, or must not run again.
  • A recovery owner: a queue, scheduler, or operator that notices a stopped run and decides whether to resume it.
  • Observability and control: a readable trace, plus the ability to pause, cancel, or inspect a resumed run.
  • Credential boundaries: recovery must not broaden what the agent can access, and secrets should not be copied casually into persistent logs.

These requirements apply whether the runtime is a cloud workflow, a local process backed by a database, or a custom job system. The particular persistence engine matters less than whether the failure modes are explicit and testable.

When it is worth the added machinery

Durability is most useful when a task spans long waits, multiple tools or services, or work expensive to repeat. A short task that edits one local file may be better served by a simple process and a clear retry from the user. Every persistent run adds state to secure, retain, inspect, and eventually clean up.

Before adopting a durable harness, test at least three interruption points: before a tool call, after the external service has acted but before the result is recorded, and during recovery. For each one, verify whether the task continues, pauses for a human, or stops safely. A smooth demo proves little about those boundaries; fault-injection tests and an auditable trace are stronger evidence.

A recovery checkpoint

A small decision aid based on the interruption points described above—not a simulation of Vercel’s implementation.

From intent to recorded outcome

Uncertain handoff

  1. Intent recorded

    What the run planned to do.

  2. External action

    A side effect may occur.

  3. Outcome recorded

    The acknowledgement reaches the trace.

Choose where the run stopped

If the external action may have happened but its result is missing, check the service state before retrying.

The useful lesson in Vercel’s release is not that every agent should be always-on. It is that once software gives an agent a long-running job, recovery behavior becomes part of the product contract. We should design that contract deliberately instead of treating a longer timeout as reliability.

Sources

Follow on Google Search

Add Bersaglio as a preferred source to prioritize our notes, research, and practical work in Search and AI Overviews.

Accessibility options

Customize display preferences. These controls do not replace accessible site markup or assistive technology testing.