Modal vs GitHub Codespaces

Modal is a serverless AI cloud whose sandboxes you create from code, run for up to 24 hours and then throw away, with GPUs on the same platform. GitHub Codespaces is a dev environment for people: a Linux dev container on its own VM, opened from a repository in VS Code, that keeps its files but stops after 12 hours at most.

The companies and products

Modal

Modal is a serverless cloud for AI work: inference, training, batch jobs and sandboxed code, all driven from Python, TypeScript or Go code.

Modal Sandboxes are containers you create from code, run commands in, and then terminate. By default they run under gVisor, a user-space kernel from Google; since October 2026 you can also pick a VM runtime with its own Linux kernel for Docker and FUSE (Battleships tracks that as a separate card, Modal VM Sandboxes). It suits teams that already run models on Modal and want short-lived, scalable code execution next to their GPUs.

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.

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. “19th cheapest of 345” means 18 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 workloadModal: price rankGitHub Codespaces: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Codespaces gives an agent Docker in a dev container but stops it at 12 hours, Modal's default sandbox has no Docker, and boat has Docker, /dev/kvm and a desktop in every sandbox.
Can't run it274th of 367, with limits
$4,618 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An always-on agent is cut off on both: Modal sandboxes end at 24 hours and codespaces at 12, while a boat sandbox has no session cap on paid plans.
196th of 366, with limits
$1,924 a month
309th of 366, with limits
$6,970 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
Huge numbers of short code runs suit Modal's fast starts and high container limits, while each codespace builds a dev container on a new VM.
19th cheapest of 345
$181 a month
288th of 345, with limits
$619 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
Modal's Team plan handles 300 sandboxes at once for your users, Codespaces is made for GitHub users on a repository, and boat keeps each user's stopped sandbox with its disk for free.
11th cheapest of 361
$811 a month
281st of 361, with limits
$1,964 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
RL rollouts launch many short sandboxes at once, which is what Modal is built for; Codespaces does not publish how many can run at once.
5th cheapest of 360
$19,038 a month
282nd of 360, with limits
$9,489 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
59th cheapest of 364
$1,244 a month
295th of 364, with limits
$1,519 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
126th cheapest of 377
$1,793 a month
314th of 377, with limits
$909 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Codespaces keeps its disk between days but stops after 12 hours at most, Modal resets everything outside a Volume, and boat is a full VM that keeps running and keeps its disk.
138th of 368, with limits
$23 a month
130th of 368, with limits
$270 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 Modal nor Codespaces ships a graphical desktop, while boat streams a 60fps desktop with Chromium and a computer-use API.
98th of 369, with limits
$183 a month
267th of 369, with limits
$1,367 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
177th of 367, with limits
$136 a month
275th of 367, with limits
$678 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
267th of 346, with limits
$394 a month
310th of 346, with limits
$922 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
223rd of 338, with limits
$8,795 a month
280th of 338, with limits
$18,637 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
Can't run it267th of 360, with limits
$445 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
Modal rents GPUs from T4 to B300 and neither Codespaces nor boat has any, so Modal is the only one of the three for GPU jobs.
19th cheapest of 98
$1,187 a month
Can'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

