Cloudflare Sandbox vs Claude Managed Agents
Cloudflare Sandbox gives you containers that you drive from your own Worker and fill with any code or agent you like. Claude Managed Agents gives you Claude itself: you send a task, and Anthropic's harness runs Claude in a small container that Anthropic manages.
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
Claude Managed Agents
Claude Managed Agents is Anthropic's ready-made agent harness: Claude runs as an autonomous agent in a cloud sandbox that Anthropic manages, and you talk to it through an events API.
This is an agent platform, not a sandbox you rent. You define an agent (model, prompt, tools, MCP servers, skills) and an environment, then start sessions, send messages as events and stream back what Claude does; the harness handles tool calls, prompt caching and compaction. Each session gets its own Ubuntu container, or runs its tools on a worker you host yourself. It is built for teams that want Claude doing long tasks without building their own agent loop or sandbox.
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 | Claude Managed Agents: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Neither is a clean fit for a coding agent's long day: Cloudflare's disk resets on sleep and Managed Agents caps memory at 8 GB and disk at 10 GB, while boat gives a full VM that keeps its disk. | 162nd of 367, with limits $1,543 a month | 106th of 367, with limits $964 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB Managed Agents keeps an idle session's files and wakes it on the next message, but only for 30 days after the sandbox is created; Cloudflare starts from a fresh disk after sleep. | 207th of 366, with limits $2,188 a month | 219th of 366, with limits $2,511 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 Short code-interpreter calls suit Cloudflare Sandbox best here: it ranks 13th of 345 and bills CPU only while busy, while Managed Agents ranks 163rd and bills runtime for the whole session. | 13th cheapest of 345 $144 a month | 163rd of 345, with limits $756 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 Cloudflare Sandbox fits sandboxes for your users and ranks 9th, with previews through your Worker; Managed Agents has no inbound ports, so your users cannot open what runs inside, and boat ranks first. | 9th cheapest of 361 $731 a month | 231st of 361, with limits $823 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 | 252nd of 360, with limits $3,978 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 Agent evals fit Cloudflare Sandbox, which ranks 45th, better than Managed Agents at 244th; boat ranks 10th with Docker and a desktop inside each run. | 45th cheapest of 364 $818 a month | 244th of 364, with limits $320 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 jobs that build Docker images hit Cloudflare's 20 GB disk and iptables limits and Managed Agents' limited Docker; boat runs full Docker on a VM. | 301st of 377, with limits $704 a month | 227th of 377, with limits $96 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box needs files that stay: Cloudflare wipes the disk on sleep, Managed Agents has no SSH and expires state after 30 days, and boat keeps the disk while stopped. | 70th cheapest of 368 $93 a month | 224th of 368, with limits $48 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 Neither ships a desktop: Cloudflare removed its built-in one and Managed Agents has headless Chromium only, while boat streams a full Linux desktop at 60fps. | 166th of 369, with limits $460 a month | 127th of 369, with limits $288 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 | 126th of 367, with limits $288 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 | 127th of 346, with limits $390 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 | 155th of 338, with limits $4,798 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 | 179th of 360, with limits $160 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 | Can't run it | Can't run it | Can't run it |
Key features
| Feature | Cloudflare Sandbox | Claude Managed Agents | boat |
|---|---|---|---|
| What it is | A sandbox SDK: containers you start and drive from your own Cloudflare Worker | A hosted Claude agent: Anthropic's harness runs Claude in a sandbox and you send it events | A sandbox platform: each agent gets its own full Linux VM, with coding agents built in |
| Isolation | Firecracker microVM per container, with its own kernel and network | Isolated Linux container per session | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Machine size | Up to 4 vCPU / 12 GiB / 20 GB disk by default (can be raised) | Up to 8 GB memory and 10 GB disk; vCPU not published; not configurable | Up to 16 vCPU / 32 GB, depending on plan |
| Files between sessions | Fresh disk after sleep, unless your code saves a snapshot (public beta, 30 days) or an R2 backup | Checkpointed when a session goes idle; kept only 30 days after the sandbox is created | Whole disk saved every minute and on stop, kept as long as you keep the sandbox; a stopped sandbox costs nothing |
| Wake on next request | Stops after inactivity and wakes on the next request, with a fresh disk | Idle session resumes from its checkpoint on the next message; idle time is not billed | No idle timer; TTL based (1 h default, changeable), started again by API |
| Fork | No fork; restore a saved snapshot or backup into a new sandbox | No fork or clone of a session or sandbox | Fork a running sandbox with its disk, without stopping it |
| Docker, systemd and /dev/kvm | docker:dind with iptables and IP forwarding turned off; nested virtualization not documented | Docker listed as limited availability; root, systemd and /dev/kvm not documented | Root, full Docker, systemd and /dev/kvm for Android emulators and VMs |
| Desktop and browser | Built-in desktop removed in SDK 0.10.2; bring your own | Headless Chromium with Playwright; no desktop or computer-use tool | 60fps Linux desktop with Chromium, computer-use API and an embeddable stream |
| Inbound access | HTTP and WebSocket previews routed through your Worker; no raw TCP or public IP | No inbound ports or SSH; reached only through the sessions and events API | HTTPS URLs on up to 50 ports, token-protected by default; raw TCP; SSH |
| Agents | Run Claude Code, Codex, OpenCode or Pi in your own image | Anthropic's harness with Claude models only, with steering, memory stores, multiagent threads and webhooks | Claude Code, Codex and more preinstalled, driven from outside with a prompt, steer and events API |
| Keeping keys out of the sandbox | Your outbound handler adds the token for any HTTP or HTTPS host; you write the code | Vault secrets sit in the sandbox as placeholders and are swapped in at egress, per host | Managed credentials proxy for model providers and any HTTPS API; a credential can switch to another account |
| Outbound rules | allowedHosts deny-by-default list plus outbound handlers you write in Worker code | Unrestricted, or limited to listed hosts plus optional package registries and MCP servers | Open internet, no provider-side allowlist |
| Self-hosting | No; the SDK is open source but the platform runs only on Cloudflare | Self-hosted sandboxes run tools on your own workers while Anthropic keeps the orchestration | No |
| Where it runs | Several regions across Cloudflare's network, nearest free instance picked | US workspace geo only; inference can be global or US | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Cloudflare Sandbox | Claude Managed Agents | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | No | Yes |
| Docker inside | Yes | Not published | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Not published | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | Yes | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | No | 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 | No | Yes |
| Raw TCP inbound | No | No | 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 | Yes | Yes |
| MCP server | No | Yes | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | Yes | No |
| BYOC | No | Yes | 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 | Yes | Yes |
| Audit logs | Yes | Not published | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | No | Yes |
| Zero data retention | Not published | No | Yes |
Performance
Neither Cloudflare Sandbox nor Claude Managed Agents has a result on the hpc-sandbox-benchmarks run, and Anthropic does not publish how many vCPUs a Managed Agents sandbox gets, so there is no CPU number to compare between them. boat did 26.69 runs per second on the Node.js build-and-test loop at 4 vCPU / 8 GB. On Managed Agents, much of a session's time is often spent waiting on the model rather than the CPU.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Cloudflare Sandbox and Claude Managed Agents have 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 | Claude Managed Agents, a month | boat, 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 | $13 · Claude API (pay-as-you-go, usage tiers) · with limits | $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 | $53 · Claude API (pay-as-you-go, usage tiers) · 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 | $634 · Claude API (pay-as-you-go, usage tiers) · with limits | $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 | $360 · Claude API (pay-as-you-go, usage tiers) · with limits | $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 | $796 · Claude API (pay-as-you-go, usage tiers) · with limits | $2,000 · $2000/mo · with limits |
Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while in use; memory and disk are billed on the instance size you picked until the container sleeps, and 4 vCPU always comes with 12 GiB.
Claude Managed Agents: There is no plan fee: you pay model tokens at API rates plus a flat session runtime fee that accrues only while a session is running, including time spent waiting on the model. The tables show runtime only; tokens come on top and usually cost more.
Claude Managed Agents: Plans start at $20 a month, and the whole fee is usage credit, billed per second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
Cloudflare Sandbox fits the sandboxes-for-your-users scenario, but its disk resets after sleep, so the scenarios that keep 50 GB of files between days do not fit without your own snapshot code, and its default 1,500 vCPU account cap is short of the 2,000 vCPU the 1,000-job burst needs. Claude Managed Agents fits none of the scenarios cleanly: it is an agent platform rather than a plain sandbox, its machine size is not published, and Docker is only in limited availability. Anthropic publishes no concurrent-session cap, only 300 creates per minute per organization and usage-tier spend limits.
| Scenario | Cloudflare Sandbox | Claude Managed Agents | boat |
|---|---|---|---|
| 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 short sandboxes for any code or agent, with egress rules you program and sleep when idle.
- Any code, any model. Teams that want their own image and their own agent, on any model, get a plain sandbox they control from a Worker.
- Egress rules you can program. Teams with strict network rules can block every host but a list, and run their own code on each outbound request.
- Short, spiky sessions inside Workers. Apps already on Workers get sandboxes that sleep when idle, wake on request and bill CPU only while busy.
Use Claude Managed Agents when
you want Claude itself to do long text and code tasks with no harness to build, idle time that costs nothing, and the option to run tools on your own workers.
- No agent loop to build. Teams that want Claude doing long tasks get the harness, caching, compaction, memory and webhooks ready to use.
- Idle sessions keep their files and wake on the next message. Agents that wait a long time between messages pay runtime only while working and resume where they left off.
- Tools on your own workers. Teams that must keep files and traffic in-house can run every tool call on workers they host themselves.
Where boat fits
If your agents do real work for hours, both options get tight: Cloudflare's disk resets on sleep and Managed Agents' container is small and expires its state. boat gives each agent a full VM that keeps its disk, runs Docker and a desktop, and opens ports you can share, with Claude Code, Codex and others you drive from outside.
A machine that keeps its files
Cloudflare starts from a fresh disk after sleep unless your code saves a snapshot, and Managed Agents drops state 30 days after the sandbox is created. boat saves the whole disk every minute and keeps it while stopped.
Room for real builds
Cloudflare tops out at 4 vCPU and 20 GB of disk by default with iptables off; Managed Agents has 8 GB of memory, 10 GB of disk and limited Docker. boat is a full VM with root, systemd, Docker and /dev/kvm.
Open and watch what the agent builds
Managed Agents has no inbound ports, and Cloudflare previews only HTTP through a Worker you write. Neither has a desktop. boat gives HTTPS URLs on 50 ports, raw TCP, SSH and a 60fps desktop with computer use.
Use boat when your agents need a real machine for hours: full Docker, emulators, a desktop and browser, ports you can open, a disk that lasts, and the choice of Claude Code, Codex or other agents. Compare it one to one: boat vs Cloudflare Sandbox and boat vs Claude Managed Agents.
Questions people ask
Is Cloudflare Sandbox cheaper than Claude Managed Agents?
For runtime alone, Managed Agents costs less in all five scenarios on this page, for example $634 a month against $1,660 for 50 agents in parallel. But Managed Agents also bills model tokens, which usually cost more than the runtime, while on Cloudflare you pay your model provider separately.
Which is faster, Cloudflare Sandbox or Claude Managed Agents?
There is no comparable CPU measurement for either one, and Anthropic does not publish a Managed Agents sandbox's vCPU count. Cloudflare's largest default size is 4 vCPU / 12 GiB.
Can I run Docker in Cloudflare Sandbox or Claude Managed Agents?
Cloudflare supports docker:dind with iptables and IP forwarding turned off, because containers cannot change iptables. Managed Agents lists Docker as limited availability. boat runs full Docker with root and systemd.
Do they keep my files between sessions?
Cloudflare starts from a fresh disk after sleep unless your code saved a snapshot (public beta, kept 30 days) or a backup to R2. Managed Agents checkpoints an idle session and resumes it on the next message, but keeps state only 30 days after the sandbox is created.
Can I run Claude in Cloudflare Sandbox?
Yes. Cloudflare documents running Claude Code, Codex, OpenCode or Pi inside your sandbox image, with your own keys added by an outbound handler. Managed Agents runs only Anthropic's own harness with Claude models.
Where do Cloudflare Sandbox and Claude Managed Agents run?
Cloudflare places containers in several regions of its network. Managed Agents stores data and runs code in the US workspace geo only. boat runs in the EU only, in Germany, Finland and France.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs Cloudflare Sandbox
- boat vs Claude Managed Agents
- 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