Skip to main content
Back to timeline
Vercel NewsSource publication:

Coding agents survive a dead function: every step goes to a durable log, and a new function picks up the turn

Synopsis

Vercel released durable-harness, an open-source set of adapters that lets coding agents such as Pi, OpenCode, Codex and Claude Code resume a turn from a log after a cloud function crashes or times out. Running such agents in the cloud previously meant a VM with persistent storage, which does not record which model and tool calls finished or resume interrupted turns, so one failure lost work. The tool records an intent before each model or tool call and an outcome after it, and a queue message hands a dead turn to a new function that reads the log and continues.

Source-provided article image: Making every harness durable
Vercel

Interpretation

A coding agent's cloud session can now continue after its function dies mid-turn, without a manual restart. A VM with persistent storage could replicate the local setup in the cloud, but it did not automatically record which model and tool calls completed or resume interrupted turns after a crash. In the example of an agent adding a pricing page, the function times out while CI runs: without durability the agent stops until manually restarted and completed work is repeated, while with durable-harness a new function reads completed results from the log and resumes the turn.

Resumption works by writing each step of a turn to a durable log and letting a queue hand the dead turn to a new function. durable-harness is a set of adapters and utilities that let existing harnesses keep their sessions in a World, the Workflow SDK's durable backend. An intent is recorded before each model or tool call and an outcome after it, and the turn is backstopped by a queue message; completed calls never run again because results are read from the log, and interrupted tools follow a replay policy where safe tools run again and others return to the model as possibly run.

Perspective

The tool targets developers running coding agents in the cloud, covers harnesses including Pi, OpenCode, Codex and Claude Code, and supports self-hosting on an own Postgres instance or making a local harness workflow durable. Claude Code and Codex always run in a Vercel Sandbox because they expect a real shell and filesystem and are not safe for multi-tenant use. The file workspace can be a virtual filesystem kept in the session log or a session's own Sandbox, with the former suited to short tasks and small workspaces.

The crash-recovery account uses function timeout and dropped connections in a demo and gives no statistics from real long tasks. Tools interrupted after being marked safe run again, while others return to the model as possibly run and the model decides whether to check, so whether side effects repeat depends on how each tool is labeled. The virtual filesystem cannot reach the function's files or the network and suits short tasks and small workspaces.