Vercel Sandbox vs CodeSandbox SDK

Both run each sandbox in a Firecracker microVM with its own kernel. Vercel Sandbox is built for short runs of untrusted code in 19 regions, with sessions that stop after 24 hours, while CodeSandbox SDK keeps VMs that hibernate with their memory and wake on the next request.

The companies and products

Vercel Sandbox

Vercel is a cloud platform for web apps and agents, and Vercel Sandbox is its product for running untrusted or agent-written code in isolated Linux microVMs.

Each sandbox is a Firecracker microVM with its own kernel, started from a Vercel image, your own OCI image, or a saved snapshot. You drive it with the JavaScript or Python SDK or the sandbox CLI: run commands, move files, open ports, and set network rules. It is aimed at code interpreters, app builders, test runs and agent tools, and Vercel's docs say it is not meant to run nonstop.

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

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. “22nd cheapest of 345” means 21 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 workloadVercel Sandbox: price rankCodeSandbox SDK: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
244th of 367, with limits
$3,351 a month
178th of 367, with limits
$1,939 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An agent that never stops fits CodeSandbox SDK better than Vercel, whose sessions end at 24 hours; boat runs with no session cap and keeps its disk.
257th of 366, with limits
$3,657 a month
215th of 366, with limits
$2,478 a month
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
Both fit short code bursts; Vercel bills CPU only while code uses it, and CodeSandbox SDK wakes hibernated VMs with their memory on the next request.
22nd cheapest of 345
$216 a month
46th cheapest of 345
$642 a month
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
Vercel ranks 15th here and fits 300 sandboxes at once, while CodeSandbox SDK's Scale plan stops at 250 VMs; boat ranks first on cost for the same work.
15th cheapest of 361
$1,267 a month
140th of 361, with limits
$1,707 a month
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
Vercel ranks 3rd thanks to high concurrency and fast starts; CodeSandbox SDK's memory forks help, but its 250 VM cap on Scale holds it back.
3rd cheapest of 360
$15,761 a month
348th of 360, with limits
$3,861 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
69th cheapest of 364
$1,508 a month
64th cheapest of 364
$1,335 a month
10th cheapest of 364
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
Both run Docker for CI, but jobs that build Android apps or VM images need /dev/kvm, which boat has and neither of the other two offers.
107th cheapest of 377
$1,144 a month
92nd cheapest of 377
$860 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Vercel restarts a dev box every 24 hours, and CodeSandbox SDK bills idle time until it hibernates; boat stays up all day and costs nothing when stopped.
276th of 368, with limits
$145 a month
310th of 368, with limits
$240 a month
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
Neither Vercel Sandbox nor CodeSandbox SDK has a desktop, so a computer-use agent needs one built by hand; boat streams a 60fps desktop with a computer-use API.
235th of 369, with limits
$952 a month
206th of 369, with limits
$691 a month
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
Vercel has no browser feature and CodeSandbox SDK offers a headless Chromium template; boat ships Chromium on a full desktop with browser control.
259th of 367, with limits
$486 a month
251st of 367, with limits
$443 a month
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
277th of 346, with limits
$468 a month
281st of 346, with limits
$508 a month
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
234th of 338, with limits
$9,960 a month
193rd of 338, with limits
$7,390 a month
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
283rd of 360, with limits
$554 a month
240th of 360, with limits
$326 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

