Modal vs GitHub Codespaces

Modal is a serverless AI cloud whose sandboxes you create from code and run for up to 24 hours, with GPUs on the same platform. Your code keeps a sandbox's files with a filesystem snapshot. 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). Your code can save a sandbox's disk as a filesystem snapshot and start new sandboxes from it. It suits teams that already run models on Modal and want 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 who work on a GitHub repository, not a sandbox API for agents. Each codespace is a Docker container built from the repo's dev container config. It runs 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. “15th cheapest of 336” means 14 of the other 335 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. On Modal you pick the VM runtime for Docker and snapshot the filesystem between sessions; Modal VM ranks 7th at $633 a month. boat ranks 8th at $634, with Docker, /dev/kvm and a desktop in every sandbox.
106th of 365, with limits
$633 a month
290th of 365, with limits
$4,618 a month
5th cheapest of 365
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An always-on agent needs restarts on both: Modal sandboxes end at 24 hours and codespaces at 12. On Modal your code continues from a filesystem snapshot. On boat, turn auto-stop off on a paid plan (default 1 hour) and there is no session cap.
61st of 361, with limits
$1,574 a month
320th of 361, with limits
$6,970 a month
6th cheapest of 361
$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, which ranks 11th here at about $140 a month. Each codespace builds a dev container on a new VM.
15th cheapest of 336
$140 a month
283rd of 336, with limits
$619 a month
189th 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
Modal's Team plan handles 300 sandboxes at once for your users and ranks 15th at about $671 a month. Codespaces is made for GitHub users on a repository. boat ranks 2nd at about $209: a stopped sandbox has no compute charge and keeps its disk for at least 14 days.
18th cheapest of 349
$671 a month
276th of 349, with limits
$1,964 a month
3rd 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
RL rollouts launch many short sandboxes at once, which is what Modal is built for, and it ranks 6th here. Codespaces does not publish how many can run at once.
6th cheapest of 349
$11,982 a month
276th of 349, with limits
$9,489 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
62nd cheapest of 359
$889 a month
295th of 359, with limits
$1,519 a month
10th cheapest of 359
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
110th cheapest of 374
$1,112 a month
317th of 374, with limits
$909 a month
2nd cheapest of 374
$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 keeps files only if your code snapshots the filesystem or uses a Volume. boat ranks 13th here at $26 a month: a full VM that keeps its disk and runs until you stop it once auto-stop is off.
129th of 371, with limits
$9.07 a month
144th of 371, with limits
$270 a month
19th 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 ships a desktop, but both publish a way. Modal's official example installs Xvfb, Chromium and noVNC in a VM sandbox; with it Modal ranks 6th at about $153 a month. Codespaces adds a noVNC desktop through the desktop-lite add-on. boat ranks 8th at $200, with a 60 fps desktop and computer tools built in.
45th cheapest of 367
$153 a month
297th of 367, with limits
$1,367 a month
7th cheapest of 367
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
57th of 356, with limits
$121 a month
306th of 356, with limits
$678 a month
7th 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
98th cheapest of 343
$252 a month
324th of 343, with limits
$922 a month
6th 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
171st of 327, with limits
$5,957 a month
279th of 327, with limits
$18,637 a month
73rd 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
289th of 351, with limits
$464 a month
284th of 351, with limits
$445 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
Modal rents GPUs from T4 to B300. Neither Codespaces nor boat has any, so Modal is the pick for GPU jobs.
18th cheapest of 102
$1,116 a month
Not 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

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; VM runtime with its own kernel (runtime="vm")A Docker container on its own newly built VM, with its own virtual networkFull VM with its own kernel on hosts dedicated to boat (AMD Ryzen 7 9700X and Ryzen 9 9950X); vCPUs are shared
Docker insideYes with the VM runtime; not documented on the default gVisor runtimeYes, inside the dev container through a dev container feature, with sudoYes, with root and systemd, in every sandbox
Nested virtualizationVM runtime only, Enterprise plan only, as an experimental option/dev/kvm is not documentedYes, /dev/kvm on every machine (Android emulator, microVMs)
Longest session24 hours (default 5 minutes); for longer work, a filesystem snapshot and a new sandbox12 hours, even while in use; stops after 30 idle minutes by defaultAuto-stop defaults to 1 hour; set up to 30 days, or turn it off on a paid plan for no cap (trial: 2 hours at most)
Files after a stopNo paused state; files survive through a filesystem snapshot you take (restored into a new sandbox, 30 days by default or no expiry) or a VolumeFiles are kept and storage is billed; a stopped codespace is deleted after 30 days by default (you can set 0 to 30 days)Disk saved every minute and at each stop; a stopped sandbox has no compute charge and keeps its disk for at least 14 days, and a saved snapshot keeps it with no expiry
Fork and snapshotsOne filesystem snapshot boots many identical sandboxes; 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 from its last 1-minute snapshot; saved 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 Actionsboat's image or a saved snapshot; you cannot boot your own Docker image
Desktop and computer useNo built-in desktop; Modal's official example installs Xvfb, Chromium, x11vnc and noVNC in a VM sandboxVS Code, JupyterLab and a terminal; noVNC desktop via the desktop-lite add-on1920x1080, 60 fps desktop, Chrome and computer tools built in
Coding agents and keysYou install a harness in the image (official OpenCode example); secrets are environment variables, or you run your own proxy in a sidecarCopilot as a VS Code extension; secrets copied in as environment variablesSeven harnesses installed with a prompt, steer and events API; optional AI credentials proxy ($1 a day plus $1 per 1,000 requests) keeps supported providers' keys out
GPUsT4 to B300, on the gVisor runtime; 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-gated by default; SSH; raw ports (IPv6 only on sandboxes without their own IPv4)
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 eachGermany, Finland and France; no region choice, no US or Asia region
Every feature Battleships tracks (43)
FeatureModalGitHub Codespacesboat
Full VM (own kernel)No documented wayYesYes
Docker insideNo documented wayYesYes
Nested virtualizationNo documented wayNot publishedYes
RootYesYesYes
SystemdNo documented wayNot publishedYes
Desktop GUIWith your own setupWith your own setupYes
BrowserWith your own setupNo documented wayYes
Computer-use APIWith your own setupNo documented wayYes
SSHWith your own setupYesYes
Persistent diskWith your own setupYesYes
Pause/resumeNo documented wayYesYes
Automatic snapshotsNo documented wayNo documented wayYes
Fork/cloneYesNo documented wayYes
Live fork (no pause)Not publishedNo documented wayYes
Memory forkYesNo documented wayNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesNo documented wayYes
Idle auto-stopYesYesNo documented way
Wake on requestNo documented wayNo documented wayNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundYesNo documented wayYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesNo documented wayNo documented way
Secret proxyNo documented wayNo documented wayYes
Secret proxy for any APINo documented wayNo documented wayYes
Preinstalled agentsWith your own setupNo documented wayYes
Agent harness APINo documented wayNo documented wayYes
MCP serverNo documented wayNo documented wayNo documented way
GPUYesNo 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 publishedYesYes
Usage per sandbox (API)Not publishedNo documented wayYes
Audit logsYesYesNo documented way
SSOYesYesNo documented way
SOC 2YesYesNo documented way
HIPAAYesNo documented wayNo documented way
EU data residencyYesYesNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

