CodeSandbox SDK vs Modal VM Sandboxes

Both give each sandbox its own Linux kernel, with Docker and root. CodeSandbox SDK runs Firecracker VMs that hibernate with their memory and wake on the next request. Modal VM Sandboxes run up to 24 hours each and carry work forward through filesystem snapshots, 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 call it the deprecated 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. It suits teams that want many 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. “32nd cheapest of 365” means 31 of the other 364 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. CodeSandbox SDK keeps a 20 GB disk through hibernation. A Modal VM ends within 24 hours; you snapshot its filesystem and boot a new sandbox from it, or keep files in a Volume, and each VM has a 512 GiB root filesystem. boat saves its disk at each stop with no code and has a built-in desktop to check the app.
32nd cheapest of 365
$3,731 a month
27th cheapest of 365
$633 a month
5th cheapest of 365
$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. A Modal VM stops at 24 hours, so you snapshot the filesystem and boot a new sandbox each day; running programs start again. On boat, turn auto-stop off on a paid plan (default 1 hour).
50th cheapest of 361
$4,811 a month
Not ranked: misses a requirement6th cheapest of 361
$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: its VMs hibernate with their memory and wake on the next request. Modal bills per second on the larger of request and use, and Team runs up to 5,000 containers at once.
54th cheapest of 336
$642 a month
Not ranked: misses a requirement189th of 336, 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. Modal fits 300 at once on Team; you snapshot each user's filesystem and boot from it when the user comes back. boat keeps each user's disk while stopped for at least 14 days, and each start counts against the plan's start cap.
140th of 349, with limits
$1,707 a month
Not ranked: misses a requirement3rd cheapest of 349
$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, with no per-start fee; its memory snapshots are in alpha. boat caps starts per plan, which slows big bursts.
341st of 349, with limits
$3,861 a month
163rd of 349, with limits
$11,982 a month
39th of 349, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
77th cheapest of 359
$1,335 a month
Not ranked: misses a requirement10th cheapest of 359
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
Both run Docker builds in a VM. CI that builds Android apps needs /dev/kvm: boat exposes it on every plan, Modal offers it on Enterprise only as an experimental option, and CodeSandbox SDK does not document it.
96th cheapest of 374
$860 a month
170th of 374, with limits
$655 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
316th of 371, with limits
$240 a month
Not ranked: misses a requirement19th cheapest of 371
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Neither has a built-in desktop. On CodeSandbox SDK you add a VNC desktop to your own Dockerfile. Modal's runnable example installs Xvfb, x11vnc, noVNC, Chromium and a Browser Use agent. boat streams a 60 fps desktop with Chrome, built in.
54th cheapest of 367
$1,236 a month
Not ranked: misses a requirement7th cheapest of 367
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
125th of 356, with limits
$741 a month
Not ranked: misses a requirement7th cheapest of 356
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
119th cheapest of 343
$871 a month
Not ranked: misses a requirement6th cheapest of 343
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
194th of 327, with limits
$7,390 a month
Not ranked: misses a requirement73rd of 327, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
Both fit many parallel attack runs. Modal starts many VMs from one filesystem snapshot. CodeSandbox SDK forks from memory. boat gives each run a full VM with a browser and agents installed, but caps starts per plan.
29th cheapest of 351
$505 a month
27th cheapest of 351
$464 a month
3rd cheapest of 351
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement

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 hosts dedicated to boat (AMD Ryzen 7 9700X and Ryzen 9 9950X); vCPUs are shared
CPU benchmark (V8 Web Tooling, 4 vCPU / 8 GB, StarSling run of 3 October 2026)Not in this runVM runtime 15.48 runs/s, gVisor 12.60, both rank 7 of 15 (shared); measured with cpu=428.06 runs/s, rank 2 of 15 (shared), on a Ryzen 9 9950X host
Longest sessionNo hard cap; hibernates after an idle timeout (30 minutes by default on paid plans, up to 1 day) and bills until then24 hours (default 5 minutes); continue in a new sandbox from a filesystem snapshotAuto-stop defaults to 1 hour; set up to 30 days, or turn it off on a paid plan for no session cap
Pause and resumeHibernates with a memory snapshot and resumes with processes running in about 0.5 to 2 sNo paused state; snapshot_filesystem() before the end, then boot a new sandbox from it (kept 30 days by default, or with no expiry), or keep files in a VolumeDisk saved every minute and at each stop with no code, kept at least 14 days; memory is not saved, so a resume is like a reboot
Wake on requestYes; an HTTP request to a host wakes a hibernated VMNoNo; you start a stopped sandbox by API
ForkFork a hibernated sandbox from its memory snapshot, or a running one that shares memory with its parentSnapshot the filesystem into an image and boot any number of new sandboxes from it; memory snapshots in alphaFork a running sandbox from its last 1-minute disk snapshot; memory is not copied
Disk20 GB on every size; more on request, price not publishedFixed 512 GiB root filesystem51 GB to 251 GB, fixed per size
Docker, systemd, rootDocker and root; templates build from any DockerfileDocker, systemd and root; you start dockerd yourselfDocker, systemd and root in every sandbox; you cannot boot your own Docker image
Nested virtualizationNot documentedEnterprise plan only, as an experimental optionYes, /dev/kvm on every sandbox
Desktop and browserNo built-in desktop; a headless Chromium template, and you can install a VNC desktop in your own DockerfileNot built in; Modal's runnable example installs Xvfb, x11vnc, noVNC, Chromium and a Browser Use agentBuilt-in desktop and Chrome streamed at 1920x1080, 60 fps, with computer-use tools; no GPU
Coding agents and API keysYou install your own agent; secrets go in as environment variablesYou install the harness in the image, with official examples; a credential-injecting proxy in a Sidecar (experimental), from an official exampleSeven harnesses installed, driven by API; optional credentials proxy ($1 a day while on, plus $1 per 1,000 requests) keeps real keys of supported providers outside
Inbound accessHTTPS host per port, public by default, signed tokens for private sandboxes; raw TCP is not documentedEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistUp to 50 HTTPS URLs, token-gated by default; raw ports on the public IPv6 address (some sandboxes also have IPv4)
Outbound network rulesNo egress allowlist documentedBlock 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 plus narrower regions; pinning costs 1.15x to 1.75xGermany, Finland and France; you cannot pick a region; no US or Asia region
Sandboxes at once250 on Scale; more on Enterprise100 containers on Starter, 5,000 on Team; no per-start fee100 on $20 up to 2,000 on $2,000; the $2,000 plan includes 90 starts a minute and refuses starts above 270 a minute
Every feature Battleships tracks (43)
FeatureCodeSandbox SDKModal VM Sandboxesboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNo documented wayYesYes
RootYesYesYes
SystemdNot publishedYesYes
Desktop GUIWith your own setupWith your own setupYes
BrowserWith your own setupWith your own setupYes
Computer-use APINo documented wayWith your own setupYes
SSHNo documented wayWith your own setupYes
Persistent diskYesWith your own setupYes
Pause/resumeYesNo documented wayYes
Automatic snapshotsYesNo documented wayYes
Fork/cloneYesYesYes
Live fork (no pause)YesNot publishedYes
Memory forkYesYesNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo documented way
Wake on requestYesNo documented wayNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundNo documented wayYesYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistNo documented wayYesNo documented way
Secret proxyNo documented wayWith your own setupYes
Secret proxy for any APINo documented wayNo documented wayYes
Preinstalled agentsNo documented wayWith your own setupYes
Agent harness APINo documented wayNo documented wayYes
MCP serverNo documented wayNo documented wayNo documented way
GPUNo documented wayNo documented wayNo documented way
WindowsNo documented wayNo documented wayNo documented way
Arm64No documented wayNo documented wayNo documented way
Self-hostingNo documented wayNo documented wayNo documented way
BYOCNo documented wayNo documented wayNo documented way
Open sourceNo documented wayNo documented wayNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)No documented wayNot publishedYes
Audit logsNot publishedYesNo documented way
SSOYesYesNo documented way
SOC 2YesYesNo documented way
HIPAANo documented wayYesNo documented way
EU data residencyNo documented wayYesNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

