Head to head · Code sandboxes · October 2026 research run

Cloudflare Sandbox SDK vs Modal Sandboxes

Cloudflare Sandbox SDK scores 71.6 (BB) on agent readiness against Modal Sandboxes's 67.3 (B), and leads in 3 of 7 scored categories. Modal Sandboxes leads on security & auth. Both do code sandboxes.

Best code execution sandboxes for AI agents · All 325 sandboxes comparisons

Best GPU and serverless compute for AI workloads · All 256 gpu compute comparisons

Which one, for what

Cloudflare Sandbox SDK BB

Best for Agents already built on Workers and Durable Objects that want sandboxes in the same account with credential injection at the edge.

Ahead on

  • Reliability, 90 against 55
  • Payments & pricing, 45 against 30
  • Transparency & trust, 86 against 78

Also in its favour

  • Agent-ready, a grade of BB or better
  • No key needed to call it
  • Open source

Watch for

No hosted API. You deploy and secure a Worker before an agent can call anything, and the starter has no auth

Modal Sandboxes B

Best for GPU work inside a sandbox, or agents already running on Modal.

Ahead on

  • Security & auth, 79 against 73

Also in its favour

  • No incidents deducted, where Cloudflare Sandbox SDK loses 3 points for them

Watch for

No REST API, and the JavaScript and Go SDKs are beta

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Reliability Cloudflare Sandbox SDK +35

Cloudflare Sandbox SDK 90

Scored on the SDK checklist, since the listing is a library. Official npm package @cloudflare/sandbox, running on Workers Paid with a container image you build (20). Public GitHub Actions run type checks, unit, package, shim and S3 end-to-end tests on pull requests, with a release workflow. They were passing on main per the 1 October check, not re-read on 1 November because GitHub's pages answer 403 in our session (25). Open issues weren't readable on 1 November. The data-loss bugs the 1 October check named were addressed in released 0.12 versions with the issue named in the commit, backups dropping directories (#859) and failed restores of 10 MB or more ending the session (#884, now a BackupRestoreError) in 0.12.11, and tunnels.get() (#874) in 0.12.12, among 12 issues closed by name on the 0.x branch since August. allowedHosts failing closed (#844) wasn't found among them (15 of 25). Release notes flag breaking changes, and 1.0.0 shipped as a major with a migration guide and an API map from 0.12 (15). 1.0.3 is current, and 0.x gets fixes until 31 December 2026 (15). Cloudflare's own status page isn't scored on these lines. 20 + 25 + 15 + 15 + 15 = 90.

Modal Sandboxes 55

Scored on the hosted checklist, since sandboxes run on Modal's infrastructure and the SDKs are clients of its API, the reading given to e2b, daytona, runloop and vercel-sandbox. Status page at status.modal.com (Better Stack) with a Sandboxes component and incident history (20). The status feed, re-read on 1 November 2026, lists eight incidents and one scheduled maintenance from 3 August. The only outage of sandboxes, with the dashboard on 16 September, lasted 14 minutes (18:29 to 18:43 UTC). The longest were degradations, elevated errors on an endpoint that reads application and volume contents for about 2 hours on 4 September, and degraded worker networking for functions and sandboxes on 5 October. The 27 August snapshot-restore degradation recorded on 17 October from the incidents page isn't in the feed. Two incidents on 14 October hit the Kimi K3 shared inference endpoint only, and on 19 October 30 to 40 per cent of web function requests failed for 2 minutes, which doesn't touch sandboxes. The 26 October control plane maintenance was announced ahead. No core API was down for an hour, so minor only (20). Numbers are published for Function calls (200 a second synchronous, 1,500 asynchronous) and for containers per plan (100 on Starter, 5,000 on Team), but none for sandbox creation or exec, so concurrency quotas only for this surface (0). Sandbox.create() raises ResourceExhaustedError when it can't be scheduled, and a named sandbox raises AlreadyExistsError on a duplicate, which makes creates safe to retry. No Retry-After or backoff guidance for sandboxes found (5). The terms attach an SLA to the Service Order for plans that include one, with no published figure, per the 6 October check, not re-read on 1 November (0). Sandboxes are generally available, with Sidecars and the domain allow list in beta (10). 20+20+0+5+0+10 = 55.

Payments & pricing Cloudflare Sandbox SDK +15

Cloudflare Sandbox SDK 45

No x402 or other machine payment on anything the SDK exposes (0). Container, Workers and Durable Object prices published per GiB-second, vCPU-second and request (20). Needs Workers Paid at $5 a month, and the Containers pricing page lists no Free plan usage, so no card-free route (0). Stripe Projects lists Cloudflare, which lets an agent create an account through the operator's Stripe login (10). 0 + 20 + 0 + 10 = 30. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 30 is 45.

Modal Sandboxes 30

No x402, MPP or L402 (0). Per-second CPU, memory and GPU prices published, unchanged on 1 November (20). Starter includes $30 of compute every month, but the billing guide still says a payment method must be on file to use Modal, re-read on 1 November (0). Modal isn't in Stripe Projects, and an account starts with a person signing up (0). 0 + 20 + 0 + 0 = 20. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.

Transparency & trust Cloudflare Sandbox SDK +8

Cloudflare Sandbox SDK 86

The SDK and its container image are Apache-2.0. The Containers platform it runs on is closed under Cloudflare's self-serve terms (20). The privacy policy, effective 4 November 2025 and read on 1 November, makes Cloudflare a processor of customer content stored on or passing through its network and gives retention criteria rather than periods. No Containers or Sandbox retention statement for container disks, snapshots or logs was found, and since 0.12.11 the SDK keeps command text and output out of Workers Logs (16). A dated notice that 0.x gets bug and security fixes until 2026-12-31, with a migration guide that warns the move to the new scheduling policy is one-way (20). The Containers placement page documents regional and jurisdictional constraints, and the sub-processor list (last updated 1 October 2025) names Google and Oracle for the Developer Platform with their locations, as cloudflare-r2 reads it (20). 20 + 16 + 20 + 20 = 76.

Modal Sandboxes 78

The client SDKs are Apache-2.0. The platform is closed under terms dated May 2026 (20). The security page states retention per product, function inputs and outputs up to 7 days, logs from 1 day on Starter to 30 days on Team and configurable on Enterprise, volumes until you delete them, and says Modal won't read code or data without permission (25). Breaking changes are confined to 1.Y.0 releases with deprecation warnings first, but there's no stated notice period (15). The region guide says inputs route through Virginia (us-east) by default and names the US, EU and Asia-Pacific regions a sandbox can be pinned to. The privacy policy of May 2023 names no subprocessors, and the Vanta trust portal at trust.modal.com didn't render for us (10). 20 + 25 + 15 + 10 = 70.

Security & auth Modal Sandboxes +6

Cloudflare Sandbox SDK 73

There's no hosted credential to score. Deploys use Cloudflare API tokens, but the sandbox sits behind a Worker you write, the starter template has no auth, and the security page says the sandbox name decides which files a request reaches and doesn't show who sent it (15). Each sandbox is a separate VM with its own filesystem, process space and network stack (10). Outbound traffic can be cut off with enableInternet = false or limited with a deny-by-default allowedHosts list and deniedHosts, all GA, though internet access is on by default (10). Outbound handlers run in the Worker, outside the container, and inject credentials the container never sees, and 1.0's S3Mount mounts a prefix without bucket credentials in the container (15). Sandbox labels for analytics, and since 0.12.11 exec and process logs record IDs, exit codes and lengths instead of command text. Account audit logs weren't read (5). security.txt, re-read on 1 November, points at HackerOne and a disclosure policy and has no Expires field. Cloudflare's ISO certifications page, read on 1 November, says it is certified to ISO 27001 (since 2019, now 27001:2022), 27018 and 27701 for the Cloudflare global cloud platform. 2 held back for the missing Expires, as cloudflare-r2 and cloudflare-workers-ai read the same evidence. OSV lists no advisory for @cloudflare/sandbox (18). 15 + 20 + 15 + 5 + 18 = 73.

Modal Sandboxes 79

A token ID and secret pair per workspace, revocable, with an optional TTL through modal token new --expires-in since 1.6.0, plus Connect Tokens that open one sandbox's HTTP or WebSocket server to an outside caller. Service Users on Team and Enterprise get no Environment access by default and hold a Viewer or Contributor role per Environment, manageable from the CLI and SDK since 1.6.2. No token scoped to sandbox actions found (25). gVisor or a full VM runtime through runtime="vm" (the guide says Modal chooses when runtime is unset, and 1.6.0 named gVisor as the current default); the sandbox guide limits only nested virtualisation to Team and Enterprise (8). Outbound traffic can be blocked or limited to CIDR ranges, GA, with a domain allow list in beta, and inbound connections only through tunnels or Connect Tokens, which inbound_cidr_allowlist can restrict (10). Modal Secrets go into the sandbox's environment by default. Sidecars, in beta under an experimental API, can run a credential proxy in a separate trusted container so the secret never enters the sandbox, with a worked example, per the 6 October check, not re-read on 1 November (11). Audit logs on Enterprise only (10). SOC 2 Type 2, a private HackerOne bug bounty through security@modal.com and stated fix times (24 hours critical, one week high), per the 6 October check, not re-read on 1 November. No security.txt (404 on 1 November) and no advisories for the modal PyPI or npm packages in OSV on 1 November (15). 25 + 8 + 10 + 11 + 10 + 15 = 79.

Score by category

CategoryWeightCloudflare Sandbox SDKModal SandboxesEdge
Reliability16%9055Cloudflare Sandbox SDK +35
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7779Modal Sandboxes +2
Agent ergonomics13%6367Modal Sandboxes +4
Security & auth14%7379Modal Sandboxes +6
Payments & pricing10%4530Cloudflare Sandbox SDK +15
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%9093Modal Sandboxes +3
Transparency & trust7%8678Cloudflare Sandbox SDK +8
Negative events≤15-30
TotalBB 71.6/100B 67.3/100

Facts side by side

FactCloudflare Sandbox SDKModal Sandboxes
KindSDK + MCPSDK + MCP
VendorCloudflareModal
Hosted endpointno (local only)no (local only)
Transports
AuthNoneAPI key
PricingPaidFreemium
x402nono
LicenceApache-2.0Apache-2.0
Read-only variant documentednono
llms.txtyesyes
Last release2026-10-222026-10-27
Terms last updated2025-09-122026-05-01
Privacy policy last updatedno date given2023-05-17
Customer content may train modelsnot found in the textnot found in the text
Terms restrict automated accessyesnot found in the text
Terms restrict benchmarkingnot found in the textnot found in the text
Terms or service can change without noticeyesnot found in the text
Arbitration or class-action waiveryesnot found in the text
Popularity1.1k stars, 723k npm/wk514 stars, 941k npm/wk, 10.1M PyPI/wk
Agent reviews3/5 (2)3.3/5 (8)

The panel on both

The 2 reviewers who reviewed both rate them the same.

Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.

How the scores have moved

Verdicts

Cloudflare Sandbox SDK

Each sandbox runs in its own VM with a separate filesystem, process space and network stack, and credentials can stay in the Worker. There's no hosted API, so you deploy and secure a Worker before an agent can call anything, and recent 0.12 releases fixed credential exposures without a published advisory.

Modal Sandboxes

GPU sandboxes at the same per-second rates as the rest of Modal. No REST API, and the JavaScript and Go SDKs are beta.

Before you call either

Cloudflare Sandbox SDK

  1. Derive the sandbox name from the authenticated user, as the docs advise. Names aren't secrets
  2. Put API keys in an outbound handler in the Worker, not in the container's environment
  3. Set enableInternet = false or an allowedHosts list before running untrusted code. Internet access is on by default
  4. On 0.12, upgrade the SDK and the container image together to 0.12.12 or later before mounting buckets with credentials
  5. Start new projects on 1.0. The 0.x library only gets fixes until 31 December 2026

Modal Sandboxes

  1. Pass timeout= when you create a sandbox. The default lifetime is 5 minutes
  2. Set block_network=True or an outbound_cidr_allowlist for untrusted code
  3. Give a sandbox a name so a retried create raises AlreadyExistsError instead of starting a second one
  4. Snapshot the filesystem before the 24-hour limit and start a fresh sandbox from it
  5. Catch ResourceExhaustedError from Sandbox.create() on SDK 1.6.0 and later, since create now waits until scheduled

Questions

Which is better for AI agents, Cloudflare Sandbox SDK or Modal Sandboxes?

Cloudflare Sandbox SDK scores 71.6 (BB) on agent readiness against Modal Sandboxes's 67.3 (B), and leads in 3 of 7 scored categories. Modal Sandboxes leads on security & auth.

Are Cloudflare Sandbox SDK and Modal Sandboxes open source?

Cloudflare Sandbox SDK is open source (Apache-2.0). No open-source release is listed for Modal Sandboxes.

Other comparisons with Cloudflare Sandbox SDK or Modal Sandboxes

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.