FeatureModalGitHub Codespacesboat
What it isSandboxes you create, run commands in and terminate from Python, TypeScript or GoA ready-to-code dev environment for a GitHub repository, opened in VS Code, the browser or the CLISandboxes you drive from code, with an API and SDK on every plan
IsolationgVisor by default; a VM runtime with its own kernel is availableA Docker container on its own newly built VM, with its own virtual networkFull VM with its own kernel, every sandbox
Docker insideOnly with the VM runtimeYes, inside the dev container, with sudoYes, with root and systemd, in every sandbox
Nested virtualizationVM runtime only, Team and Enterprise plans, on request/dev/kvm is not documentedYes, /dev/kvm on every machine (Android emulator, microVMs)
Longest session24 hours (default 5 minutes)12 hours, even while in use; stops after 30 idle minutes by defaultNo cap on paid plans (default TTL 1 h, changeable)
Files after a stopNo paused state; a finished sandbox is gone, only Volumes keep filesSaved files are kept and storage is billed; stopped codespaces are deleted after 30 days by defaultDisk saved every minute and on stop; a stopped sandbox keeps its disk and costs nothing
Fork and snapshotsFilesystem snapshots into images; memory snapshots in alpha that end the sandboxNo copy or snapshot endpoint; new codespaces start from a repo, branch, pull request or prebuildFork a running sandbox without stopping it; named snapshots as templates
Starting pointBuild images in code or pull any linux/amd64 registry imageDev container config in the repository, with prebuilds built by GitHub ActionsNamed snapshots used as templates; no Dockerfile builds
Desktop and computer useNot offered; an example shows how to set up VNC yourselfVS Code, JupyterLab and a terminal; no graphical desktop60fps desktop, Chromium and computer-use API built in
Coding agents and keysExamples only; secrets are environment variables, or you run your own proxy in a sidecarCopilot as a VS Code extension; secrets copied in as environment variablesClaude Code, Codex, OpenCode and more preinstalled with a prompt, steer and events API; real keys stay outside the sandbox
GPUsT4 to B300; 10 at once on Starter, 50 on TeamNoneNone
Reaching the sandboxEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistA URL per forwarded port, SSH and CLI tunnels; no public IPHTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP
Outbound network rulesBlock all, IP-range allowlist, domain allowlist (beta)Open internet; GitHub says there is no way to restrict itOpen internet; no provider-side allowlist
RegionsUS, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75xUS East, US West, Europe West and Southeast Asia, same price in eachEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureModalGitHub Codespacesboat
Full VM (own kernel)NoYesYes
Docker insideNoYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdYesNot publishedYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeNoYesYes
Automatic snapshotsNoNoYes
Fork/cloneYesNoYes
Live fork (no pause)NoNoYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesNoYes
Idle auto-stopYesYesNo
Wake on requestNoNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundYesNoYes
Public IPv4NoNoNo
Egress allowlistYesNoNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsNoNoYes
Agent harness APINoNoYes
MCP serverNoNoNo
GPUYesNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedYesYes
Usage per sandbox (API)Not publishedNoYes
Audit logsYesYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesNoNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Modal12.79 runs/s
GitHub CodespacesNot measured
boat26.69 runs/s

In StarSling's public benchmark run of 29 September 2026 at 4 vCPU / 8 GB, boat finished 26.69 Node.js build-and-test runs per second and Modal's default gVisor sandbox 12.79, so boat did about twice the work. GitHub Codespaces was not in that benchmark, so there is no comparable score for it.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal measured on: Sandbox (gVisor), request = size, any region. 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.

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

Modal: Modal bills by the second for the higher of what you request and what you use, and an idle sandbox pays until it is terminated. Starter is free with $30 of monthly credit and Team is $250 a month with $100 of credit; pinning a region multiplies the price.

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

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

Limits in those scenarios

On Modal, a sandbox lives at most 24 hours and its root disk is wiped when it ends, so the workday, always-on and fleet scenarios only keep files in a Volume, and the 50-agent fleet needs Docker, which the default sandbox lacks. On Codespaces, every codespace stops after 12 hours at most, so the always-on scenario needs a restart script, and GitHub does not publish how many can run at once, so 300 user sandboxes and 1,000 short jobs are not confirmed. On boat, the limit that bites is start speed: 1,000 jobs at once queue for minutes and exceed the daily start limit of the $2,000 plan.

ScenarioModalGitHub Codespacesboat
One coding agent, workdays
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that biteNone that bite
One agent that never stops
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • Personal account: GitHub Free: sessions capped at 12 h
None that bite
50 agents in parallel
  • missing Docker inside
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • how many machines can run at once: limit not published, probably fine at 50 (the typical published limit is 50)
None that bite
Sandboxes for your usersNone that bite
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None that bite
1,000 short jobs at once
  • shared vCPUs on this tier (Modal sells dedicated cores separately as “Sandbox (gVisor), request = size, any region”): heavy, sustained CPU use can be slowed by other tenants
  • not confirmed: how many machines can run at once (you need 1,000; the typical published limit is 50)
  • 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 Modal when

your sandboxes need GPUs, must run in many regions, or are huge bursts of short jobs created and ended from code.

  • GPUs next to your sandboxes. Useful if your code trains or runs models: Modal rents GPUs from T4 to B300 on the same platform as its sandboxes.
  • Built for huge bursts of short jobs. Useful for RL rollouts and code runs at scale: the Team plan runs up to 5,000 containers, each created and ended from code.
  • Outbound traffic rules. Useful when sandboxes run untrusted code: Modal can block all outbound traffic or allow only chosen IP ranges or domains.

Use GitHub Codespaces when

your developers want a ready VS Code environment for a GitHub repository, opened from a branch or pull request.

  • Built into GitHub. Useful if your team lives on GitHub: open a codespace from any repo, branch or pull request, with the dev container already set up.
  • Files that stay between days. Useful for daily work on one repo: a stopped codespace keeps its saved files, so tomorrow starts where today ended.
  • 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.

Where boat fits

Modal is made for short sandboxes next to GPUs, and Codespaces is made for developers opening a repository. If what you are really running is coding agents that work for hours or days, both cut them off: Modal at 24 hours and Codespaces at 12. boat gives each agent a full VM that runs until you stop it, keeps its disk and forks while running.

No session cut-off, and the disk stays

A Modal sandbox ends within 24 hours and loses everything outside a Volume; a codespace stops at 12 hours and its processes end. Either way you write a script that restarts and resumes the agent.

A full VM with /dev/kvm and a desktop

Android emulators and microVMs need /dev/kvm and computer-use agents need a screen. Modal's default sandbox has no Docker, Codespaces documents no /dev/kvm, and neither ships a desktop, so you set up VNC yourself.

Agents driven from outside, keys kept out

On both, you write the code that starts, prompts and watches each agent, and API keys sit in environment variables any code the agent runs can read. boat ships the agents, one API to drive them, and a credentials proxy.

Use boat when your code starts and drives agents that work for hours or days: full VMs with Docker, /dev/kvm and a desktop, built-in coding agents with keys kept outside, and machines that keep their disk and fork while running. Compare it one to one: boat vs Modal and boat vs GitHub Codespaces.

Questions people ask

Is Modal cheaper than GitHub Codespaces?

In most of our scenarios, yes: one agent running all month is $178 on Modal against $270 on Codespaces, and 50 parallel agents $2,229 against $3,019, though neither fits those cleanly. For 1,000 short jobs at once Codespaces lands lower ($1,889 against $3,193), but its concurrency limit is not confirmed. boat comes to $26 and $317 for the first two.

Which is faster, Modal or GitHub Codespaces?

There is no shared measurement: Modal's default sandbox scored 12.79 Node.js build-and-test runs per second in StarSling's benchmark, and Codespaces was not tested. boat scored 26.69 in the same run, about twice Modal's default sandbox.

Can Modal or Codespaces run Docker?

Codespaces runs Docker inside its dev container, with sudo. Modal runs Docker only with its VM runtime, not in the default gVisor sandbox. Every boat sandbox runs Docker, systemd and /dev/kvm with no extra setting.

How long can a Modal sandbox or a codespace run?

A Modal sandbox runs 5 minutes by default and 24 hours at most. A codespace stops after 30 idle minutes by default and after 12 hours at most, even while in use. A boat sandbox has no session cap on paid plans.

Do Modal or GitHub Codespaces have GPUs?

Modal rents GPUs from T4 to B300 on its default sandbox runtime. Codespaces has no GPU machine types in its current docs, and boat has no GPUs either.

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