# Cloudflare Sandbox vs Runloop: Cloudflare is 75% cheaper per agent run Runtime Cloud (withruntime.com) costs $0.64 per job; Cloudflare bills active CPU, Runloop every CPU while it runs. ## Which is better, Cloudflare Sandbox or Runloop? It depends on whether you want throwaway sandboxes or evaluation tooling. For a coding agent that mostly waits on a model, Runtime has the lowest bill, $0.64 for 1,000 one-minute runs against $1.35 on Cloudflare and $5.33 on Runloop, and its machine pauses with processes running and forks live. Pick Cloudflare Sandbox for short-lived sandboxes inside a Workers app; pick Runloop for SWE-Bench or custom benchmarks from your data, and devboxes in your own cloud. ## At a glance Cloudflare's figures are Containers rates, the basis for its Sandbox SDK. Runloop's are for its `MEDIUM` devbox: 2 CPUs, 4 GB and 8 GB of disk. | | Cloudflare Sandbox SDK | Runloop | Runtime | | --------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------- | | Isolation | A container in its own VM | microVM, with a container inside | Firecracker microVM, own kernel | | CPU | $0.072 per active vCPU-hour, metered in 10 ms steps | $0.108 per CPU-hour while the devbox runs | $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 | $0.0252 per GB-hour | $0.0075 per reserved GiB-hour | | Disk | $0.000252 per provisioned GB-hour | $0.00034236 per GB-hour | Included while running; paused storage $0.08 per GB-month | | Plan fee | Workers Paid, at least $5 a month | Basic free; Pro $250 a month plus usage | None; prepaid credit from $10 | | Free start | No free tier; the plan includes 375 vCPU-minutes a month | $50 of credit, no card | 100 free hours of a 1 GB machine in the first 30 days, no card | | Idle or suspend | Filesystem-only snapshots; processes restart | Suspend keeps the disk; processes restart | Pause keeps files, memory and processes while you have credit | | Called from | A Cloudflare Worker, in TypeScript | Runloop's API | Any backend: API, CLI, MCP server, JavaScript, Python | ## Both put a container in a VM: how do they differ? In what the VM is for. Cloudflare runs each sandbox as a container in its own VM, placed by the first request to it across Cloudflare's network. A configured inactivity timeout can stop it. Public-beta filesystem snapshots preserve saved files for later restores; processes, memory and shell state restart. Runloop runs each devbox as a microVM with a container inside, built to be a coding agent's machine. A devbox keeps its ID, its SSH keys and its disk through suspend and resume, though Runloop's docs say daemons running at suspend time must be restarted by hand. Runloop bills compute while a devbox is initializing, running, suspending or resuming, and bills storage while it is suspended. A Runtime sandbox is a Firecracker microVM with its own Linux kernel, running Ubuntu 24.04 with Python 3.12, Node.js 24, Bun, git and gcc, and `sudo` works. For containers of your own, `sudo enable-docker` runs Docker inside the sandbox. Root inside it still cannot change its network, CPU, memory or cost. See [how to run Docker in a sandbox](/how-to/run-docker-in-a-sandbox) and [microVM vs container](/compare/microvm-vs-container). ## Cost for the same job The numbers price 1,000 runs, each keeping 2 vCPU for 60 seconds and computing for 20 CPU-seconds of that time. Runloop's `MEDIUM` has 4 GB, and Runtime is set to 4 GiB. Cloudflare needs 3 GiB or more per vCPU, which puts its 2 vCPU shape at 6 GiB, and its disk is taken as 12 GB, as in Cloudflare's example. ``` Cloudflare 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 Total $1.35 Runloop CPU 1,000 × 60 s / 3,600 × 2 × $0.108 = $3.60 Memory 1,000 × 60 s / 3,600 × 4 × $0.0252 = $1.68 Disk 1,000 × 60 s / 3,600 × 8 × $0.00034236 = $0.05 Total $5.33 Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14 Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50 Total $0.64 ``` Run 100,000 of these a month and the bill is $135.04 on Cloudflare, $532.56 on Runloop and $63.89 on Runtime. If both CPUs are busy for the whole minute, it is $1.33 on Runtime, $3.35 on Cloudflare and $5.33 on Runloop; Runloop's total does not change, and Cloudflare stays below it at every load. The Cloudflare total assumes each sandbox is destroyed when its run ends. Left out: plan fees, Workers requests, Durable Object time, storage while suspended, network and free credit. ## Which one to pick - **Cloudflare Sandbox:** throwaway sandboxes inside a Workers app, on the same account and bindings, started close to users. - **Runloop:** evaluation of models on your own workload, RL rollouts, and devboxes deployed into your own cloud account with SOC 2, HIPAA and GDPR readiness. - **Runtime:** a coding agent's machine that pauses with processes still running and [forks](/glossary/sandbox-fork) while live, at the lowest rates of the three. To run evaluations yourself, see [agent evals and SWE-bench](/use-cases/agent-evals-and-swe-bench). ## Porting from each In Cloudflare's 0.x SDK, `getSandbox(env.Sandbox, name)` maps to `Sandbox.getOrCreate(name)`, `sandbox.exec(cmd)` to `exec`, and `proxyToSandbox` to `box.previews.create(port)`. On Runloop, a devbox becomes a Runtime sandbox; suspend and resume become `pause()` and `wake()`, and shutdown becomes `stop()`. ```ts import { Sandbox } from "withruntime"; const box = await Sandbox.create(); try { await box.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n"); const result = await box.exec(["python3", "/workspace/invoice.py"], { check: true }); console.log(result.stdout); } finally { await box.stop(); } ``` A coding agent can carry out the port from the single instruction in [migration](/docs/migrate), on a branch, tested on the free usage. Coming from Cloudflare, credit you add within 30 days of signing up is matched, up to $1,000 in total. The longer comparisons are [Runtime vs Cloudflare](/docs/cloudflare-sandbox-alternative) and [Runtime vs Runloop](/docs/runloop-alternative). ## Runtime Cloud On the same job, Runtime costs 53% less than Cloudflare and 88% less than Runloop. For 1,000 one-minute runs at 2 vCPU, Cloudflare bills $1.35, Runloop $5.33 and Runtime $0.64. Per vCPU-hour of CPU, that is $0.072 on Cloudflare, $0.108 on Runloop and $0.025 of measured CPU on Runtime, where memory is set to what the job needs. Rates checked 25 October 2026. Sign up from the terminal with `npx withruntime login` and run a coding agent on the free usage. The [migration guide](/docs/migrate) moves what you already have. ## Sources - [Cloudflare sandbox lifetime](https://developers.cloudflare.com/sandbox/concepts/lifetime/), snapshot behavior checked 25 October 2026. Rates checked 25 October 2026; Runloop's devbox lifecycle page and Cloudflare's sandbox lifecycle page read 26 October 2026. - [Cloudflare Containers pricing](https://developers.cloudflare.com/containers/pricing/), [Containers limits and instance types](https://developers.cloudflare.com/containers/platform/limits/), [Containers architecture](https://developers.cloudflare.com/containers/concepts/architecture/), [Sandbox lifecycle](https://developers.cloudflare.com/sandbox/concepts/sandboxes/) - [Runloop pricing](https://www.runloop.ai/pricing), [Devbox sizes](https://docs.runloop.ai/docs/devboxes/configuration/sizes), [Devbox lifecycle](https://docs.runloop.ai/docs/devboxes/lifecycle), [Runloop](https://www.runloop.ai/) - Runtime [pricing](/docs/pricing), [sandbox environment](/docs/sandbox-environment) Facts on this page were checked on 26 October 2026.