Vercel Open-Sources Durable Harness: Coding Agents That Survive a Crash
Vercel's new Apache-2.0 package, durable-harness, wraps coding-agent harnesses like Claude Code and OpenCode so sessions survive crashes, timeouts, and closed laptop lids.

The problem it solves
Coding agents have a durability problem. Harnesses like Pi, OpenCode, and Claude Code were designed as long-lived local processes that keep session state in memory. That works until it does not: a crashed process, a network error, a timed-out function, or the classic "close the lid and lose everything." When the process dies, the session dies with it, and any tokens already spent are spent again when you redo the work.
Vercel's answer, released October 21, is durable-harness: the Vercel durable harness is an open-source npm package under the Apache-2.0 license that wraps your existing coding-agent harness without modifying it, and brings the persistent state management Vercel built internally for its eve framework and Workflow SDK to everyone else. The GitHub repo is vercel-labs/durable-harness.
How the Vercel durable harness works
The core idea is simple: every agent session becomes a run on Vercel's Workflow SDK, stored in a "World," which is Vercel's single interface over storage, queue, and stream. Every model call and tool invocation gets its intent recorded before the call and its outcome recorded after, logged sequentially into one persistent durable log.
Each turn is backed by a message on Vercel Queues. If the execution instance fails, the queue hands the turn to a fresh function that reads the log and resumes from the last completed step. Completed calls are read back from the log, so finished model tokens are never re-run or billed twice. That last part matters: crash recovery that re-bills you for the work it is recovering would be a cruel joke.
The tool-call replay policy is the clever bit. Safe, idempotent tools like lookups, file reads, and state checks automatically re-run after a crash. Non-idempotent tools, things like refunds or notifications, never run a second time. For those, the model is only told the invocation "may have already completed," which is an honest way to handle genuine uncertainty.
Harness session files get mirrored into the log too: Claude Code's transcript, Codex's rollout, OpenCode's event store. There is also a "Documents" concept for agent state like to-do lists and project plans, stored as typed JSON in the log with a 64 KB cap per document, so agent memory is not limited to chat history.
What "durable" actually guarantees
Three runtime targets run the same agent code: Vercel itself (with sessions traced in Agent Runs), local (files on the machine, no configuration), and self-hosted (Postgres 5.0.4 or later on Node.js 22+, with MongoDB, Redis, and Turso also supported). Moving between them takes two environment variables. Workspaces come in three flavors: virtual() keeps files in the session log with a bash-compatible shell and no network, virtual({durable: false}) keeps scratch files in memory cleared every turn, and sandbox() provisions an isolated Vercel Sandbox with /workspace on a Drive.
Supported harnesses at launch: Pi, OpenCode, fx, Claude Code, and Codex. Two caveats: Claude Code and Codex are experimental and need a Vercel Sandbox even when self-hosted, since they were not built for embedded use. Pi and fx work out of the box.
The fine print
This is a 0.0.x release, so the API is experimental and will change. MarkTechPost notes that Vercel has published no latency or throughput benchmarks, and the recovery claims are self-reported. That is fair criticism of any v0 announcement, and Vercel being a cloud vendor selling the runtime underneath does not go unnoticed.
But the direction is right, and it rhymes with everything else happening in agent infrastructure this month. DeepSeek open-sourced its production inference framework, Google made PyTorch native on TPUs, and TypeScript 7.1 is reshaping the toolchain. The agent stack is being rebuilt in the open, one durable layer at a time.
If you run coding agents for anything longer than a demo, crash recovery is not a nice-to-have. It is the difference between an agent you trust with real work and a toy you babysit. Durable-harness is early, but it is aimed at exactly the right problem.


