CodeSandbox SDK vs Modal VM Sandboxes
Both give each sandbox its own Linux kernel. CodeSandbox SDK runs Firecracker VMs that hibernate with their memory and wake on the next request, while Modal VM Sandboxes are short-lived VMs that end within 24 hours but come in huge numbers, in many regions, next to Modal's AI platform.
The companies and products
CodeSandbox SDK
CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.
Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs now call it the legacy offering and point new users to its successor, the together-sandbox SDK.
Modal VM Sandboxes
Modal is a serverless cloud for AI work, and VM Sandboxes are the version of its sandboxes that run in a virtual machine with their own Linux kernel.
You create a VM Sandbox from Python, TypeScript or Go code with runtime="vm", run commands in it, and terminate it when the job is done. Modal built the runtime on the Rust-based Cloud Hypervisor, so Docker, FUSE, systemd and nested cgroups work, with the same API, images and prices as its gVisor sandboxes. It became generally available on 1 October 2026 and suits teams that want many short-lived agent machines next to Modal's inference and training.
- Funding
- Over $466M raised
- Generally available
- 1 October 2026; early customers launched over 20 million VMs before that
- Session length
- Default 5 minutes, maximum 24 hours
- Compliance
- SOC 2 on every plan; HIPAA on Enterprise
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. “46th cheapest of 345” means 45 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 | CodeSandbox SDK: price rank | Modal VM Sandboxes: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Both run Docker in a VM, but a Modal VM ends within 24 hours and loses files outside a Volume, while CodeSandbox SDK keeps a 20 GB disk and boat keeps its whole disk with a desktop to check the app. | 178th of 367, with limits $1,939 a month | 84th of 367, with limits $759 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An assistant that lives on its machine all month fits CodeSandbox SDK, which has no hard session cap, but not Modal VM Sandboxes, which stop at 24 hours. | 215th of 366, with limits $2,478 a month | Can't run it | 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 runs suit CodeSandbox SDK well, because its VMs hibernate with their memory and wake on the next request; Modal's VM runtime is not ranked here. | 46th cheapest of 345 $642 a month | Can't run it | 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 CodeSandbox SDK wakes a user's sandbox on their next HTTP request but caps Scale at 250 VMs at once; boat keeps each user's disk while stopped and adds SSH and raw TCP. | 140th of 361, with limits $1,707 a month | Can't run it | 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 CodeSandbox SDK can fork many rollouts from one running state in memory, Modal is built for huge bursts of short jobs, and boat's start limits queue very large bursts. | 348th of 360, with limits $3,861 a month | 171st of 360, with limits $16,322 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 | 64th cheapest of 364 $1,335 a month | Can't run it | 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 fit CodeSandbox SDK fully, while Modal's 24-hour VMs are a compromise; boat adds /dev/kvm on every plan for Android emulator builds. | 92nd cheapest of 377 $860 a month | 188th of 377, with limits $1,064 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 310th of 368, with limits $240 a month | Can't run it | 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 Computer-use agents need a desktop, which neither CodeSandbox SDK nor Modal VM Sandboxes offer; boat streams one at 60fps with Chromium. | 206th of 369, with limits $691 a month | Can't run it | 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 | 251st of 367, with limits $443 a month | Can't run it | 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 | 281st of 346, with limits $508 a month | Can't run it | 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 | 193rd of 338, with limits $7,390 a month | Can't run it | 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 Many parallel attack runs fit either as a compromise; boat gives each one a full VM with a browser, raw TCP and agents built in. | 240th of 360, with limits $326 a month | 294th of 360, with limits $642 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 | CodeSandbox SDK | Modal VM Sandboxes | boat |
|---|---|---|---|
| Isolation | Firecracker microVM with its own kernel | VM with its own Linux kernel on Cloud Hypervisor | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| CPU benchmark (4 vCPU / 8 GB) | Not measured in the same run | 15.54 runs/s | 26.69 runs/s |
| Longest session | No hard cap; hibernates after an idle timeout of up to one day | 24 hours (default 5 minutes) | No cap on paid plans; you set the time to live |
| Pause and resume | Hibernates with a memory snapshot; resumes with processes still running | No paused state; a finished sandbox is gone, only Volumes and snapshots keep files | Disk saved every minute and on stop; resume boots the machine again |
| Wake on request | Yes; an HTTP request to a host wakes a hibernated VM | No | No; a stopped sandbox is started by API |
| Fork | Fork a hibernated sandbox from its snapshot, or a running one sharing its memory | Snapshot the filesystem into an image and boot new sandboxes from it; memory snapshots in alpha | Fork a running sandbox with its disk |
| Docker, systemd, root | Docker and root; built from any Dockerfile | Docker, systemd and root; start dockerd yourself | Docker, systemd and root in every sandbox |
| Nested virtualization | Not documented | Team and Enterprise only, on request | Yes, /dev/kvm on every plan |
| Desktop and browser | No desktop; a headless Chromium template | Not offered; an example shows how to set up Xvfb and VNC yourself | Linux desktop streamed at 60fps, Chromium and a computer-use API |
| Coding agents and API keys | Run your own agent; secrets go in as environment variables | Examples only; secrets are environment variables, or you run a proxy in a sidecar | Claude Code, Codex and others preinstalled, driven from outside by API; a credentials proxy keeps real keys out |
| Inbound access | HTTPS host per port, public by default; no raw TCP or public IP | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP |
| Outbound network rules | No egress allowlist | Block all, IP-range allowlist, domain allowlist (beta) | Open internet, no provider-side allowlist |
| Regions | A country hint steers scheduling, but placement is not guaranteed | US, EU and Asia-Pacific; pinning costs 1.15x to 1.75x | EU only: Germany, Finland, France |
| Sandboxes at once | 250 on Scale; more on Enterprise | 100 on Starter, 5,000 containers on Team | No cap at these sizes; the $2,000 plan starts 90 a minute |
Every feature Battleships tracks (43)
| Feature | CodeSandbox SDK | Modal VM Sandboxes | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | Yes | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Yes | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | No | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | No | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | Yes | Yes |
| Memory fork | Yes | Yes | 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 | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | Yes | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | No | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Not published | Yes |
| Usage per sandbox (API) | No | Not published | Yes |
| Audit logs | Not published | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | No | Yes | No |
| EU data residency | No | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
In the hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB on 29 September 2026, boat did 26.69 runs per second and Modal's VM runtime did 15.54, so boat did about 1.7 times the CPU work in the same time. CodeSandbox SDK was not part of that run, so there is no comparable CPU score for it. This measures CPU speed only, not start time.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal VM Sandboxes measured on: VM Sandbox, request = size. CodeSandbox SDK 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 | CodeSandbox SDK, a month | Modal VM Sandboxes, 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 | $193 · Scale | $15 · Starter · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $341 · Scale | $178 · Starter · 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 | $2,500 · Scale | $2,229 · Starter · 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 | $815 · Scale · with limits | $792 · Team | $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,632 · Scale · with limits | $3,193 · Team · with limits | $2,000 · $2000/mo · with limits |
CodeSandbox SDK: CodeSandbox SDK sells VM credits, and each size burns a fixed number per hour, billed per started minute while the VM runs, including idle time before it hibernates. Scale adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.
Modal VM Sandboxes: Modal bills by the second for the higher of the CPU and memory you request or what you use, until the sandbox ends. Starter is free with $30 of monthly credit, Team is $250 a month with $100 of credit, and egress above the free allowance costs $0.04 per GiB.
Modal VM Sandboxes: boat charges one hourly rate per machine size, by the second, only while the sandbox runs. Plans start at $20 a month and the whole fee becomes usage credit; a stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
Modal VM Sandboxes live at most 24 hours and lose files outside a Volume, so the workday, always-on and 50-agent scenarios do not fit there even though they price low. CodeSandbox SDK's Scale plan allows 250 VMs at once, so 300 user sandboxes and 1,000 jobs at once need Enterprise, and its price for disk beyond 20 GB and for egress is not published. Modal's 1,000-job burst runs on shared CPU that is not guaranteed, and on boat even the $2,000 plan queues starts at that size.
| Scenario | CodeSandbox SDK | Modal VM Sandboxes | 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 CodeSandbox SDK when
your sandboxes sleep between visits and should wake on the next HTTP request with their memory intact, and you are fine building on what Together now calls its legacy SDK.
- Hibernation and wake on request. For sandboxes that sleep between visits: an HTTP request wakes a hibernated VM with its memory and processes intact.
- No 24-hour cutoff. For agents that keep one machine for days: a busy sandbox has no hard session cap and keeps its disk.
- Forks that share memory. For branching many runs from one warm state, such as rollouts or test variants, without booting each copy again.
Use Modal VM Sandboxes when
you run huge bursts of short jobs that finish within a day, need regions outside Europe or strict outbound rules, or already run your models on Modal.
- Huge bursts of short jobs. For many short-lived VMs at once: Team runs 5,000 containers, and Modal is now generally available.
- Regions and outbound rules. For teams that need the US or Asia-Pacific, or must limit which domains and IPs a sandbox can reach.
- One platform with inference. For teams already serving or training models on Modal: sandboxes and models sit on one account and one bill.
Where boat fits
If your agents work for hours or days on one machine, installing, building, running Docker and emulators, and checking their work in a browser, look at boat. It gives each agent a full VM that keeps its disk, has no session cap on paid plans, and did 26.69 runs per second against Modal's 15.54 in the same CPU test.
Work that survives the day
A Modal VM ends within 24 hours and its root disk goes with it, unless you write snapshot or Volume code. CodeSandbox SDK keeps a 20 GB disk but bills idle time at full rate until it hibernates. boat saves the disk every minute and stops for free.
A whole machine for the tools
Android emulators and VM-based tests need /dev/kvm. CodeSandbox SDK does not document it and has no SSH, and Modal offers it only on Team or Enterprise after you ask support. boat has SSH and /dev/kvm on every plan.
Agents, desktop and keys built in
Neither has a desktop: CodeSandbox SDK gives a headless Chromium template and Modal an Xvfb and VNC example. Both pass keys as environment variables an injected prompt can read. boat ships a 60fps desktop, coding agents and a credentials proxy.
Use boat when your agents work for hours or days in a machine they come back to: installs, builds, Docker, emulators and a desktop, on a faster VM that keeps its disk and never cuts them off. Compare it one to one: boat vs CodeSandbox SDK and boat vs Modal VM Sandboxes.
Questions people ask
Is CodeSandbox SDK cheaper than Modal VM Sandboxes?
Modal prices lower for one agent on workdays ($15 against $193) and one always-on agent ($178 against $341), but neither fits on Modal, because the VM ends within 24 hours. For 300 user sandboxes, Modal fits at $792 a month, while CodeSandbox SDK's Scale plan caps at 250. boat costs $20, $26 and $200 a month for those three.
Which is faster, CodeSandbox SDK or Modal VM Sandboxes?
Only Modal has a score in the same CPU test: 15.54 runs per second at 4 vCPU / 8 GB, against boat's 26.69. CodeSandbox SDK was not measured in that run, so we cannot compare its CPU speed.
How long can each sandbox run?
A Modal VM Sandbox runs 5 minutes by default and 24 hours at most. CodeSandbox SDK has no hard session cap and hibernates after an idle timeout of up to one day. boat has no session cap on paid plans.
Can CodeSandbox SDK and Modal VM Sandboxes run Docker and Android emulators?
Both run Docker inside the VM. Modal offers nested virtualization for emulators on Team and Enterprise after you ask support, and CodeSandbox SDK does not document it. boat exposes /dev/kvm on every plan.
Is CodeSandbox SDK still maintained?
CodeSandbox is now part of Together AI, whose docs call the CodeSandbox-based SDK deprecated and name together-sandbox as its successor. Self-serve sign-up still runs through CodeSandbox. Modal made VM Sandboxes generally available on 1 October 2026.
Is boat SOC 2 compliant?
SOC 2 is in progress. We're open about where we stand: live status at status.ascii.dev and our data retention policy at docs.boat.dev/data-retention.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs CodeSandbox SDK
- boat vs Modal VM Sandboxes
- E2B vs CodeSandbox SDK
- Daytona vs CodeSandbox SDK
- Modal vs CodeSandbox SDK
- Vercel Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs CodeSandbox SDK
- Blaxel vs CodeSandbox SDK
- Runloop vs CodeSandbox SDK
- Tensorlake vs CodeSandbox SDK
- Morph Cloud vs CodeSandbox SDK
- CodeSandbox SDK vs Northflank