FeatureVercel SandboxCodeSandbox SDKboat
IsolationFirecracker microVM with its own kernelFirecracker microVM with its own kernelFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Longest session24 hours on Pro and Enterprise, 45 minutes on HobbyNo hard cap; hibernates after an idle timeout of up to one dayNo cap on paid plans; you set the time to live
Pause and resumeFilesystem snapshot on stop; a new session boots from it and processes start overHibernates with a memory snapshot; resumes with processes still runningDisk saved every minute and on stop; resume boots the machine again; a stopped sandbox costs nothing
Wake on requestNoYes; an HTTP request to a host wakes a hibernated VMNo; a stopped sandbox is started by API
ForkFork from a filesystem snapshot or a running sandbox; no memory forkFork a hibernated sandbox from its memory snapshot, or a running one sharing its memoryFork a running sandbox with its disk
Biggest machine8 vCPU / 16 GB on Pro, 32 vCPU / 64 GB on Enterprise16 cores / 32 GB on Scale, 64 cores / 128 GB on EnterpriseUp to 16 vCPU / 32 GB on the $100 plan and above
Regions19 regions across the US, Europe, Asia, South America, Africa and AustraliaA country hint steers scheduling, but placement is not guaranteedEU only: Germany, Finland, France
Egress rulesAllow-all, deny-all or a domain and CIDR allowlist, changeable while runningNo provider-side allowlist documentedNo provider-side allowlist; firewall inside the VM
Docker insideYes, with sudo; images from your own DockerfileYes, with root; built from any DockerfileYes, with root and systemd; named snapshots as templates, no Dockerfile builds
Nested virtualizationNoNot documentedYes, /dev/kvm for Android emulators and VMs
Inbound accessPublic URLs for up to 15 ports, no built-in auth; no raw TCP or public IPHTTPS host per port, public by default, signed tokens for private hosts; no raw TCP or public IPHTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv6 or IPv4
Desktop and browserNone; headless Linux onlyNo desktop; a headless Chromium template60fps desktop with Chromium, computer-use and browser-control APIs
Coding agentsClaude Code, Codex, OpenCode and pi preinstalled; you start them as commandsRun your own agent through the command APIClaude Code, Codex and others preinstalled, with an API to prompt, steer and stream events
Keeping API keys out of the sandboxCredentials brokering injects headers for any HTTPS domain you allowSecrets passed in as environment variablesCredentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Every feature Battleships tracks (43)
FeatureVercel SandboxCodeSandbox SDKboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHNoNoYes
Persistent diskYesYesYes
Pause/resumeYesYesYes
Automatic snapshotsYesYesYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkNoYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopNoYesNo
Wake on requestNoYesNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistYesNoNo
Secret proxyYesNoYes
Secret proxy for any APIYesNoYes
Preinstalled agentsYesNoYes
Agent harness APINoNoYes
MCP serverYesNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsYesNot publishedYes
Usage per sandbox (API)NoNoYes
Audit logsNot publishedNot publishedNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesNoNo
EU data residencyYesNoYes
Zero data retentionNot publishedNot publishedYes

Performance

Vercel Sandbox12.96 runs/s
CodeSandbox SDKNot measured
boat26.69 runs/s

On the StarSling hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB, Vercel Sandbox did 12.96 runs per second and boat did 26.69, so boat finished about twice as many runs in the same time. CodeSandbox SDK has no comparable CPU measurement, so we cannot say how it compares on speed.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. 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.

ScenarioVercel Sandbox, a monthCodeSandbox SDK, 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
$57 · Pro$193 · Scale$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$236 · Pro · with limits$341 · Scale$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,884 · Pro$2,500 · Scale$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
$828 · Pro$815 · Scale · with limits$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
$3,152 · Pro$1,632 · Scale · with limits$2,000 · $2000/mo · with limits

Vercel Sandbox: Vercel charges for CPU only while your code uses it, but charges for memory for the whole time the sandbox runs, plus a small fee per sandbox created and a monthly fee per GB of snapshots. The $20 Pro credit is shared with your other Vercel usage.

CodeSandbox SDK: You buy 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. The Scale plan adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.

CodeSandbox SDK: boat charges a flat price per size, per second, only while the machine runs, and a stopped sandbox costs nothing. Plans start at $20 a month, and all of the fee is usage credit.

Limits in those scenarios

For one agent that never stops, Vercel ends each session at 24 hours and running processes start over, while CodeSandbox SDK keeps going. CodeSandbox SDK's Scale plan allows 250 VMs at once, so 300 user sandboxes and 1,000 short jobs do not fit it without Enterprise, and its price for disk beyond 20 GiB and for egress is not published. boat fits every scenario but the 1,000-job burst, where even the $2,000 plan queues starts.

ScenarioVercel SandboxCodeSandbox SDKboat
One coding agent, workdaysNone that bite
  • disk beyond 20 GiB: price unknown
  • egress price not published
None that bite
One agent that never stops
  • Pro: sessions capped at 24 h
  • disk beyond 20 GiB: price unknown
  • egress price not published
None that bite
50 agents in parallelNone that bite
  • egress price not published
None that bite
Sandboxes for your usersNone that bite
  • Scale: max 250 concurrent
  • egress price not published
None that bite
1,000 short jobs at onceNone that bite
  • Scale: max 250 concurrent
  • egress price not published
  • 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 Vercel Sandbox when

you run many short bursts of untrusted code, want egress rules you change from outside, or need to run close to users outside Europe.

  • Regions all over the world. Useful if your users are spread out: Vercel Sandbox runs in 19 regions, while CodeSandbox SDK only takes a placement hint.
  • A firewall you control from outside. A running sandbox can be switched to deny-all, or to a list of allowed domains, without a restart.
  • Room for big bursts. Useful for thousands of short jobs: Pro allows far more sandboxes at once than CodeSandbox SDK's 250 VM cap on Scale.

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 with memory and wake on request. Useful for sandboxes that sleep between visits: an HTTP request wakes a hibernated VM with its processes still running.
  • Forks that share memory. Good for branching many runs from one warm state, such as rollouts or test variants.
  • No 24-hour session cap. Useful for agents that keep working: a busy VM keeps running, where Vercel stops every session after 24 hours.

Where boat fits

Both Vercel Sandbox and CodeSandbox SDK are headless code boxes you drive through an SDK. If your agents work for hours on one machine, with builds, Docker, emulators, a browser and servers other people reach, boat gives each one a full VM with the agent and its keys already set up.

A whole machine with SSH and KVM

Neither offers SSH, and Vercel has no nested virtualization while CodeSandbox SDK does not document it. Android emulator builds and VM-based tests cannot start, and every tool goes through an SDK call instead of a shell.

A desktop and a browser built in

Neither has a desktop, so an agent cannot open the web app it built to see if it works. On Vercel you build the desktop yourself; on CodeSandbox SDK you start from a headless Chromium template and add the rest.

Drive the agents inside from outside

Vercel installs coding agents but you run them as plain commands, and on CodeSandbox SDK you bring your own. Either way you write the code that prompts, steers and reads every agent; boat gives you one API for that.

Use boat when your agents work for hours on one machine: builds, Docker, emulators, a desktop with a browser and servers other people reach, with an API to drive the agents inside from outside. Compare it one to one: boat vs Vercel Sandbox and boat vs CodeSandbox SDK.

Questions people ask

Is Vercel Sandbox cheaper than CodeSandbox SDK?

It depends on the job. One workday agent costs $57 on Vercel vs $193 on CodeSandbox SDK, but 50 parallel agents cost $2,884 vs $2,500. For 1,000 short jobs at once Vercel fits at $3,152 a month, while CodeSandbox SDK's Scale plan caps at 250 VMs.

Which is faster, Vercel Sandbox or CodeSandbox SDK?

Vercel Sandbox did 12.96 runs per second on the hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB. CodeSandbox SDK was not part of that run, so there is no fair speed comparison. boat did 26.69 on the same test.

Can either one run 24/7?

Vercel Sandbox cannot as one session: Pro and Enterprise sessions stop at 24 hours, and its docs say sandboxes are not designed to run continuously. CodeSandbox SDK has no hard session cap, so a busy VM keeps running and only hibernates when idle.

Can Vercel Sandbox and CodeSandbox SDK run Docker?

Yes, both run Docker inside the sandbox and can boot from your own Dockerfile. Neither offers /dev/kvm for Android emulators or nested VMs, which boat does.

Is CodeSandbox SDK still maintained?

CodeSandbox is now part of Together AI. Together's docs call the CodeSandbox-based SDK deprecated and name together-sandbox as its successor, while self-serve sign-up still runs through CodeSandbox.

Where do they run?

Vercel Sandbox runs in 19 regions, with iad1 in the US as the default. CodeSandbox SDK takes a country hint that can steer a sandbox to a cluster in Europe, but placement is not guaranteed. boat runs only in the EU.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons