Which is better, Cloudflare Sandbox or Morph?
It depends on where your app runs and how far you branch. For agents that mostly wait on a model, Runtime has the lowest cost: $0.64 for the job, against $1.35 on Cloudflare and $1.67 on Morph. It forks and snapshots with memory and processes, and it has no plan fee. Pick Cloudflare Sandbox for an app already on Workers that wants sandboxes near its users. Pick Morph to copy one running machine to hundreds of replicas.
At a glance
Cloudflare's column shows Containers rates, which is how its Sandbox SDK is billed. One Morph Compute Unit (MCU) covers 1 vCPU, 4 GB of memory or 16 GB of disk. A machine pays for whichever it needs most.
| Cloudflare Sandbox SDK | Morph | Runtime | |
|---|---|---|---|
| Isolation | A container in its own VM | Full virtual machines | Firecracker microVM, own kernel |
| CPU | $0.072 per active vCPU-hour, metered in 10 ms steps | $0.05 per MCU-hour for the machine's size | $0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.009 per provisioned GiB-hour; at least 3 GiB per vCPU | Inside the MCU: 4 GB per MCU | $0.0075 per reserved GiB-hour |
| Plan fee | Workers Paid, at least $5 a month | Developer free with no credit; Team $40 and Scale $250 a month | None; prepaid credit from $10 |
| Free start | No free tier; the plan includes 375 vCPU-minutes a month | 1,000 MCUs with the $40 Team plan | 100 free hours of a 1 GB machine in the first 30 days, no card |
| Snapshots | Filesystem-only snapshots in public beta | Memory and disk; Infinibranch to hundreds of replicas | Memory and processes; forks of 1 to 100 running copies |
| When idle | Filesystem-only snapshots; processes restart | Devboxes scale to zero and keep their memory | Pause keeps files, memory and processes |
Can I snapshot and branch a running sandbox?
On Morph, yes. That is what it is built around. A Morph snapshot captures a machine's memory and disk. Infinibranch branches a running machine, including its memory, to hundreds of parallel replicas.
Cloudflare's public-beta snapshots preserve the writable filesystem, but not memory or running processes. Your application saves and restores them. Changes after the last snapshot are not kept. Directory backups to R2 remain an option for data that outlives a snapshot.
Runtime sits between them. A fork copies a running sandbox, with its files, memory and running processes, into 1 to 100 new running sandboxes, all created together. A snapshot keeps the machine so you can start more copies from it later. Snapshots are kept while you have credit:
TypeScriptimport { Runtime, Sandbox } from "withruntime";const runtime = new Runtime();await using base = await Sandbox.create();await base.exec("pip install --quiet requests");const [a, b] = await base.fork({ count: 2 }); // both running, answered togetherawait Promise.all([a!.stop(), b!.stop()]);// Or keep the machine to start copies from later:const snapshot = await base.snapshot({ name: "with-requests", retentionDays: 7 });await using later = await runtime.sandboxes.create({ snapshot: snapshot.id });await runtime.snapshots.delete(snapshot.id);The snapshot a fork takes is deleted when the fork ends, and it is not billed. See sandbox fork and sandbox snapshot.
Cost for the same job
The priced job is 1,000 runs on 2 vCPU of 60 seconds each, with the code working for 20 CPU-seconds per run. Morph counts 2 vCPUs with 4 GB as 2 MCUs, and Runtime is given 4 GiB. Cloudflare will not go below 3 GiB per vCPU, so it is priced at 6 GiB, plus the 12 GB of disk its own example uses.
- CPU
- 1,000 × 20 s × $0.000020
- $0.40
- Memory
- 1,000 × 60 s × 6 × $0.0000025
- $0.90
- Disk
- 1,000 × 60 s × 12 × $0.00000007
- $0.05
- Size
- 1,000 × 60 s / 3,600 × 2 MCU × $0.05
- $1.67
- CPU
- 1,000 × 20 s / 3,600 × $0.025
- $0.14
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0075
- $0.50
At 100,000 runs a month, the cost is $135.04 on Cloudflare, $166.67 on Morph, and $63.89 on Runtime. With both CPUs busy for the whole minute, the job costs $1.33 on Runtime, $3.35 on Cloudflare and $1.67 on Morph. Of the two rivals, Cloudflare is cheaper while a run stays under about 36 of its 120 CPU-seconds. Morph's flat MCU charge is cheaper past that. Cloudflare's total assumes a sandbox is destroyed when its run is over. Plan fees, included credit, Workers requests, Durable Object time, storage, network and taxes are outside the totals.
Which one to pick
- Cloudflare Sandbox for an app that already runs on Workers and wants sandboxes in the same account, with the same bindings, near its users.
- Morph for branching at large scale, one running machine copied to hundreds of replicas, or for shared dev environments that scale to zero and keep their memory.
- Runtime for forks and snapshots that keep memory and processes at a measured $0.025 a vCPU-hour, 65% below Cloudflare's rate, with no plan fee. Search and evaluation over forks are covered in RL environments.
Porting from each
The 0.x Cloudflare SDK's getSandbox(env.Sandbox, name) corresponds to
Sandbox.getOrCreate(name), sandbox.exec(cmd) to exec, and
proxyToSandbox to box.previews.create(port). Morph's concepts carry over
almost word for word. Start a Runtime sandbox for an instance. Use snapshot()
and sandboxes.create({ snapshot }) for snapshot and restore, and fork()
for a branch.
Or hand the job to a coding agent with the one instruction in migration. It ports the project on a branch and tries it without credit. From Cloudflare, credit you add within 30 days of signing up is matched, up to $1,000 in total. Side by side: Runtime vs Cloudflare and Runtime vs Morph.
Runtime Cloud
Runtime costs 53% less than Cloudflare and 62% less than Morph on the same job, and it can fork a live sandbox too. 1,000 one-minute runs at 2 vCPU cost $1.35 on Cloudflare, $1.67 on Morph and $0.64 on Runtime. Runtime's CPU is metered at $0.025 a vCPU-hour. A fork carries memory and running processes, with no plan to buy first. Rates checked 25 October 2026.
Fork a sandbox yourself on free usage. npx withruntime login sets up the account. The migration guide maps calls from your current provider.
Sources
Cloudflare sandbox lifetime, snapshot behavior checked 25 October 2026. Rates checked 25 October 2026.
Cloudflare Containers pricing, Containers limits and instance types, Sandbox backup and restore, Sandbox lifecycle
Runtime pricing, JavaScript SDK
Facts on this page were checked on 26 October 2026.