Agent sandboxes / Cloudflare Sandbox SDK / Containers alternative

A Cloudflare sandbox alternative for a growing agent computer

Cloudflare’s Linux sandbox now supports writable-root-filesystem snapshots in public beta. For an agent that returns across tasks, compare who saves and restores that state, how activity keeps the instance alive, and what happens when its disk fills.

Reviewed 2026-10-18 · Published by the Sandbox0 team

When Cloudflare Sandbox SDK / Containers fits

Cloudflare fits applications already orchestrated through Workers and Durable Objects. Keep its Linux sandbox in the evaluation when edge request handling, R2 integration, and application-controlled snapshots match your architecture.

When to consider Sandbox0

Sandbox0 fits a persistent Linux agent identity whose root filesystem grows online and checkpoints through the runtime lifecycle. It also exposes persistent file operations while compute is paused, including edits during filesystem-only pauses.

Capabilities

Cloudflare Sandbox SDK / Containers and Sandbox0: what persists?

Feature comparison with documentation and verification status
Environment and runtime lifetimeCloudflare Sandbox SDK / ContainersActivity and alarms can keep the Linux instance running; inactivity timeout is at most 6 hours, not a fixed active-session lifetime.View evidence ↗Sandbox0ttl and hard_ttl default to 0 (disabled). Configure idle pause and deletion policies for the same persistent sandbox identity; an idle running sandbox still accrues compute charges.Read documentation →
Persistent filesCloudflare Sandbox SDK / ContainersPublic-beta snapshots preserve writable files; application orchestration restores the saved snapshot.View evidence ↗Sandbox0The writable RootFS survives successful checkpoints, including software, system configuration, dependencies, and user data.Read documentation →
Whole RootFSCloudflare Sandbox SDK / ContainersWritable root filesystem snapshots exclude mounts, /run, memory, and processes.View evidence ↗Sandbox0Persistence extends beyond /workspace to paths such as /usr/local, /etc, and /home. Runtime tmpfs and virtual filesystems are excluded.Read documentation →
Release compute, keep stateCloudflare Sandbox SDK / ContainersA new instance can start from the saved filesystem; processes run from its entrypoint.View evidence ↗Sandbox0Pause compute between tasks; resume on available capacity. Default resume starts fresh processes from the saved filesystem.Read documentation →
Memory and process stateCloudflare Sandbox SDK / ContainersContainer snapshots do not preserve running processes or memory.View evidence ↗Sandbox0Experimental memory checkpoints can preserve compatible process state. Use memory: true on both pause and resume on a compatible deployment. A filesystem checkpoint alone does not preserve running processes.Read documentation →

Online RootFS growth

On growth-enabled images, Sandbox0 automatically expands the writable RootFS as free space runs low, within a configured sparse logical ceiling up to 64 TiB. Agent processes keep running. Growth is enabled in the qualified Cloud region; confirm activation for other regions. Existing images and snapshots retain their captured storage geometry. The ceiling is logical capacity, not preallocated host disk.

Cloudflare instance types include a provisioned disk size, charged while the instance runs. The reviewed Linux lifecycle documents snapshot restoration, but do not establish automatic growth of a mounted root disk as free space runs low.

Files while compute is paused

Sandbox0's Files API reads persistent files without resuming compute. Filesystem-only pauses also permit edits; retained-memory pauses are read-only and reject mutations with 409. SSH, SFTP, file watching, and runtime-only mounts require running compute.

See paused file operations →

Whole-filesystem snapshots are now available

Cloudflare’s snapshotContainer() saves the writable root filesystem, excluding mounted filesystems and memory. The application stores a snapshot ID and supplies it when starting another instance. Snapshot expiry is 30 days after creation or last restoration; longer-lived independent data can live in R2.

Guest work alone does not keep the instance active

Cloudflare activity follows its Durable Object: requests, streams, WebSockets, and alarms. A background build inside Linux does not count by itself. Configure that activity and reapply inactivity settings after Durable Object restarts so a running agent task is not stopped unexpectedly.

Budget the application platform around the sandbox

Containers meters active CPU, provisioned memory, and provisioned disk separately. Workers, Durable Objects, observability, egress, and retained external storage may add charges. The Linux-container comparison does not describe Cloudflare’s separate JavaScript isolate environment.

Pricing

Compare billing models, then price your workload

CPU allocation, memory, billing minimums, disk, plan fees, and supported workload differ. These meters are not equal-performance machine quotes. Confirm region, resource units, and included allowances before estimating a total.

Cloudflare Sandbox SDK / Containers

Pricing reviewed 2026-10-18

Active CPU
$0.000020 per vCPU-second
Rate source ↗
Provisioned memory
$0.0000025 per GiB-second
Rate source ↗
Provisioned disk
$0.00000007 per GB-second
Rate source ↗
Workers Paid plan
$5/month
Includes monthly Containers allowances; related Workers and Durable Objects usage can add charges.
Rate source ↗

Included usage is 375 vCPU-minutes, 25 GiB-hours memory, and 200 GB-hours disk per month. Disk is provisioned instance storage; R2 or snapshot retention is a separate concern. GB and GiB remain distinct.

Check current Cloudflare Sandbox SDK / Containers pricing ↗

Sandbox0

$0.015/GiB-hour compute (billed by the second at approximately $0.000004167/GiB-second), plus $0.02/GiB-month of retained incremental RootFS and memory checkpoint data. Shared base images and platform recovery retention are excluded; paused sandboxes accrue storage charges only.

Compute / GiB-hour
$0.015
Retained data / GiB-month
$0.02
Paused compute
$0.00

A 4 GiB agent, 100 running hours

$6.00 compute

4 GiB × 100 hours, billed by the second. Keeping 20 GiB of billable incremental data for a full billing month adds $0.40. CPU is derived from memory by the platform; choose a tier that fits your workload.

Understand storage billing →

Before migrating from Cloudflare Sandbox SDK / Containers

  1. Inventory Worker and Durable Object orchestration, container images, alarm policies, and every separately mounted R2 bucket.
  2. Export the latest filesystem snapshot or required files and restart commands; container snapshots do not carry memory.
  3. Port ingress, credential rules, and agent commands, then test online RootFS growth and paused file edits on Sandbox0.

Common questions

Is Sandbox0 a drop-in Cloudflare Sandbox SDK / Containers replacement?

Evaluate API compatibility and product scope. A shared sandbox category does not make SDKs, lifecycle semantics, or limits interchangeable.

Does keeping files also keep a running agent?

Filesystem state and volatile process state are separate. Sandbox0 requires explicit compatible memory checkpoints to preserve running processes; its default filesystem resume starts fresh processes.

Sources and review scope

The Boat team's Battleships directory is the discovery source. References below describe the product and plan discussed on this page. Check current availability, regional terms and billing units before migrating. Where the cited material does not establish a capability or price, the comparison identifies that uncertainty.

Related comparisons