On Oct 20, Vercel released durable-harness, an open-source package (Apache 2.0, npm 0.0.1-beta.6, marked experimental). It adds durability from the outside to existing coding-agent harnesses such as Pi, OpenCode, Codex and Claude Code: every model and tool call is logged before and after it runs in a Workflow SDK World, and if a function times out or crashes, a queue hands the turn to a new function that resumes from the log, so finished model calls are not billed twice. It runs on Vercel, on local files, or on self-hosted Postgres and other backends.
Key Takeaways
- ✓Supports 5 harnesses: Pi, OpenCode, Codex, Claude Code and libfx's fx (eve and fx are already durable on their own)
- ✓Mechanism: an intent is recorded before each model or tool call and the outcome after it; each turn is backstopped by a queue message so a new function resumes from the log
- ✓Finished model calls are read back from the log, so Vercel says you never pay twice for the same call's tokens; only tools marked replay: 'safe' are rerun
- ✓Swappable backends: Vercel World, local files, Postgres, plus MongoDB, Redis and Turso; two environment variables move it to Postgres
- ✓Status: Apache 2.0, npm 0.0.1-beta.6, and the README marks it experimental with an API that may change

Key Decision Metrics at a Glance
Heavy Claude Code use: compare subscription limits and API bills
Compare 40 dev plans & simulate token costs vs $20/mo subscriptions
Project Links & Resources
Direct AccessIn-Depth Technical Analysis
Background and the pain point
Coding-agent harnesses like Claude Code, Codex, OpenCode and Pi were built as long-lived local processes: the session stays in memory, the workspace and history share one disk, and resuming takes one prompt. As teams move them to the cloud for always-on agents whose turns run for minutes or hours, Vercel notes that even a VM with persistent storage does not record which model and tool calls finished. A function timeout, dropped connection or crash loses the turn, and rerunning it burns tokens again.
Architecture and mechanism
durable-harness is a set of adapters and utilities that leave the harness unchanged and keep its session in a Workflow SDK World, Vercel's durable backend. Each step of a turn goes to a durable log: an intent before a model or tool call, the outcome after it. The turn is backstopped by a queue message, so if its function dies a new one reads the log and continues. On recovery, finished calls are read from the log, tools marked replay: 'safe' run again, and other tools come back to the model as possibly run. Claude Code transcripts, Codex rollouts and OpenCode's event store are mirrored into the log so a new function or Sandbox can rebuild them. Because the World interface combines log, queue and stream, the same agent can move between Vercel, local files, Postgres, MongoDB, Redis and Turso without code changes.
Benchmarks
Vercel has not published performance or reliability benchmarks, recovery latency or overhead figures. The verifiable facts are that the GitHub repo vercel-labs/durable-harness is Apache 2.0, the latest npm version is 0.0.1-beta.6, and the README calls it experimental with an API that may change on 0.0.x. The claim that finished model calls are never billed twice is Vercel's design description, not a third-party test.
Getting started
The README quick start uses Pi: install durable-harness and @earendil-works/pi-durable in a Next.js app, expose a chat route with chatRoute, and wrap next.config with withDurableHarness. Other harnesses have their own entry points, such as durable-harness/opencode, documented under Agent Harnesses in the Vercel docs. Self-hosting takes two variables, WORKFLOW_TARGET_WORLD="@workflow/world-postgres" and WORKFLOW_POSTGRES_URL. Sessions on Vercel show every model and tool call in Agent Runs, including where a crashed turn resumed. Since it is still beta, start with internal long-running agents and set replay policies carefully for tools with side effects.
Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.
Discussion & Comments
0Sign in to join the discussion
Connect with AI developers to exchange benchmark insights.