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 bochka: 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 workload | Modal: price rank | GitHub Codespaces: price rank | bochka: 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 bochka has Docker, /dev/kvm and a desktop in every sandbox. | Can't run it | 274th 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 bochka 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 bochka 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 bochka 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 bochka 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 it | 267th 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 bochka 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 it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | Modal | GitHub Codespaces | bochka |
|---|---|---|---|
| What it is | Sandboxes you create, run commands in and terminate from Python, TypeScript or Go | A ready-to-code dev environment for a GitHub repository, opened in VS Code, the browser or the CLI | Sandboxes you drive from code, with an API and SDK on every plan |
| Isolation | gVisor by default; a VM runtime with its own kernel is available | A Docker container on its own newly built VM, with its own virtual network | Full VM with its own kernel, every sandbox |
| Docker inside | Only with the VM runtime | Yes, inside the dev container, with sudo | Yes, with root and systemd, in every sandbox |
| Nested virtualization | VM runtime only, Team and Enterprise plans, on request | /dev/kvm is not documented | Yes, /dev/kvm on every machine (Android emulator, microVMs) |
| Longest session | 24 hours (default 5 minutes) | 12 hours, even while in use; stops after 30 idle minutes by default | No cap on paid plans (default TTL 1 h, changeable) |
| Files after a stop | No paused state; a finished sandbox is gone, only Volumes keep files | Saved files are kept and storage is billed; stopped codespaces are deleted after 30 days by default | Disk saved every minute and on stop; a stopped sandbox keeps its disk and costs nothing |
| Fork and snapshots | Filesystem snapshots into images; memory snapshots in alpha that end the sandbox | No copy or snapshot endpoint; new codespaces start from a repo, branch, pull request or prebuild | Fork a running sandbox without stopping it; named snapshots as templates |
| Starting point | Build images in code or pull any linux/amd64 registry image | Dev container config in the repository, with prebuilds built by GitHub Actions | Named snapshots used as templates; no Dockerfile builds |
| Desktop and computer use | Not offered; an example shows how to set up VNC yourself | VS Code, JupyterLab and a terminal; no graphical desktop | 60fps desktop, Chromium and computer-use API built in |
| Coding agents and keys | Examples only; secrets are environment variables, or you run your own proxy in a sidecar | Copilot as a VS Code extension; secrets copied in as environment variables | Claude Code, Codex, OpenCode and more preinstalled with a prompt, steer and events API; real keys stay outside the sandbox |
| GPUs | T4 to B300; 10 at once on Starter, 50 on Team | None | None |
| Reaching the sandbox | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | A URL per forwarded port, SSH and CLI tunnels; no public IP | HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP |
| Outbound network rules | Block all, IP-range allowlist, domain allowlist (beta) | Open internet; GitHub says there is no way to restrict it | Open internet; no provider-side allowlist |
| Regions | US, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x | US East, US West, Europe West and Southeast Asia, same price in each | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Modal | GitHub Codespaces | bochka |
|---|---|---|---|
| Full VM (own kernel) | No | Yes | Yes |
| Docker inside | No | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | No | Yes | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | Yes | No | Yes |
| Live fork (no pause) | No | No | Yes |
| Memory fork | Yes | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | No | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | Yes | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | No | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | No | No |
| GPU | Yes | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Yes | Yes |
| Usage per sandbox (API) | Not published | No | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
In StarSling's public benchmark run of 29 September 2026 at 4 vCPU / 8 GB, bochka finished 26.69 Node.js build-and-test runs per second and Modal's default gVisor sandbox 12.79, so bochka 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.
| Scenario | Modal, a month | GitHub Codespaces, a month | bochka, 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: bochka 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 bochka, 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.
| Scenario | Modal | GitHub Codespaces | bochka |
|---|---|---|---|
| One coding agent, workdays |
| None that bite | None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users | None that bite |
| None that bite |
| 1,000 short jobs at once |
|
|
|
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 bochka 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. bochka 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. bochka ships the agents, one API to drive them, and a credentials proxy.
Use bochka 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: bochka vs Modal and bochka 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. bochka 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. bochka 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 bochka 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 bochka 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 bochka has no GPUs either.
Is bochka SOC 2 compliant?
SOC 2 is in progress. We're open about where we stand: live status at status.bochka.xyz and our data retention policy at docs.bochka.xyz/data-retention.
Try bochka
Install the CLI, then run bochka new.
Product preview