CodeSandbox SDKNot measured
Modal VM Sandboxes15.48 runs/s
boat28.06 runs/s

In StarSling's run of 3 October 2026 (run 37073680030), on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, boat did 28.06 runs/s, second of 15. Modal's VM runtime did 15.48 and its gVisor runtime 12.60, both rank 7 (shared). That is about 1.8x the VM runtime. StarSling ran Modal with cpu=4 and the sandbox saw 4 CPUs (PR #121); sized that way, Modal bills 4 cores, $0.76/h. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. Providers ran on different hardware in different regions. CodeSandbox SDK was not in this run, so we cannot compare its CPU speed. For start time, ComputeSDK measured CodeSandbox SDK at its default size: 11.76 s median with 100 starts at once (6 November 2026). ComputeSDK has no Modal VM row, and boat is not in ComputeSDK.

V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Modal VM Sandboxes measured on: VM Sandbox, request = size. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. CodeSandbox SDK is not in the public benchmarks we use, so we cannot say which is faster.

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. Start limits, per-start fees and plan minimums are in the price, boat's included.

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$0 · Starter$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$341 · Scale$109 · 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$1,480 · Starter$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$579 · 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$1,911 · Team · with limits$8,800 · $2000/mo · with limits

CodeSandbox SDK: You buy VM credits at $0.01486 each, and each size burns a fixed number per hour: 20 for a 4 vCPU / 8 GB VM, about $0.30. Billing is per started minute while the VM runs, including idle time before it hibernates. A hibernated VM has no VM charge. Larger teams pay a $170 monthly Scale platform fee, which is not usage credit. Prices as checked on 28 September 2026; CodeSandbox's pricing pages blocked our automated check on 8 November 2026.

Modal VM Sandboxes: Modal bills per second for the larger of the CPU and memory you request and what you use, until the sandbox ends. It prices CPU per physical core, and one core equals two vCPUs: a 4 vCPU / 8 GiB sandbox is 2 cores + 8 GiB, $0.476 an hour when the request equals the size. Starter is $0 with $30 of credit a month, and Team is $250 a month with $100 of credit. Egress above the plan allowance costs $0.04 per GiB. Our scenario bills use a minimal request that bursts to the workload size; that burst CPU is shared and not guaranteed.

Modal VM Sandboxes: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. The $20 plan includes 200 starts a day; each extra start costs $0.03 to $0.07. A stopped sandbox has no compute charge and keeps its disk for at least 14 days. Saved snapshots above the included count and the credentials proxy, while it is on, still charge.

Limits in those scenarios

A Modal VM Sandbox runs 24 hours at most, so the always-on scenario needs a filesystem snapshot and a new sandbox each day and is marked as not fitting as-is. Modal's 1,000-job burst runs on shared burst CPU that is not guaranteed. 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. On boat, the $2,000 plan includes 90 starts a minute and 2,400 a day, extra starts are paid, and starts above 270 a minute fail with 429, so the 1,000-job burst does not fit. boat never queues a start, has no US or Asia region and no GPU.

ScenarioCodeSandbox SDKModal VM Sandboxesboat
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
None for this scenarioNone for this scenario
One agent that never stops
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • Starter: sessions capped at 24 h
None for this scenario
50 agents in parallel
  • egress price not published
None for this scenarioNone for this scenario
Sandboxes for your users
  • Scale: max 250 concurrent
  • egress price not published
None for this scenarioNone for this scenario
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
  • 2,400 starts/day included, paid above that (needs ~6,667)
  • 600 starts/hour included, paid above that (needs ~1,000)
  • starts above 90/min are paid, and starts above 270/min fail with 429

Which one should you use?

Use CodeSandbox SDK when

your sandboxes sleep between visits and wake on the next HTTP request with their memory intact, or run for days without a cutoff, and you accept that Together calls this SDK deprecated.

  • 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 a large disk, 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 with no per-start fee, and a filesystem snapshot boots any number of copies.
  • 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 and compliance. For teams already serving or training models on Modal: sandboxes and models sit on one account, with a compliance report on every plan.

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. Each agent gets a full VM that saves its disk with no code. Turn auto-stop off on a paid plan (default 1 hour) for no session cap. In StarSling's run of 3 October 2026, boat did 28.06 runs/s against 15.48 on Modal's VM runtime.

Work that survives the day

A Modal VM ends within 24 hours; your code snapshots the filesystem and boots a new sandbox, or keeps files in a Volume. CodeSandbox SDK keeps a 20 GB disk but bills idle time at full rate until it hibernates. boat saves the disk every minute and at each stop. A boat resume is like a reboot, and a stopped sandbox keeps its disk for at least 14 days.

A whole machine for the tools

Android emulators and VM-based tests need /dev/kvm. CodeSandbox SDK does not document it or SSH, and Modal offers it on Enterprise only, as an experimental option. boat has SSH and /dev/kvm on every plan.

Agents, desktop and keys set up

Neither has a built-in desktop: CodeSandbox SDK gives a headless Chromium template, and Modal a runnable Xvfb and VNC example. Modal's key proxy is an experimental Sidecar you run. boat installs a 60 fps desktop and seven coding agents. Its optional paid credentials proxy keeps model keys outside.

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 VM that saves its disk with no code and has no session cap once auto-stop is off. Compare it one to one: boat vs CodeSandbox SDK and boat vs Modal VM Sandboxes.

boat's own limits
  • Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
  • Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
  • A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
  • Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
  • boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
  • Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
  • Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
  • Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source

Questions people ask

Is CodeSandbox SDK cheaper than Modal VM Sandboxes?

Usually not. One agent on workdays costs $0 on Modal inside Starter's $30 monthly credit, against $193 on CodeSandbox SDK; Modal keeps files between days only through a snapshot or a Volume. One always-on agent costs $109 on Modal against $341, but Modal needs a new sandbox every 24 hours. 50 agents in parallel cost $1,480 on Modal against $2,500. For 300 user sandboxes, Modal fits at $579 a month, while CodeSandbox SDK's Scale plan caps at 250. boat costs $20, $26, $317 and $200 for those four.

Which is faster, CodeSandbox SDK or Modal VM Sandboxes?

Only Modal is in the CPU benchmark we use. In StarSling's run of 3 October 2026, Modal's VM runtime did 15.48 runs/s at 4 vCPU / 8 GB and boat 28.06, on an AMD Ryzen 9 9950X host. CodeSandbox SDK was not 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; Modal recommends a filesystem snapshot and a new sandbox for longer work. CodeSandbox SDK has no hard session cap and hibernates after an idle timeout of up to one day. boat stops after 1 hour by default; on a paid plan you can turn auto-stop off for no session cap.

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 the Enterprise plan only, as an experimental option. 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. Together's docs call this SDK deprecated and name together-sandbox as its successor. The last SDK release was 2.4.2 in December 2025. Modal made VM Sandboxes generally available on 1 October 2026.

Is boat SOC 2 compliant?

Not yet. SOC 2 is in progress, and there is no SOC 2 report today. Modal has SOC 2 on every plan, and CodeSandbox lists SOC 2 Type II on its Enterprise plan. Live status is 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