GitHub Codespaces vs Modal VM Sandboxes

GitHub Codespaces gives a developer a ready VS Code environment for a GitHub repository, kept between stops but cut off after 12 hours. Modal VM Sandboxes give your code short-lived VMs with their own kernel, made to start in huge numbers and gone within 24 hours.

The companies and products

GitHub Codespaces

GitHub Codespaces is GitHub's cloud development environment: a ready-to-code Linux machine for a repository, opened in the browser, VS Code or the GitHub CLI.

Codespaces is a different kind of product from boat: a dev environment for people working on a GitHub repository, not a sandbox API for agents. Each codespace is a Docker container built from the repo's dev container config, running on its own newly built VM on Azure, with 2 to 32 cores. It is built for developers and teams who want every contributor to start from the same setup, with prebuilds, port forwarding and GitHub billing.

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. “274th cheapest of 367” means 273 of the other 366 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 workloadGitHub Codespaces: 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 are compromises here: a codespace stops at 12 hours and documents no /dev/kvm, and a Modal VM ends within 24 hours and loses files outside a Volume, while boat keeps its disk and adds a desktop.
274th of 367, with limits
$4,618 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 always-on assistant fits neither without restarts, since codespaces stop after 12 hours at most and Modal VM Sandboxes after 24, while boat has no session cap on paid plans.
309th of 366, with limits
$6,970 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 Modal's fast starts and per-second billing better than a codespace, which builds a dev container on a new VM each time.
288th of 345, with limits
$619 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
Modal Team runs up to 5,000 containers at once, while GitHub does not publish how many codespaces can run at once, so 300 user sandboxes are not confirmed there.
281st of 361, with limits
$1,964 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
Huge bursts of short rollouts are what Modal is built for and not what Codespaces is for, and boat's per-plan start limits queue large bursts.
282nd of 360, with limits
$9,489 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
295th of 364, with limits
$1,519 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
All three run Docker builds; /dev/kvm for Android emulators is not documented on Codespaces, is on request on Modal Team and Enterprise, and is on every boat plan.
314th of 377, with limits
$909 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
Codespaces is the closer fit for a human dev box, with VS Code per repo and a disk kept across stops, but it stops after 12 hours, while boat keeps running.
130th of 368, with limits
$270 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
Neither ships a desktop: a codespace has an editor and a terminal, Modal shows how to set up Xvfb and VNC yourself, and boat streams a 60fps desktop with Chromium.
267th of 369, with limits
$1,367 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
275th of 367, with limits
$678 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
310th of 346, with limits
$922 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
280th of 338, with limits
$18,637 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
267th of 360, with limits
$445 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