Modal12.60 runs/s
GitHub CodespacesNot measured
boat28.06 runs/s

StarSling's run of 3 October 2026 (run 37073680030) ran the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, median of 5 sandboxes. Modal's VM runtime did 15.48 runs/s and its default gVisor runtime 12.60. boat did 28.06, second of 15. 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. GitHub Codespaces is not in the public benchmarks we use, so we cannot say how it compares.

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 measured on: Sandbox (gVisor), request = size, any region. 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. GitHub Codespaces 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.

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
$0 · Starter$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
$109 · 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
$1,480 · 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
$579 · 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
$1,911 · Team · with limits$1,889 · Personal account: GitHub Free · with limits$8,800 · $2000/mo · with limits

Modal: Modal bills by the second for whichever is higher, the CPU and memory you request or what you use, and an idle sandbox pays until it is terminated. Modal prices CPU per physical core, and one core equals 2 vCPU, so a 4 vCPU / 8 GiB sandbox is $0.476 an hour at a full request. StarSling ran Modal with cpu=4 and the sandbox saw 4 CPUs (PR #121); sized that way, Modal bills 4 cores, $0.76 an hour. Starter is free with $30 of monthly credit and Team is $250 a month with $100 of credit; pinning a region multiplies the price by 1.15x to 1.75x.

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: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A default sandbox (4 vCPU / 8 GB) costs $0.036 an hour, billed per second while it runs. A stopped sandbox has no compute charge and keeps its disk for at least 14 days, but saved snapshots above the included count and the AI credentials proxy still charge. The $20 plan includes 12 starts a minute, 60 an hour and 200 a day; each extra start costs $0.03 to $0.07.

Limits in those scenarios

On Modal, a sandbox lives at most 24 hours, so the always-on scenario needs your code to snapshot the filesystem and start a new sandbox each day, and the 50-agent fleet needs Docker, which takes the VM runtime. 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, auto-stop defaults to 1 hour, and the $2,000 plan includes 90 starts a minute and 2,400 a day, bills extra starts at $0.03 to $0.07, and refuses starts above 3 times the included rate per minute, so 1,000 short jobs at once do not fit.

ScenarioModalGitHub Codespacesboat
One coding agent, workdaysNone for this scenarioNone for this scenarioNone for this scenario
One agent that never stops
  • Starter: sessions capped at 24 h
  • Personal account: GitHub Free: sessions capped at 12 h
None for this scenario
50 agents in parallel
  • missing Docker inside
  • how many machines can run at once: limit not published, probably fine at 50 (the typical published limit is 50)
None for this scenario
Sandboxes for your usersNone for this scenario
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None for this scenario
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)
  • 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 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 with no code, 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 you run coding agents that work for hours or days, both need restarts: Modal at 24 hours and Codespaces at 12. boat gives each agent a full VM that keeps its disk, forks while running and has no session cap once you turn auto-stop off on a paid plan (default 1 hour).

