Vercel's durable-harness lets Claude Code, Codex, OpenCode and Pi sessions survive a crash mid-turn
Vercel released durable-harness, an open-source package that logs every model and tool call in an agent turn so a new function can pick the turn up if the old one dies.
Before each model or tool call, durable-harness writes an intent to a log, and when the call finishes it writes the result. A queue message backs up the whole turn. If the function times out while, say, CI is still running, the queue hands the turn to a new function, which reads the log and carries on.
Finished model calls are read back from the log instead of re-run, so Vercel says you don't pay twice for the same tokens. Tools carry a replay policy. A tool marked replay: 'safe' (a file read, a CI status check) runs again on its own. Anything else goes back to the model flagged as possibly already run, and the model decides whether to check before retrying.
Claude Code and Codex always run in a Vercel Sandbox, since they expect a real shell. Pi and OpenCode can use a virtual workspace kept in the session log. The log lives in a Workflow SDK "World": Vercel's own on Vercel, files on your laptop in development, or Postgres, MongoDB, Redis or Turso if you self-host. Vercel published it on October 19.
Why it matters for builders
Cloud agents that run for an hour lose work on every timeout or redeploy. The replay policy is the part to copy even if you never use Vercel: decide up front which of your agent's tools can safely run twice.
Try this
To self-host the log, set WORKFLOW_TARGET_WORLD="@workflow/world-postgres" and WORKFLOW_POSTGRES_URL to your database. Vercel says those two variables move every durable-harness agent to Postgres.
Sources
Get stories like this every Monday
One tested AI workflow with the prompts, plus 3 news items that matter if you build. Free.
More AI news
- Mistral's Voxtral 3: transcription from $0.0035 a minute and a voice agent SDK built on LiveKit
- DeepSeek open-sources DeepInfer, the inference engine behind V4.1 Flash, under Apache 2.0
- Claude API adds user profiles, so a safety action can hit one end customer instead of your whole org
- Daytona raises $60M at a $1B valuation for the sandboxes AI agents run code in