CodeSandbox SDK vs GitHub Codespaces
CodeSandbox SDK is an API that starts Firecracker VMs from code, which hibernate with their memory and wake on the next request. GitHub Codespaces is a dev environment for people: a dev container per repository, opened in VS Code or the browser, that stops after 12 hours at most.
The companies and products
CodeSandbox SDK
CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.
Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs now call it the legacy offering and point new users to its successor, the together-sandbox SDK.
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. “46th cheapest of 345” means 45 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 | CodeSandbox SDK: price rank | GitHub Codespaces: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month | 178th of 367, with limits $1,939 a month | 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 assistant is a compromise on both: a codespace stops after 12 hours at most, and a CodeSandbox SDK VM hibernates after its idle timeout. | 215th of 366, with limits $2,478 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 CodeSandbox SDK fits short code runs well, since its VMs hibernate with their memory and wake on the next request, while each codespace builds a dev container on a new VM. | 46th cheapest of 345 $642 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 CodeSandbox SDK wakes a user's sandbox on their next HTTP request but caps Scale at 250 VMs at once; Codespaces are made for GitHub users and publish no concurrency limit. | 140th of 361, with limits $1,707 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 CodeSandbox SDK's memory forks let many rollouts branch from the same running state, which Codespaces cannot do. | 348th of 360, with limits $3,861 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 CodeSandbox SDK fits evals fully with memory forks from one warm state; Codespaces has no fork or snapshot API, so every run starts from the repository or a prebuild. | 64th cheapest of 364 $1,335 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 CodeSandbox SDK suits CI jobs started from code, Codespaces is a compromise because each run builds from the repo, and boat adds /dev/kvm for Android and VM builds. | 92nd cheapest of 377 $860 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 is a polished VS Code box per repo but stops after 12 hours; CodeSandbox SDK hibernates when idle; boat is a full VM that keeps running. | 310th of 368, with limits $240 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 offers a graphical desktop, while boat streams a 60fps desktop with Chromium for computer use. | 206th of 369, with limits $691 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 | 251st of 367, with limits $443 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 | 281st of 346, with limits $508 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 | 193rd of 338, with limits $7,390 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 | 240th of 360, with limits $326 a month | 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 | 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 | CodeSandbox SDK | GitHub Codespaces | boat |
|---|---|---|---|
| What it is | A TypeScript SDK that starts sandbox VMs from code | A cloud dev environment for a GitHub repository, opened in VS Code, the browser or the CLI | A sandbox API with full VMs, an SDK and built-in coding agents |
| Isolation | Firecracker microVM with its own kernel | A Docker container on its own newly built VM | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| How long it runs | No hard cap; hibernates after an idle timeout of up to one day | Stops after 30 idle minutes by default (up to 240) and after 12 hours at most, even while in use | Runs until you stop it; no session cap on paid plans |
| Pause and resume | Hibernates with a memory snapshot; resumes with processes still running | Saved files are kept; processes end at each stop | Disk is saved every minute and on stop; resume boots the machine again |
| Fork | Fork a hibernated sandbox from its snapshot, or a running one sharing its memory | No copy or snapshot endpoint; new codespaces start from a repo, branch, pull request or prebuild | Fork a running sandbox with its disk; named snapshots as templates |
| Wake on request | Yes; an HTTP request to a host wakes a hibernated VM | No; you restart a stopped codespace | No; a stopped sandbox is started by API |
| Starting point | A template or any Dockerfile | Dev container config in the repository, with prebuilds built by GitHub Actions | Named snapshots (templates), shareable by code; no Dockerfile builds |
| Machine sizes | Up to 16 cores / 32 GB on Scale, 64 cores / 128 GB on Enterprise | 2, 4, 8, 16 or 32 cores, with 4 GB of memory per core | Up to 16 vCPU / 32 GB on the $100 plan and above |
| Docker and nested virtualization | Docker and root; nested virtualization not documented | Docker and sudo in the dev container; /dev/kvm not documented | Docker, root, systemd and /dev/kvm on every machine |
| Shell access | Terminals, commands and files through the SDK; no SSH | SSH and the GitHub CLI, plus a terminal in the editor | SSH, plus exec and files over the API |
| Inbound access | HTTPS host per port, public by default, signed tokens for private hosts; no raw TCP | A URL per forwarded port, private, organization or public; no public IP | HTTPS URLs for up to 50 ports, token-protected by default; raw TCP; a dedicated IPv6 or IPv4 |
| Desktop and browser | No desktop; a headless Chromium template | VS Code, JupyterLab and a terminal; no graphical desktop | Linux desktop streamed at 60fps, Chromium and computer-use tools |
| Coding agents | Run your own agent through the command API | GitHub Copilot as a VS Code extension; other agents you install yourself | Claude Code, Codex, OpenCode and others preinstalled, with a prompt, steer and events API |
| Keeping API keys out of the sandbox | Secrets passed in as environment variables | Secrets copied into the codespace as environment variables | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Regions | A country hint steers scheduling, but placement is not guaranteed | US East, US West, Europe West and Southeast Asia | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | CodeSandbox SDK | GitHub Codespaces | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | No | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | Yes | No | Yes |
| Live fork (no pause) | Yes | 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 | Yes | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | 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 | 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 | Not published | Yes | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Not published | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | No | No | No |
| EU data residency | No | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable CPU measurement for CodeSandbox SDK or GitHub Codespaces: neither was in the benchmark run we use. boat did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB in StarSling's run of 2026-09-29, 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. CodeSandbox SDK and GitHub Codespaces have 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 | CodeSandbox SDK, a month | GitHub Codespaces, a month | boat, 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 | $193 · Scale | $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 | $341 · Scale | $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,500 · Scale | $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 | $815 · Scale · with limits | $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,632 · Scale · with limits | $1,889 · Personal account: GitHub Free · with limits | $2,000 · $2000/mo · with limits |
CodeSandbox SDK: You buy VM credits and each size burns a fixed number per hour, billed per started minute while the VM runs, including idle time before it hibernates. The Scale plan adds a $170 monthly platform fee that is not usage credit; a hibernated VM costs nothing.
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. Personal accounts get a free monthly quota and organizations do not; there is no 4-core machine with 8 GB, so 4 vCPU jobs use the 16 GB one.
GitHub Codespaces: Plans start at $20 a month, and the whole fee is usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
CodeSandbox SDK's Scale plan allows 250 VMs at once, so 300 user sandboxes and 1,000 short jobs do not fit without Enterprise, and its price for disk beyond 20 GB and for egress is not published. Codespaces stops every codespace after 12 hours, so the always-on scenario needs restarts, and GitHub does not publish how many can run at once. boat fits every scenario but the 1,000-job burst, where even the $2,000 plan queues starts.
| Scenario | CodeSandbox SDK | GitHub Codespaces | boat |
|---|---|---|---|
| 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 |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use CodeSandbox SDK when
your code starts sandboxes that sleep between visits and should wake on the next HTTP request with their memory intact, and you are fine building on what Together now calls its legacy SDK.
- Built to be driven from code. Good for products that start sandboxes for their own users or jobs, through a TypeScript SDK for commands, files and hosts.
- Memory hibernation and wake on request. Useful for previews and code runs used in bursts: an HTTP request wakes a hibernated VM with its processes still running.
- Forks that share memory. Good for branching many runs, such as rollouts or test variants, from one warm state instead of setting up again.
Use GitHub Codespaces when
your developers want a ready VS Code environment for a GitHub repository, opened from a branch or pull request, in the US, EU or Asia.
- Built into GitHub. Useful if your team lives on GitHub: open a codespace from any repo, branch or pull request, with the dev container ready.
- 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.
- Regions in the US, EU and Asia. Useful if your developers are spread out: you pick US East, US West, Europe West or Southeast Asia.
Where boat fits
If what you are really running is coding agents, both are a stretch: CodeSandbox SDK gives you a VM but no SSH, desktop or agents, and Codespaces is an editor for people that stops at 12 hours. boat gives each agent a full VM that keeps running, with the agent, a desktop and its keys already set up.
A whole machine with /dev/kvm
Neither CodeSandbox SDK nor Codespaces documents /dev/kvm, so Android emulators and microVMs an agent needs cannot start. boat gives every sandbox root, systemd, Docker and /dev/kvm.
Runs for days and forks while running
A codespace stops at 12 hours even while in use and cannot be copied, so you need a restart script. CodeSandbox SDK hibernates when idle. boat runs until you stop it and forks a running sandbox.
Agents, desktop and keys built in
On both you install and drive the agent yourself, there is no graphical desktop, and API keys sit in environment variables any code can read. boat ships agents, a 60fps desktop and a credentials proxy.
Use boat when your code drives agents that work for hours or days: full VMs with /dev/kvm, a desktop and open ports, built-in coding agents with keys kept outside, and machines that keep their work and fork while running. Compare it one to one: boat vs CodeSandbox SDK and boat vs GitHub Codespaces.
Questions people ask
Is CodeSandbox SDK cheaper than GitHub Codespaces?
It depends on the job. One coding agent on workdays is $193 a month on CodeSandbox SDK against $51 on Codespaces, but 50 agents in parallel come to $2,500 against $3,019. boat is $20 and $317 for the same two.
Which is faster?
We have no comparable CPU measurement for either. boat did 26.69 runs per second on the StarSling Node.js benchmark at 4 vCPU / 8 GB.
Can I run an agent 24/7 on either?
Not on Codespaces without restarts, since a codespace stops after 12 hours even while in use. CodeSandbox SDK has no hard cap but hibernates after an idle timeout of up to one day. A boat sandbox runs until you stop it on paid plans.
Can CodeSandbox SDK and Codespaces run Docker?
Yes, both run Docker inside the sandbox, and neither documents /dev/kvm for Android emulators or nested VMs. Every boat machine has Docker, systemd and /dev/kvm.
Can I SSH into them?
Codespaces supports SSH and the GitHub CLI. CodeSandbox SDK connects through its SDK clients with terminals, commands and files, and no SSH. boat has SSH as well as an exec and files API.
Is CodeSandbox SDK still maintained?
CodeSandbox is now part of Together AI. Together's docs call the CodeSandbox-based SDK deprecated and name together-sandbox as its successor, while self-serve sign-up still runs through CodeSandbox.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs CodeSandbox SDK
- boat vs GitHub Codespaces
- E2B vs CodeSandbox SDK
- Daytona vs CodeSandbox SDK
- Modal vs CodeSandbox SDK
- Vercel Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs CodeSandbox SDK
- Blaxel vs CodeSandbox SDK
- Runloop vs CodeSandbox SDK
- Tensorlake vs CodeSandbox SDK
- Morph Cloud vs CodeSandbox SDK
- CodeSandbox SDK vs Northflank