No session cut-off, and the disk stays

A Modal sandbox ends within 24 hours; your code carries files forward unless you snapshot it or use a Volume. A codespace stops at 12 hours and its processes end. Either way you write a script that restarts and resumes the agent. On boat, a resume is also like a reboot: memory and running programs are not saved.

A full VM with /dev/kvm and a desktop

Android emulators and microVMs need /dev/kvm, and computer-use agents need a screen. Modal runs Docker on its VM runtime, and Codespaces documents no /dev/kvm. On both you set up a desktop yourself from a published example or add-on. boat has /dev/kvm and a 60 fps desktop in every sandbox.

Agents driven from outside

On both, you write the code that starts, prompts and watches each agent, and API keys sit in environment variables. boat ships the agents and one API to drive them. Its optional paid credentials proxy keeps supported providers' keys out of the sandbox; other secrets still enter it.

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, and machines that keep their disk and fork while running. Turn auto-stop off on a paid plan for long work (default 1 hour). Compare it one to one: boat vs Modal and boat vs GitHub Codespaces.

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 Modal cheaper than GitHub Codespaces?

In most of our scenarios, yes. One agent on workdays is $0 on Modal inside its $30 monthly credit, against $51 on Codespaces. One agent running all month is about $109 on Modal against $270 on Codespaces, and both need restarts. 50 parallel agents are $1,480 on Modal's VM runtime against $3,019. boat comes to $20, $26 and $317 for those three.

Which is faster, Modal or GitHub Codespaces?

We cannot say: Codespaces is not in the public benchmarks we use. In StarSling's run of 3 October 2026, Modal's VM runtime did 15.48 runs/s and its gVisor runtime 12.60 at 4 vCPU / 8 GB, and boat did 28.06. Providers ran on different hardware in different regions.

Can Modal or Codespaces run Docker?

Codespaces runs Docker inside its dev container, with sudo. Modal runs Docker with its VM runtime, chosen with runtime="vm"; the default gVisor runtime does not document it. 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; for longer work, Modal recommends a filesystem snapshot and a new sandbox. A codespace stops after 30 idle minutes by default and after 12 hours at most, even while in use. boat auto-stop defaults to 1 hour; on a paid plan you can turn it off, and then there is no session cap.

Do Modal or GitHub Codespaces have GPUs?

Modal rents GPUs from T4 to B300 on its default gVisor 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; there is no SOC 2 report today. Live status is at status.ascii.dev and our data retention policy is at docs.boat.dev/data-retention.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons