Cloudflare Sandbox vs Namespace

Cloudflare Sandbox gives you short-lived containers inside the Workers platform that sleep when idle, wake on the next request and start from a fresh disk. Namespace is a build and dev platform: CI runners, caches and Devboxes on Linux, macOS and Windows that keep their storage but shut down after 4 to 24 hours.

The companies and products

Cloudflare Sandbox

Cloudflare Sandbox SDK runs untrusted or AI-generated code in Linux containers on Cloudflare's network, driven from a Cloudflare Worker.

Each sandbox is a Cloudflare Container backed by a Durable Object, and each container runs in its own Firecracker microVM with its own kernel and network. You build a linux/amd64 image, pick an instance type of up to 4 vCPU and 12 GiB, and reach the sandbox through your own Worker. It suits teams already on Workers who want short-lived sandboxes that sleep when idle; for code that only calls known methods, Cloudflare also offers Dynamic Workers, which run JavaScript in V8 isolates.

Namespace

Namespace is a dev platform for fast builds, tests and coding environments: CI runners, build caches and Devboxes, on its own hardware.

Most of Namespace is CI: a faster drop-in for GitHub Actions runners, with Docker, Bazel, Turborepo and Nix caching. Its Devboxes are remote Linux and macOS machines with persistent storage, made for people and AI coding agents, and they also host sessions for Claude Managed Agents, Cursor Cloud Agents and Devin. It is a different kind of product from bochka, so this page compares the part where they overlap: a machine an agent works on.

Which use cases each one fits

For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “13th cheapest of 345” means 12 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.

Use case and its workloadCloudflare Sandbox: price rankNamespace: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A long build session needs its files and room for Docker; Cloudflare caps disk at 20 GB by default and resets it after sleep, Namespace cuts sessions at 4 to 24 hours, and bochka ranks 3rd.
162nd of 367, with limits
$1,543 a month
39th of 367, with limits
$3,495 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An assistant that never stops is a compromise on both: Cloudflare wipes the disk when the container sleeps, and Namespace shuts a Devbox down after at most 24 hours; bochka has no session cap on paid plans.
207th of 366, with limits
$2,188 a month
303rd of 366, with limits
$6,645 a month
5th cheapest of 366
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Cloudflare Sandbox ranks 13th and fits short code-interpreter calls well, since CPU is billed only while busy and a container wakes on the next request; Namespace ranks 247th here.
13th cheapest of 345
$144 a month
247th of 345, with limits
$250 a month
186th of 345, with limits
$2,000 a month
Sandboxes for your users
300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month
For sandboxes you hand to your users, Cloudflare Sandbox ranks 9th and bochka ranks 1st, while Namespace ranks 284th, as its Devboxes are dev machines rather than a sandbox service.
9th cheapest of 361
$731 a month
284th of 361, with limits
$2,068 a month
Cheapest of 361
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
144th of 360, with limits
$9,428 a month
356th of 360, with limits
$9,012 a month
34th of 360, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
45th cheapest of 364
$818 a month
282nd of 364, with limits
$1,043 a month
10th cheapest of 364
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
CI is Namespace's main product, with runners and caches for Docker, Bazel and more, so Namespace ranks 80th and fits; Cloudflare Sandbox ranks 301st because its disk tops out at 20 GB by default and Docker runs with iptables off.
301st of 377, with limits
$704 a month
80th cheapest of 377
$765 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Cloudflare Sandbox starts from a fresh disk after sleep and a Namespace Devbox shuts down after at most 24 hours; bochka ranks 18th, keeping its disk and running as long as you want.
70th cheapest of 368
$93 a month
126th of 368, with limits
$168 a month
18th cheapest of 368
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Cloudflare removed its built-in desktop and Namespace's screenshot and click API works on macOS Devboxes only, so a Linux computer-use agent is a compromise on both; bochka streams a 60fps Linux desktop.
166th of 369, with limits
$460 a month
67th of 369, with limits
$982 a month
6th cheapest of 369
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
210th of 367, with limits
$233 a month
285th of 367, with limits
$789 a month
7th cheapest of 367
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
250th of 346, with limits
$286 a month
259th of 346, with limits
$332 a month
6th cheapest of 346
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
169th of 338, with limits
$5,741 a month
226th of 338, with limits
$9,012 a month
71st of 338, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
239th of 360, with limits
$325 a month
242nd of 360, with limits
$339 a month
2nd cheapest of 360
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Can't run itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Only Namespace fits: it runs macOS Devboxes and instances on Apple Silicon, and neither Cloudflare Sandbox nor bochka has macOS.
Can't run it6th cheapest of 36
$1,205 a month
Can't run it

Key features