FeatureGitHub CodespacesModal VM Sandboxesboat
IsolationA Docker container on its own newly built VM, with its own virtual networkA VM with its own Linux kernel on Cloud HypervisorA full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
How you use itOpened from a repo, branch or pull request in VS Code, the browser, JupyterLab or the GitHub CLICreated from Python, TypeScript or Go code with runtime="vm"API and SDK to create, fork, stop and run commands, plus a desktop stream
Longest session12 hours at most, even while in use; stops after 30 idle minutes by default24 hours at most; default timeout 5 minutesNo cap on paid plans; you set the time to live
Files after a stopKept, with storage billed; stopped codespaces are deleted after 30 days by defaultNo paused state; only Volumes and snapshots keep files once a sandbox endsDisk saved every minute and on stop; a stopped sandbox keeps it and costs nothing
Docker, root, systemdDocker and sudo inside the dev containerDocker, systemd and root; you start dockerd yourselfDocker, root and systemd in every sandbox
Nested virtualization/dev/kvm is not documentedTeam and Enterprise plans only, on request/dev/kvm on every plan
Copies and snapshotsNo copy or snapshot endpoint; new codespaces start from a repo or a prebuildFilesystem snapshots boot any number of copies; memory snapshots in alphaFork a running sandbox with its disk; named snapshots as templates; no memory snapshots
Desktop and computer useEditor and terminal; no graphical desktopNot offered; an example shows how to set up Xvfb and VNC yourself60fps desktop, Chromium and a computer-use API built in
Coding agents and API keysGitHub Copilot as a VS Code extension; secrets copied in as environment variablesExamples only; secrets are environment variables, or you run your own proxy in a sidecarClaude Code, Codex and others preinstalled with a prompt, steer and events API; real keys stay outside through the credentials proxy
Reaching the machineA URL per forwarded port, plus SSH and CLI tunnels; no 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 rulesOpen internet; GitHub says there is no way to restrict itBlock all, IP-range allowlist, domain allowlist (beta)Open internet, no provider-side allowlist
CPU benchmark (4 vCPU / 8 GB)Not measured15.54 runs/s26.69 runs/s
RegionsUS East, US West, Europe West and Southeast Asia, same price in eachUS, EU and Asia-Pacific plus narrower regions; pinning costs 1.15x to 1.75xEU only: Germany, Finland, France
GPUsNoneNone on the VM runtime; GPU sandboxes need gVisorNone
Every feature Battleships tracks (43)
FeatureGitHub CodespacesModal VM Sandboxesboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoYesYes
RootYesYesYes
SystemdNot publishedYesYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeYesNoYes
Automatic snapshotsNoNoYes
Fork/cloneNoYesYes
Live fork (no pause)NoYesYes
Memory forkNoYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsNoYesYes
Idle auto-stopYesYesNo
Wake on requestNoNoNo
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 limitsYesNot publishedYes
Usage per sandbox (API)NoNot publishedYes
Audit logsYesYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAANoYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

GitHub CodespacesNot measured
Modal VM Sandboxes15.54 runs/s
boat26.69 runs/s

There is no comparable measurement for GitHub Codespaces: it was not in the public benchmark runs we use. In StarSling's run of 29 September 2026 at 4 vCPU / 8 GB, Modal's VM runtime did 15.54 Node.js build-and-test runs per second and boat did 26.69, about 1.7 times the CPU work in the same time, on dedicated AMD Ryzen 9 9950X hosts.

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. GitHub Codespaces 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.

ScenarioGitHub Codespaces, 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
$51 · Personal account: GitHub Free$15 · Starter · with limits$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$270 · Personal account: GitHub Free · with limits$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
$3,019 · Personal account: GitHub Free$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
$850 · Personal account: GitHub Free · 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,889 · Personal account: GitHub Free · with limits$3,193 · Team · with limits$2,000 · $2000/mo · with limits

GitHub Codespaces: Codespaces bills $0.09 per core-hour while a codespace is active, plus $0.07 per GB-month of storage while it exists, stopped too. There is no 4-core machine with 8 GB, so 4 vCPU / 8 GB jobs are priced on the 4-core 16 GB machine; personal accounts get a free monthly quota and organizations do not.

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 pinning a region multiplies the price by 1.15x to 1.75x.

Modal VM Sandboxes: boat plans start at $20 a month and the whole fee becomes usage credit, spent by the second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Every codespace stops after 12 hours at most, so it does not fit the always-on scenario, and GitHub does not publish how many codespaces can run at once, so 300 user sandboxes and 1,000 short jobs are not confirmed. A Modal VM Sandbox lives at most 24 hours and its root disk is gone when it ends, so the workday, always-on and 50-agent scenarios keep only files in a Volume or a snapshot, and the 1,000-job burst runs on shared CPU above its small request. On boat the limit that bites is start speed: even the $2,000 plan starts 90 sandboxes a minute, so 1,000 jobs at once queue and exceed the daily start limit.

ScenarioGitHub CodespacesModal VM Sandboxesboat
One coding agent, workdaysNone that bite
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
One agent that never stops
  • Personal account: GitHub Free: sessions capped at 12 h
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
50 agents in parallel
  • how many machines can run at once: limit not published, probably fine at 50 (the typical published limit is 50)
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
Sandboxes for your users
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None that biteNone that bite
1,000 short jobs at once
  • not confirmed: how many machines can run at once (you need 1,000; the typical published limit is 50)
  • 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 GitHub Codespaces when

your developers want a ready VS Code environment for a GitHub repository, opened from a branch or pull request, that keeps their files between work sessions.

  • Built into GitHub. Useful if your team lives on GitHub: open a codespace from any repo, branch or pull request, with the dev container set up.
  • A disk that survives stops. Useful for people who come back each day: a stopped codespace keeps its files and installed packages until you restart it.
  • Free hours for personal accounts. Useful for occasional personal work: a GitHub Free account includes 120 core-hours and 15 GB-month of storage each month.

Use Modal VM Sandboxes when

your code launches huge bursts of short jobs that finish within a day, needs strict outbound rules or regions outside Europe, or already runs models on Modal.

  • Very large bursts. Useful for huge bursts of short jobs: Modal runs 5,000 containers at once on Team, with fast starts and per-second billing.
  • Outbound rules and regions. Useful when agents must reach only chosen hosts: block all outbound traffic or allow set domains, in the US, EU or Asia-Pacific.
  • One platform with inference and training. Useful if you already serve or train models on Modal: sandboxes and models sit on one account and one bill.

Where boat fits

If what you are really running is coding agents that work for hours or days, both fall short in the same places: they cut sessions off, ship no desktop and leave the agent setup to you. boat gives each agent a full VM that keeps running, keeps its disk and comes with agents and a desktop ready.

Sessions that do not end

A codespace stops at 12 hours even while in use, and a Modal VM ends within 24 hours and loses its root disk. Either way you write restart or snapshot code. boat has no session cap on paid plans and saves its disk every minute.

/dev/kvm, a desktop and open ports

Codespaces documents no /dev/kvm and no desktop. Modal gives /dev/kvm only on Team and Enterprise after you ask, and you install Xvfb and VNC yourself. boat has /dev/kvm, a 60fps desktop and HTTPS on 50 ports on every plan.

Agents driven from outside, keys kept out

On both, secrets sit in environment variables any code the agent runs can read, and you script each agent yourself; Modal's fix is a proxy you run in a sidecar. boat preinstalls the agents and keeps real keys outside.

Use boat when your agents work for hours or days in a machine they come back to: a full VM with /dev/kvm, a desktop and open ports, built-in coding agents with keys kept outside, a disk saved every minute and no session cap on paid plans. Compare it one to one: boat vs GitHub Codespaces and boat vs Modal VM Sandboxes.

Questions people ask

Is GitHub Codespaces cheaper than Modal VM Sandboxes?

Mostly no. One agent running all month is $270 on Codespaces against $178 on Modal, 50 agents in parallel $3,019 against $2,229, and 300 user sandboxes $850 against $792; for 1,000 short jobs Codespaces is cheaper at $1,889 against $3,193. boat comes to $26, $317 and $200 for the first three.

Which is faster, GitHub Codespaces or Modal VM Sandboxes?

We have no comparable CPU measurement for Codespaces. On the same benchmark at 4 vCPU / 8 GB, Modal's VM runtime did 15.54 runs per second and boat did 26.69.

How long can each one run?

A codespace stops after 12 hours at most, even while in use, and after 30 idle minutes by default, but keeps its files. A Modal VM Sandbox defaults to 5 minutes and lasts 24 hours at most, and its root disk is gone when it ends. boat has no session cap on paid plans.

Can I run Docker and Android emulators in each?

Both run Docker. Codespaces does not document /dev/kvm, and Modal offers nested virtualization on Team and Enterprise after you ask support. Every boat machine has Docker, systemd and /dev/kvm.

Can I run Claude Code in GitHub Codespaces or Modal VM Sandboxes?

Yes, on both you install it yourself and pass your API key as a secret, which arrives as an environment variable. boat ships Claude Code, Codex and others preinstalled, keeps the real keys outside the sandbox, and gives you one API to prompt, steer and watch them.

Where do they run?

Codespaces runs in US East, US West, Europe West and Southeast Asia. Modal runs in the US, the EU and Asia-Pacific, and pinning a region costs 1.15x to 1.75x. boat runs only in the EU, in Germany, Finland and France.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons