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 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.
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.
- Funding
- Over $466M raised
- Generally available
- 1 October 2026; early customers launched over 20 million VMs before that
- Session length
- Default 5 minutes, maximum 24 hours
- Compliance
- SOC 2 on every plan; HIPAA on Enterprise
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 workload | GitHub Codespaces: price rank | Modal VM Sandboxes: price rank | bochka: 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 bochka 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 bochka has no session cap on paid plans. | 309th of 366, with limits $6,970 a month | Can't run it | 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 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 it | 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 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 it | 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 Huge bursts of short rollouts are what Modal is built for and not what Codespaces is for, and bochka'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 it | 10th 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 bochka 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 bochka keeps running. | 130th of 368, with limits $270 a month | Can't run it | 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 ships a desktop: a codespace has an editor and a terminal, Modal shows how to set up Xvfb and VNC yourself, and bochka streams a 60fps desktop with Chromium. | 267th of 369, with limits $1,367 a month | Can't run it | 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 | 275th of 367, with limits $678 a month | Can't run it | 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 | 310th of 346, with limits $922 a month | Can't run it | 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 | 280th of 338, with limits $18,637 a month | Can't run it | 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 | 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 it | 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 | GitHub Codespaces | Modal VM Sandboxes | bochka |
|---|---|---|---|
| Isolation | A Docker container on its own newly built VM, with its own virtual network | A VM with its own Linux kernel on Cloud Hypervisor | A full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| How you use it | Opened from a repo, branch or pull request in VS Code, the browser, JupyterLab or the GitHub CLI | Created from Python, TypeScript or Go code with runtime="vm" | API and SDK to create, fork, stop and run commands, plus a desktop stream |
| Longest session | 12 hours at most, even while in use; stops after 30 idle minutes by default | 24 hours at most; default timeout 5 minutes | No cap on paid plans; you set the time to live |
| Files after a stop | Kept, with storage billed; stopped codespaces are deleted after 30 days by default | No paused state; only Volumes and snapshots keep files once a sandbox ends | Disk saved every minute and on stop; a stopped sandbox keeps it and costs nothing |
| Docker, root, systemd | Docker and sudo inside the dev container | Docker, systemd and root; you start dockerd yourself | Docker, root and systemd in every sandbox |
| Nested virtualization | /dev/kvm is not documented | Team and Enterprise plans only, on request | /dev/kvm on every plan |
| Copies and snapshots | No copy or snapshot endpoint; new codespaces start from a repo or a prebuild | Filesystem snapshots boot any number of copies; memory snapshots in alpha | Fork a running sandbox with its disk; named snapshots as templates; no memory snapshots |
| Desktop and computer use | Editor and terminal; no graphical desktop | Not offered; an example shows how to set up Xvfb and VNC yourself | 60fps desktop, Chromium and a computer-use API built in |
| Coding agents and API keys | GitHub Copilot as a VS Code extension; secrets copied in as environment variables | Examples only; secrets are environment variables, or you run your own proxy in a sidecar | Claude Code, Codex and others preinstalled with a prompt, steer and events API; real keys stay outside through the credentials proxy |
| Reaching the machine | A URL per forwarded port, plus SSH and CLI tunnels; no public IP | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP |
| Outbound network rules | Open internet; GitHub says there is no way to restrict it | Block all, IP-range allowlist, domain allowlist (beta) | Open internet, no provider-side allowlist |
| CPU benchmark (4 vCPU / 8 GB) | Not measured | 15.54 runs/s | 26.69 runs/s |
| Regions | US East, US West, Europe West and Southeast Asia, same price in each | US, EU and Asia-Pacific plus narrower regions; pinning costs 1.15x to 1.75x | EU only: Germany, Finland, France |
| GPUs | None | None on the VM runtime; GPU sandboxes need gVisor | None |
Every feature Battleships tracks (43)
| Feature | GitHub Codespaces | Modal VM Sandboxes | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | Yes | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Yes | 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 | Yes | No | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | No | Yes | Yes |
| Live fork (no pause) | No | Yes | Yes |
| Memory fork | No | Yes | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | No | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | Yes | 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 | No | 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 | Yes | Not published | Yes |
| Usage per sandbox (API) | No | Not published | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | No | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
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 bochka 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.
| Scenario | GitHub Codespaces, a month | Modal VM Sandboxes, 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 | $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: bochka 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 bochka 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.
| Scenario | GitHub Codespaces | Modal VM Sandboxes | 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 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 bochka 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. bochka 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. bochka 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. bochka 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. bochka preinstalls the agents and keeps real keys outside.
Use bochka 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: bochka vs GitHub Codespaces and bochka 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. bochka 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 bochka 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. bochka 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 bochka 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. bochka 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. bochka runs only in the EU, in Germany, Finland and France.
Try bochka
Install the CLI, then run bochka new.
Product preview
More comparisons
- bochka vs GitHub Codespaces
- bochka vs Modal VM Sandboxes
- E2B vs GitHub Codespaces
- Daytona vs GitHub Codespaces
- Modal vs GitHub Codespaces
- Vercel Sandbox vs GitHub Codespaces
- Cloudflare Sandbox vs GitHub Codespaces
- Blaxel vs GitHub Codespaces
- Runloop vs GitHub Codespaces
- Tensorlake vs GitHub Codespaces
- Morph Cloud vs GitHub Codespaces
- CodeSandbox SDK vs GitHub Codespaces