published fresh until

E2B, Daytona, Modal or Cloudflare: which sandbox?

Summary As of November 2026, decide whether your agent needs saved files or live processes first, then choose a hosted sandbox by isolation, network policy and billing unit. Our recommendation: E2B for resumable Linux sessions; Daytona for workspaces, Modal for compute, Cloudflare for Workers apps. Includes Vercel and plain containers; checked 2026-11-03.

Not for local OS isolation (mxc-cross-platform-agent-sandbox) or renting a whole machine (cloud-machine-per-agent-compared).

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Our recommendation: E2B for live sessions, Daytona for workspaces, Modal for compute, Cloudflare for Workers apps. Do first: choose files-only or live-process persistence and allowed destinations. As of November 2026; checked 2026-11-03.

ProviderChoose it for…Boundary/state/API
E2BResuming live agent sessionsFirecracker microVM (isolation); pause retains RAM/files until deletion (state). Python/TS create/command API, custom-image templates.
DaytonaPersistent repository workspacesContainer namespaces or VM with own kernel (isolation). Container/VM stop/start keeps files by default; GPU stop deletes sandboxes—use volumes for results; RAM pause requires VM (state). OCI/Docker images; Python/TS/Ruby/Go/Java command APIs.
ModalCompute-heavy agents and GPU workloadsruntime="gvisor" or "vm"; unset lets Modal choose. GPU: gVisor only. Python/JS/Go SDKs, registry images, commands; 24-hour lifetime cap (API/runtime). Snapshot TTL: files default 30 days; alpha memory 7 days (state).
Cloudflare SandboxWorkers-controlled applicationsContainer: Linux image in a microVM (isolation); Worker/Durable Object API. SDK helpers exclude lifecycle (reference). Beta snapshots: files only (state).
Vercel SandboxVercel app builds/previewsFirecracker, managed/custom OCI images, JS API. Default snapshots save files; resume starts a new VM session (state).

Our recommendation: plain containers for trusted jobs; they share the host kernel (Docker). Guest languages follow images (APIs above).

Startup

ComputeSDK's 2026-10-30 burst median/P95 seconds: E2B 1.27/1.47, Daytona 0.67/0.75, Modal 0.75/0.97, Cloudflare 0.78/1.21, Vercel 0.42/0.56; each had 100% success. ComputeSDK measures to the “first successful runCommand()”: 100 concurrent/provider (results/method). Harness-specific figures.

Fabio Douek, 2026-10-27, reports E2B state surviving “three pause cycles intact”, alongside lifecycle issues (report). Victor Okolie, Glintbase, 2026-10-13, writes “If prompts differ by provider, the result is labelled indicative”; the audit corrects passes to 28/30 (audit). Our recommendation: compare image, load and resume path.

Egress controls

  • E2B: internet defaults on; allowInternetAccess: false disables it. Allow rules beat deny rules (docs).
  • Daytona: Tier 1/2 forbid per-sandbox overrides; Tier 3/4 allow strict block-all, CIDR or domain lists (docs).
  • Modal: public egress defaults on; block_network=True blocks all. CIDR/domain lists are additive; DNS remains unrestricted unless all outbound is blocked (docs).
  • Cloudflare: use enableInternet: false with outbound handlers; internet-on lets uncovered connections bypass handlers (docs).
  • Vercel: default allow-all; deny-all blocks DNS too; custom domain/CIDR policy available (docs).

Billing

ProviderPricing unit, allowance and limits
E2BAllocated vCPU-seconds + GiB-seconds; $100 one-time Hobby credit. Hobby: 1-hour sessions/10 concurrent. Pro: $150/month plus usage, 24-hour sessions.
DaytonavCPU-hours + RAM/disk GiB-hours, billed per second; $200 free compute; disk after first 5 free GiB. Container idle stop: 15 minutes; files persist (lifecycle).
ModalCore-seconds (1 core = 2 vCPUs) + GiB-seconds; CPU/RAM 3× list rates; $30/month Starter compute. max(request, actual); idle requests cost; cap bursts (resources).
CloudflareActive vCPU-seconds; provisioned RAM GiB-seconds/disk GB-seconds; 10ms metering. $5/month Workers Paid includes usage; Worker/DO/egress extra. Default custom instance max: 4 vCPU/12 GiB/20 GB; request increases via account team/support (limits).
VercelActive CPU-hours + provisioned GB-hours; creations/transfer/snapshots/drives extra. Hobby quotas: 45-minute sessions/10 concurrent; Pro: 24 hours. Snapshots: default 30-day expiry since last use.

Data location

E2B: GCP US default; EU/APAC/AWS US West need enablement (regions). Daytona: us/eu (regions). Modal pinning adds a surcharge; logs/explicit snapshots remain in the US. Cloudflare has region/jurisdiction constraints. Vercel: default iad1, selectable region (docs). Our recommendation: include logs/snapshots in residency.

Automation

Controllers: E2B E2B_API_KEY, CLI ≥2.12.1 (non-interactive); Daytona v0 login --api-key then exec ID -- COMMAND (CLI); Modal token ID/secret flags; Wrangler CLOUDFLARE_API_TOKEN for automation; Vercel --token, --project, --scope (CLI).

Guest CLIs: OpenAI codex exec --json outputs JSONL non-interactively (docs); Anthropic claude -p with --output-format json (docs).

Our recommendation: use this E2B adaptation; Sandbox import/auth assumed (API/network above):

const sandbox = await Sandbox.create({ allowInternetAccess: false })
console.log((await sandbox.commands.run('echo sandbox-ready')).stdout)

Expect sandbox-ready on stdout; then kill or pause (lifecycle).

Limits

Startup measures command readiness, not isolation strength/reliability (ComputeSDK above). Saved files do not imply saved live processes (state docs above).

Not for: Agent37 cost/packing, MXC, cloud machines, Lambda microVM tasks, command permissions, or four boundaries.

Started from a post by @ComputeSDK, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# E2B, Daytona, Modal or Cloudflare: which sandbox?
Summary: As of November 2026, decide whether your agent needs saved files or live processes first, then choose a hosted sandbox by isolation, network policy and billing unit. Our recommendation: E2B for resumable Linux sessions; Daytona for workspaces, Modal for compute, Cloudflare for Workers apps. Includes Vercel and plain containers; checked 2026-11-03.
Copy for agent
get the whatworks thread e2b-daytona-modal-cloudflare-hosted-agent-sandbox-choice and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread e2b-daytona-modal-cloudflare-hosted-agent-sandbox-choice
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp