Coding-agent harnesses are designed as long-lived local processes, so moving them to serverless cloud infrastructure risks losing work when a function times out, crashes or a connection drops. durable-harness is Vercel's open-source answer: a set of adapters and utilities that keep a harness session in a Workflow SDK World, so the agent can resume an interrupted turn instead of starting over.
Before each model or tool call it records an intent in a durable log, and after the call it records the outcome; a queue message backstops every turn. If the function dies, a new one reads the log and continues. Completed calls are never re-run, so finished model calls are not billed twice. Each tool declares a replay policy: tools marked safe, such as lookups or CI status checks, re-run automatically, while tools marked never, such as posting a PR comment or issuing a refund, are reported back to the model as possibly executed so it can check first.
Vercel's own eve and fx are durable by design; durable-harness adds durability from the outside to Pi, OpenCode and your own harness, with Claude Code and Codex supported only inside the session's own Vercel Sandbox, never in a shared function. Workspaces can live in the session log as a virtual bash-compatible file tree, in memory for scratch work, or in a dedicated Vercel Sandbox with a persistent drive. Typed documents stored in the log let tools and your app share state such as plans or to-do lists.
The same code runs on Vercel, on self-hosted Postgres, MongoDB, Redis or Turso, or on local files during development, and Vercel's Agent Runs view shows resumed turns in one trace. This is beta software: Vercel's docs list Agent Harnesses as beta, and the package README calls durable-harness experimental, on 0.0.x with an API that may change between releases (npm latest 0.0.1-beta.6, published under the Apache 2.0 license; launched October 19, 2026).
