Sandboxes for AI coding agents, compared

Sandboxes for AI coding agents, compared

SDK sandboxes and dev machines for AI coding agents, side by side: E2B, Daytona, Modal, Vercel, Cloudflare, Codespaces, Coder, Northflank and homemade.

20 Nov 20263 min readhomemade team

"Sandbox for AI agents" now covers two very different things. One is an API your product calls to run a snippet of untrusted code, thousands of times an hour. The other is a whole machine where a coding agent like Claude Code or Codex works on your project for an afternoon. Most "best sandbox" lists mix them up, which is why their winners look so random.

We make homemade, which is the second kind, so we're not neutral. To keep this useful: every fact about another product is from that company's own pages, checked on 20 November 2026, and each one links to a full comparison with sources.

Two questions decide it

  1. Who starts the sandbox? If your code creates one per request inside your own product, you want an SDK sandbox. If you (or your agent) start one per task and then work in it, you want a dev machine.
  2. How long does it live? Seconds to minutes points to an SDK sandbox. Hours to weeks, with your app running and a link to open it, points to a dev machine.

SDK sandboxes: code execution inside your product

E2B. Linux machines created from a Python or JavaScript SDK, each a hardware-isolated microVM with its own kernel. Pausing keeps memory and files. The free Hobby plan has a one-time credit and 1-hour sessions; Pro is a monthly fee plus per-second usage. homemade vs E2B

Daytona. Sandboxes from SDKs in TypeScript, Python, Ruby, Go and Java, with a dedicated kernel, filesystem and network stack. Pay as you go per second, with free compute for new users. homemade vs Daytona

Modal Sandboxes. Programmatic sandboxes on Modal's cloud, with gVisor or full-VM isolation and GPU sandboxes on gVisor. Default lifetime is 5 minutes, configurable up to 24 hours. homemade vs Modal

Vercel Sandbox. Isolated Linux microVMs from an SDK or CLI, with CPU billed only while it is active. Persistent sandboxes save their filesystem when stopped and restore it when resumed. homemade vs Vercel Sandbox

Cloudflare Sandbox SDK. Linux environments that your Cloudflare Worker starts and sends work to. Cloudflare's docs say sandbox state "exists only while the container is active" (source). homemade vs Cloudflare Sandbox

Pick one of these if your product runs code for its own users. They're built for volume and short lives, and none of them is meant to be the place you sit and work.

Dev machines: where a coding agent works on your project

GitHub Codespaces. Cloud dev environments inside GitHub, defined by dev container files. Each codespace is a container on a VM, stops after 30 idle minutes by default and has a 12-hour maximum lifetime. homemade vs Codespaces

Coder. Self-hosted dev environments defined with Terraform, on whatever infrastructure your templates describe. The Community edition is free and open source; you run and pay for the machines. homemade vs Coder

Northflank. Sandboxes in their own microVMs, ephemeral by default with volumes to keep state, as one product inside a broader platform for services, databases and jobs. Lists Codex, Claude Code, OpenCode and Pi as agents you can onboard. homemade vs Northflank

homemade. A Linux VM per project or task, started from your GitHub repo with dependencies installed and services running. Claude Code, Codex, OpenCode, pi, Kimi and Grok are installed, and you sign in once for every VM. Each port gets an HTTPS preview link, and VMs sleep when idle and wake where you left them. You can drive it from the browser (phone included), SSH, VS Code, Cursor, the CLI, an MCP server or the HTTP API. Hobby is free with 25 VM-hours a month; Pro is $20 a month with $20 of usage included, then from $0.012 an hour (nano) to $0.18 (large) by size.

Where homemade doesn't fit

  • You need thousands of short sandboxes per hour inside your own product: use an SDK sandbox above.
  • You need a GPU: homemade has no GPU sizes.
  • Your environments must run in your own cloud account: Coder.
  • You develop for Windows: homemade VMs run Linux.

Short version

Building a product that runs other people's code: E2B, Daytona, Modal, Vercel Sandbox or Cloudflare. Giving coding agents a real machine to work on your project, with the app running on a link: Codespaces, Coder, Northflank or homemade. If you want the agents signed in already and the VM asleep when nobody's using it, try homemade's AI agent sandbox.

Every comparison is on /compare.

Sources

Try homemade

Every project gets its own cloud computers, with Claude Code and Codex signed in. The Hobby plan is free.

Related posts