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.
- Largest instance
- 4 vCPU, 12 GiB memory, 20 GB disk (defaults, can be raised)
- Account limits
- 1,500 vCPU, 6 TiB memory and 30 TB disk running at once
- Compliance
- Cloudflare holds a SOC 2 Type II report
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.
- Products
- GitHub Actions runners, Docker, Bazel, Turborepo and Nix caching, Devboxes, and a compute API
- Hardware
- Its own hardware in its own racks: AMD EPYC for Linux and Windows, Apple M4 Pro or M5 Max for macOS
- Linux Devboxes
- Run from a container image you choose and include Docker; the docs do not say whether each one has its own kernel
- Funding
- Announced a $42M Series B
- Compliance
- Trust center lists SOC 2 Type II
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 workload | Cloudflare Sandbox: price rank | Namespace: price rank | bochka: 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 it | Can't run it | Can'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 it | 6th cheapest of 36 $1,205 a month | Can't run it |
Key features
| Feature | Cloudflare Sandbox | Namespace | bochka |
|---|---|---|---|
| Isolation | Firecracker microVM per container, own kernel and network | Linux Devboxes run from a container image on Namespace's own hardware; the docs do not say if each has its own kernel | Full 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 measurement | 21.79 runs/s | 26.69 runs/s |
| Largest machine | 4 vCPU / 12 GiB / 20 GB disk by default (can be raised); no 4 vCPU / 8 GB size | Linux 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 sessions | Disk is fresh after sleep; snapshots (public beta, kept 30 days) or R2 backups when your code saves them | A stopped Devbox keeps its storage, billed at $0.20 per GB-month used | Disk kept; snapshot every minute and on stop; a stopped sandbox costs nothing |
| How long a session can run | No fixed maximum, but no guaranteed runtime: host restarts stop instances and wipe state | Devboxes stop after 4, 5 or 24 hours by plan, even while you work; 24 hours at most | No session cap on paid plans |
| Idle stop and wake | Stops after inactivity and wakes on the next request | Devboxes stop after an idle timeout (15 minutes to 8 hours) and start again when you connect | TTL based (1 h default, changeable); runs until the TTL or you stop it |
| Docker inside | docker:dind with iptables and IP forwarding turned off | Docker in Linux Devboxes | Full Docker, root and systemd |
| Nested virtualization | Not documented | /dev/kvm on Linux compute instances, not on macOS or Windows | /dev/kvm on every machine (Android emulators, VMs) |
| Desktop and computer use | Built-in desktop removed in SDK 0.10.2; bring your own | Screenshot and click API on macOS Devboxes only; VNC and RDP for compute instances | 60fps Linux desktop and Chromium, computer use and browser control, embeddable stream |
| Reaching the sandbox | HTTP and WebSocket previews routed through your Worker; no raw TCP or public IP | HTTPS URLs that need a Namespace login, TCP through a running CLI port-forward; no public IP | HTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv6 or IPv4 |
| Egress control | allowedHosts deny-by-default list plus outbound handlers you write in Worker code | Egress policies per Devbox blueprint, runner or instance: block, advisory or allow by domain | Open internet; no provider-side allowlist |
| Keeping keys out of the sandbox | Your outbound handler adds the token for any HTTP or HTTPS host; you write the code | Egress rules inject a header from Namespace Vault, resolved outside the workload | Managed proxy for model providers and any HTTPS API you register; switch a credential to another account when credits run out |
| Coding agents | Run Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helper | Hosts Claude Managed Agents, Cursor and Devin sessions through those partners; an MCP server lets your agent create Devboxes | Claude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API |
| Operating systems | Linux (linux/amd64 images) | Linux, macOS on Apple Silicon, and Windows on Team plans and up | Linux only; Wine for Windows apps |
Every feature Battleships tracks (43)
| Feature | Cloudflare Sandbox | Namespace | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | Yes | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No | Yes | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | Yes | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | No | Yes | Yes |
| Pause/resume | No | Yes | Yes |
| Automatic snapshots | No | Yes | Yes |
| Fork/clone | No | No | Yes |
| Live fork (no pause) | No | No | Yes |
| Memory fork | No | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | Yes | Yes | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | Yes | Yes | Yes |
| Secret proxy for any API | Yes | Yes | Yes |
| Preinstalled agents | Yes | Yes | Yes |
| Agent harness API | Yes | No | Yes |
| MCP server | No | Yes | No |
| GPU | No | No | No |
| Windows | No | Yes | No |
| Arm64 | No | Yes | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | Yes | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | No | Yes | Yes |
| Usage per sandbox (API) | Not published | No | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
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.
| Scenario | Cloudflare Sandbox, a month | Namespace, a month | bochka, 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.
| Scenario | Cloudflare Sandbox | Namespace | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users | None that bite |
| None that bite |
| 1,000 short jobs at once |
|
|
|
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 vs Cloudflare Sandbox
- bochka vs Namespace
- E2B vs Cloudflare Sandbox
- Daytona vs Cloudflare Sandbox
- Modal vs Cloudflare Sandbox
- Vercel Sandbox vs Cloudflare Sandbox
- Cloudflare Sandbox vs Blaxel
- Cloudflare Sandbox vs Runloop
- Cloudflare Sandbox vs Tensorlake
- Cloudflare Sandbox vs Morph Cloud
- Cloudflare Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs Northflank