Crash-Resilient Turn Replay
Conversation state, in-flight model streams, and tool invocations are journaled to a durable event log. If a node fails mid-turn, the agent resumes on another machine without repeating non-idempotent side effects.
The category-defining .com for stateful, crash-resilient execution environments built for long-horizon coding agents and autonomous harnesses.
import { Sandbox } from "@cloudflare/sandbox";
import { withDurableHarness, sandbox } from "durable-harness";
// Every model turn & tool execution is persisted in the durable event log.
// If the worker or container restarts mid-turn, execution resumes deterministically
// without re-running non-idempotent shell commands or losing filesystem state.
export const agentRuntime = withDurableHarness({
workspace: sandbox({
isolation: "microvm",
snapshotOnTurnComplete: true,
credentialBoundary: "host-mediated",
}),
});
In 2024–2025, AI agent sandboxes were stateless, short-lived containers spun up to execute a single Python snippet and discarded seconds later. In 2026, long-horizon coding harnesses (Claude Code, Codex, OpenCode, Pi, fx) routinely run multi-hour sessions across git worktrees, compilers, and test suites.
A Durable Sandbox unifies two previously separate primitives: (1) OS-level execution isolation (MicroVMs, containers, or virtual filesystems with host-mediated credentials) and (2) Durable Execution event logs (Workflows, Durable Objects, and heap/filesystem snapshots) where every turn in flight, tool call, and filesystem diff survives process crashes, machine migrations, and multi-day hibernation.
As cloud providers and AI infrastructure startups converge on this exact term—from Vercel's durable-harness running on isolated Sandboxes to Cloudflare's @cloudflare/sandbox backed by Durable Objects—durablesandbox.com is the natural flagship domain for a category leader, open-source runtime, or commercial cloud platform.
Conversation state, in-flight model streams, and tool invocations are journaled to a durable event log. If a node fails mid-turn, the agent resumes on another machine without repeating non-idempotent side effects.
Clone a running workspace in milliseconds to probe multiple candidate edits in parallel (Propose–Probe–Compose) or execute Fork-and-Flush context resets while keeping verified build artifacts intact.
Untrusted model-generated commands execute inside default-deny OS isolation while API tokens and git credentials stay outside the sandbox boundary, injected only at verified egress proxy edges.
Idle agent workspaces hibernate to zero compute cost and wake on a webhook, PR review comment, or Swarm Communication Protocol (SCP) message with full working tree and terminal state preserved.
How modern agent infrastructure stacks combine sandbox isolation with durable state.
| Stack / Runtime | Core Primitive | Isolation Layer | Durability Mechanism | Primary Workload |
|---|---|---|---|---|
| Vercel durable-harness + Sandbox | Workflow SDK World + sandbox() |
Session-scoped Vercel Sandbox VM | Workflow event log + virtual/sandbox FS | Next.js & TypeScript durable coding agents (Pi, Claude Code, Codex) |
| Cloudflare @cloudflare/sandbox | Durable Objects + Containers |
Container instance bound to DO | Durable Object SQLite storage + R2 snapshots | Globally distributed stateful agent sandboxes at the edge |
| E2B / Desktop & Code Sandboxes | Firecracker MicroVM |
Hardware-virtualized MicroVM | VM memory/disk pause & resume templates | Fast-booting code interpreter & computer-use agent loops |
| Daytona / Modal / Fly Machines | Container / MicroVM Workers |
Dedicated VM / gVisor / Firecracker | Volume snapshots & image checkpoints | Custom dev environments, GPU/CPU batch & long-lived workspaces |