FeatureCloudflare SandboxNamespacebochka
IsolationFirecracker microVM per container, own kernel and networkLinux Devboxes run from a container image on Namespace's own hardware; the docs do not say if each has its own kernelFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
CPU speed (Node.js build-and-test, 4 vCPU / 8 GB)No comparable measurement21.79 runs/s26.69 runs/s
Largest machine4 vCPU / 12 GiB / 20 GB disk by default (can be raised); no 4 vCPU / 8 GB sizeLinux shapes up to 64 vCPU, inside a vCPU pool per plan (32 vCPU on Developer up to 160 on Business)Up to 16 vCPU / 32 GB, depending on plan
Files between sessionsDisk is fresh after sleep; snapshots (public beta, kept 30 days) or R2 backups when your code saves themA stopped Devbox keeps its storage, billed at $0.20 per GB-month usedDisk kept; snapshot every minute and on stop; a stopped sandbox costs nothing
How long a session can runNo fixed maximum, but no guaranteed runtime: host restarts stop instances and wipe stateDevboxes stop after 4, 5 or 24 hours by plan, even while you work; 24 hours at mostNo session cap on paid plans
Idle stop and wakeStops after inactivity and wakes on the next requestDevboxes stop after an idle timeout (15 minutes to 8 hours) and start again when you connectTTL based (1 h default, changeable); runs until the TTL or you stop it
Docker insidedocker:dind with iptables and IP forwarding turned offDocker in Linux DevboxesFull Docker, root and systemd
Nested virtualizationNot documented/dev/kvm on Linux compute instances, not on macOS or Windows/dev/kvm on every machine (Android emulators, VMs)
Desktop and computer useBuilt-in desktop removed in SDK 0.10.2; bring your ownScreenshot and click API on macOS Devboxes only; VNC and RDP for compute instances60fps Linux desktop and Chromium, computer use and browser control, embeddable stream
Reaching the sandboxHTTP and WebSocket previews routed through your Worker; no raw TCP or public IPHTTPS URLs that need a Namespace login, TCP through a running CLI port-forward; no public IPHTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv6 or IPv4
Egress controlallowedHosts deny-by-default list plus outbound handlers you write in Worker codeEgress policies per Devbox blueprint, runner or instance: block, advisory or allow by domainOpen internet; no provider-side allowlist
Keeping keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeEgress rules inject a header from Namespace Vault, resolved outside the workloadManaged proxy for model providers and any HTTPS API you register; switch a credential to another account when credits run out
Coding agentsRun Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helperHosts Claude Managed Agents, Cursor and Devin sessions through those partners; an MCP server lets your agent create DevboxesClaude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API
Operating systemsLinux (linux/amd64 images)Linux, macOS on Apple Silicon, and Windows on Team plans and upLinux only; Wine for Windows apps
Every feature Battleships tracks (43)
FeatureCloudflare SandboxNamespacebochka
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoYesYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINoYesYes
BrowserNoNoYes
Computer-use APINoYesYes
SSHYesYesYes
Persistent diskNoYesYes
Pause/resumeNoYesYes
Automatic snapshotsNoYesYes
Fork/cloneNoNoYes
Live fork (no pause)NoNoYes
Memory forkNoNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesYesNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoYesYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyYesYesYes
Secret proxy for any APIYesYesYes
Preinstalled agentsYesYesYes
Agent harness APIYesNoYes
MCP serverNoYesNo
GPUNoNoNo
WindowsNoYesNo
Arm64NoYesNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceYesNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNoYesYes
Usage per sandbox (API)Not publishedNoYes
Audit logsYesYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesNoNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Cloudflare SandboxNot measured
Namespace21.79 runs/s
bochka26.69 runs/s

In StarSling's public run of 2026-09-29, at 4 vCPU / 8 GB, bochka did 26.69 Node.js build-and-test runs per second and Namespace did 21.79, so the same build takes about a fifth longer on Namespace. Cloudflare Sandbox has no result on that benchmark, so there is no comparable CPU number for it.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Namespace measured on: Linux compute instance (unit-minutes, PAYG/overage $0.0015). Cloudflare Sandbox has no published run in this suite yet, so there is no like-for-like number to compare.

Pricing in five scenarios

Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.

ScenarioCloudflare Sandbox, a monthNamespace, a monthbochka, a month
One coding agent, workdays
4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days
$39 · Workers Paid · with limits$50 · Devbox (pay as you go)$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$148 · Workers Paid · with limits$176 · Devbox (pay as you go) · with limits$26 · $20/mo
50 agents in parallel
50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside
$1,660 · Workers Paid · with limits$2,198 · Devbox (pay as you go)$317 · $20/mo × 3 seats
Sandboxes for your users
2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once
$476 · Workers Paid$1,214 · Devbox (pay as you go)$200 · $100/mo × 2 seats
1,000 short jobs at once
2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month
$1,889 · Workers Paid · with limits$3,237 · Devbox (pay as you go)$2,000 · $2000/mo · with limits

Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while busy; memory and disk are billed on the instance size until the container sleeps, and 4 vCPU always comes with 12 GiB. Durable Object and Worker requests are billed on top.

Namespace: Devboxes are billed in Devbox Minutes at $0.004 each, pay as you go on every plan; a 4 vCPU / 8 GB Devbox uses one a minute. Plan minutes cover runners and instances, not Devboxes, and stored files cost $0.20 per GB-month.

Namespace: You pick a monthly plan from $20, and all of it becomes usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Cloudflare's disk resets after sleep, so none of the scenarios that keep files between sessions fit without your own snapshot or backup code, and its default account cap of 1,500 vCPU running at once is short of the 2,000 the 1,000-job burst needs. Namespace fits that burst, but a Devbox shuts down after at most 24 hours, so the agent that never stops has to restart at least once a day, and Namespace does not publish an egress price. On bochka the burst hits start limits instead: the $2,000 plan allows 600 starts an hour and queues bursts above 90 starts a minute.

ScenarioCloudflare SandboxNamespacebochka
One coding agent, workdays
  • missing persistent disk
  • egress price not published
None that bite
One agent that never stops
  • missing persistent disk
  • sessions end after 24 h: needs restarts to run 24/7
  • egress price not published
None that bite
50 agents in parallel
  • missing persistent disk
  • egress price not published
None that bite
Sandboxes for your usersNone that bite
  • egress price not published
None that bite
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • egress price not published
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use Cloudflare Sandbox when

your app already runs on Workers and you want many short sandboxes that sleep when idle, wake on the next request and follow egress rules you write as code.

  • Sleeps when idle, wakes on request. Useful for many short, spiky sessions: a sandbox sleeps when idle, wakes on the next request, and bills CPU only while busy.
  • Egress rules you can program. Useful if you need control per request: block every host not on your list and run your own code on each outbound call.
  • Next to the rest of Workers. If your app already runs on Workers, sandboxes sit next to Durable Objects and R2, in several regions of Cloudflare's network.

Use Namespace when

you need macOS or Windows machines, faster GitHub Actions runners with build caches, or dev boxes for people that keep their storage and stop when idle.

  • macOS and Windows. Useful if you build iOS or Mac apps or test on Windows: Namespace runs macOS on Apple Silicon and Windows machines.
  • CI runners and build caches. Useful if you want faster GitHub Actions: Namespace is a drop-in runner with Docker, Bazel, Turborepo and Nix caching.
  • Dev machines that keep their storage. Useful for people and agents who come back to the same box: a stopped Devbox keeps its files and starts when you connect.

Where bochka fits

Cloudflare Sandbox is built for short sandboxes inside Workers, and Namespace is built for CI and dev machines with a clock on them. If what you are really running is agents that work for hours or days, bochka gives each one a full VM that keeps its disk, runs full Docker and a desktop, and never hits a session cap on paid plans.

Work that survives a stop and a long day

On Cloudflare a sandbox that sleeps comes back with an empty disk unless your code saved a snapshot or backup. On Namespace the Devbox shuts down after 24 hours at most, even mid-task. bochka saves the disk every minute and has no session cap.

A whole machine, not a trimmed one

Cloudflare runs Docker with iptables off, has no desktop and 20 GB of disk by default. Namespace offers /dev/kvm on compute instances only and a computer-use API on macOS only. bochka has full Docker, systemd, /dev/kvm and a 60fps Linux desktop on every VM.

Agents you drive from outside

On Cloudflare you bake each agent into your image and write the outbound handler for every token. On Namespace a partner runs the agent loop, or you write it. bochka ships the agents with a prompt, steer and events API, and switches credentials when credits run out.

Use bochka when your agents work on Linux for hours or days: a full, faster VM that keeps its disk, with no session cap, full Docker and /dev/kvm, a 60fps desktop and coding agents you drive from outside. Compare it one to one: bochka vs Cloudflare Sandbox and bochka vs Namespace.

Questions people ask

Is Cloudflare Sandbox cheaper than Namespace?

In all five scenarios we priced, Cloudflare's estimate is lower: for example $39 against $50 for one coding agent on workdays, and $476 against $1,214 for sandboxes for your users. But Cloudflare does not keep files between sessions, so the scenarios that need that do not fit without your own snapshot code. bochka comes to $20 and $200 for those two.

Which is faster, Cloudflare Sandbox or Namespace?

Only Namespace has a CPU score on StarSling's Node.js build-and-test benchmark: 21.79 runs per second at 4 vCPU / 8 GB. Cloudflare Sandbox has no result there. bochka scored 26.69 on the same run.

Can I run Docker inside Cloudflare Sandbox or Namespace?

Yes, both. Cloudflare supports docker:dind with iptables and IP forwarding turned off, because containers cannot change iptables. Namespace Linux Devboxes include Docker. bochka runs full Docker with root and systemd.

How long can a session run on each?

Cloudflare sets no fixed maximum but does not guarantee any runtime, and host restarts wipe state. A Namespace Devbox shuts down after 4, 5 or 24 hours by plan, even while you work in it. bochka has no session cap on paid plans.

Do they keep my files?

Namespace does: a stopped Devbox keeps its storage, billed at $0.20 per GB-month used. Cloudflare starts from a fresh disk after sleep unless your code saved a snapshot (public beta, kept 30 days) or an R2 backup. bochka saves the disk every minute and on stop.

Does either one run macOS?

Namespace does, on Apple M4 Pro and M5 Max machines with Xcode, and it also runs Windows on Team plans and up. Cloudflare Sandbox and bochka are Linux only.

Try bochka

Install the CLI, then run bochka new.

Product preview

More comparisons

Bochka product preview · Pricing, benchmarks and commands are illustrative. Sandbox provisioning is not connected.