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.

Self-hosting
Not offered

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.

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 workloadCodeSandbox SDK: price rankModal VM Sandboxes: price rankboat: 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 it5th 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 it186th 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 itCheapest 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 it10th 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 it18th 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 it6th 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 it7th 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 it6th 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 it71st 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 itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureCodeSandbox SDKModal VM Sandboxesboat
IsolationFirecracker microVM with its own kernelVM with its own Linux kernel on Cloud HypervisorFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
CPU benchmark (4 vCPU / 8 GB)Not measured in the same run15.54 runs/s26.69 runs/s
Longest sessionNo hard cap; hibernates after an idle timeout of up to one day24 hours (default 5 minutes)No cap on paid plans; you set the time to live
Pause and resumeHibernates with a memory snapshot; resumes with processes still runningNo paused state; a finished sandbox is gone, only Volumes and snapshots keep filesDisk saved every minute and on stop; resume boots the machine again
Wake on requestYes; an HTTP request to a host wakes a hibernated VMNoNo; a stopped sandbox is started by API
ForkFork a hibernated sandbox from its snapshot, or a running one sharing its memorySnapshot the filesystem into an image and boot new sandboxes from it; memory snapshots in alphaFork a running sandbox with its disk
Docker, systemd, rootDocker and root; built from any DockerfileDocker, systemd and root; start dockerd yourselfDocker, systemd and root in every sandbox
Nested virtualizationNot documentedTeam and Enterprise only, on requestYes, /dev/kvm on every plan
Desktop and browserNo desktop; a headless Chromium templateNot offered; an example shows how to set up Xvfb and VNC yourselfLinux desktop streamed at 60fps, Chromium and a computer-use API
Coding agents and API keysRun your own agent; secrets go in as environment variablesExamples only; secrets are environment variables, or you run a proxy in a sidecarClaude Code, Codex and others preinstalled, driven from outside by API; a credentials proxy keeps real keys out
Inbound accessHTTPS host per port, public by default; no raw TCP or public IPEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistHTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP
Outbound network rulesNo egress allowlistBlock all, IP-range allowlist, domain allowlist (beta)Open internet, no provider-side allowlist
RegionsA country hint steers scheduling, but placement is not guaranteedUS, EU and Asia-Pacific; pinning costs 1.15x to 1.75xEU only: Germany, Finland, France
Sandboxes at once250 on Scale; more on Enterprise100 on Starter, 5,000 containers on TeamNo cap at these sizes; the $2,000 plan starts 90 a minute
Every feature Battleships tracks (43)
FeatureCodeSandbox SDKModal VM Sandboxesboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoYesYes
RootYesYesYes
SystemdNot publishedYesYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHNoYesYes
Persistent diskYesYesYes
Pause/resumeYesNoYes
Automatic snapshotsYesNoYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkYesYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoYesYes
Public IPv4NoNoNo
Egress allowlistNoYesNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsNoNoYes
Agent harness APINoNoYes
MCP serverNoNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)NoNot publishedYes
Audit logsNot publishedYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAANoYesNo
EU data residencyNoYesYes
Zero data retentionNot publishedNot publishedYes

Performance

CodeSandbox SDKNot measured
Modal VM Sandboxes15.54 runs/s
boat26.69 runs/s

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.

ScenarioCodeSandbox SDK, a monthModal VM Sandboxes, a monthboat, 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.

ScenarioCodeSandbox SDKModal VM Sandboxesboat
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
One agent that never stops
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
50 agents in parallel
  • egress price not published
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
Sandboxes for your users
  • Scale: max 250 concurrent
  • egress price not published
None that biteNone that bite
1,000 short jobs at once
  • Scale: max 250 concurrent
  • egress price not published
  • shared vCPUs on this tier (Modal (VM Sandboxes) sells dedicated cores separately as “VM Sandbox, request = size”): heavy, sustained CPU use can be slowed by other tenants
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

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