Vercel's durable-harness lets Claude Code, Codex, OpenCode and Pi survive a crash mid-task
SummaryA new open-source package from Vercel writes every model call and tool call an agent makes to a durable log, so a turn that loses its server picks up where it stopped instead of starting over. The honest caveat: it is a 0.0.1 beta, and Vercel calls its Claude Code and Codex support experimental.
· MODEL Editors · 2 min read
Some links may be affiliate links. Disclosure

Coding agents like Claude Code, Codex, OpenCode and Pi were built to run on your own computer, where the session sits in memory and on disk. Move one to the cloud and a crash, a network drop or a function timeout in the middle of a task usually means the work is lost, or repeated. Vercel's answer, announced on its blog on October 19, is durable-harness, an open-source package that adds durability to those harnesses from the outside, without changing the harness itself.
How it works. Before each model call or tool call, the package records an intent in a durable log, and when the call finishes it records the result. Each turn is also backed by a queue message. If the function running the turn dies, the queue hands it to a new function, which reads the log and carries on. Finished calls are not run again, so, Vercel notes, you are not billed twice for the tokens of a model call that already completed. A browser that disconnects can reconnect and catch up from the same log.
Tools you give the agent are marked replay: 'safe' (a lookup, which can simply run again) or 'never' (a refund or a pull-request comment). If a crash interrupts a 'never' tool, it is not rerun; the model is told the call may have happened and can check first.
Where it runs. The log lives in a "World", the storage layer of Vercel's open-source Workflow SDK. On Vercel that is Vercel's own managed World; in development it is files on your machine; on your own servers it can be Postgres, which Vercel says takes two environment variables, or other Worlds such as MongoDB, Redis or Turso. Sessions show up in Vercel's Agent Runs view, including turns that resumed after a crash.
Who it's for: teams building products on top of an existing harness, or developers who want an always-on coding agent without leaving a laptop open overnight.
The caveats, from Vercel's own pages. The package is on version 0.0.1-beta.6 on npm, its README calls it experimental with an API that may change between releases, and Vercel's docs label Agent Harnesses as beta. Claude Code and Codex support is marked experimental. Because both are single-user command-line tools that keep state on disk, durable-harness runs them only inside a Vercel Sandbox, one per session, and refuses to run them anywhere else, including on your own server. So even with the session log on your own Postgres, those two still need a Vercel Sandbox. A session's Sandbox runs for at most 4 hours by default, and model spend has no cap unless you set one with a budget. The code is free under the Apache 2.0 license, but on Vercel the work runs on metered products: Functions, Queues, Sandbox and AI Gateway.
MODEL has not tested durable-harness hands-on. Everything above comes from Vercel's blog post, documentation, the GitHub repository and the npm registry, read on October 20. Our site is hosted on Vercel; this is not sponsored and has no affiliate links.
Sources
FREE · EVERY WEEK
The top AI tools this week, tested.
Every week MODEL's editors pick the AI tools worth your time, try them hands-on, and tell you what's good, what's not, and who it's for. Free, in your inbox.
Free. Unsubscribe anytime. Our picks are editorial and can't be bought.
The weekly three is editorial. A subscription does not buy a place in it.
Continue

Hot take
The AI hackers forgot to lock their own door
NorForge watched criminals point AI agents at more than a thousand online shops, because the attackers left their own control panels open on the web. Reuters says one hacker's agents got into more than 100 companies. The sloppiest code in this story belongs to everyone involved.
· MODEL Editors

Builder tip
OpenAI's prompt cache now lasts 12 hours. Here's how to actually get the hits.
OpenAI's API can now keep a cached prompt for 12 hours instead of 30 minutes. It costs more to write and the same to read, and it only pays off if your request is laid out so the cache can match. Here is the layout, the math and the gotcha that quietly turns caching off.
· MODEL Editors

The test
tsrs: TypeScript in Rust, timed
The new Rust port of the TypeScript compiler checked Playwright's 1,511 files 6.4 times faster than TypeScript 7.0.2 on our box, with two-thirds less memory and the same errors, word for word. The catch: it follows TypeScript 7.1, not the 7.0 you have.
· MODEL Editors