E2B vs GitHub Codespaces

E2B is a sandbox API for agents: Firecracker microVMs that start fast, pause with their memory and fork while running. GitHub Codespaces is a dev environment for people: a dev container per GitHub repository, opened in VS Code or the browser, that stops after 12 hours at most.

The companies and products

E2B

E2B calls itself the AI agent cloud: an API that gives each agent session its own isolated Linux machine.

Every E2B sandbox is a Firecracker microVM that boots from a snapshot, so it starts fast and can be paused and resumed with its memory. You build custom sandboxes from templates based on a Docker image, and drive them from Python or JavaScript SDKs. It is built for teams that run many short code, data or agent jobs, and its runtime is open source.

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. “16th cheapest of 367” means 15 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 workloadE2B: price rankGitHub Codespaces: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
E2B fits a coding agent through its API but stops at 24 hours on Pro, Codespaces stops at 12, and boat has no cap plus /dev/kvm for emulators.
16th cheapest of 367
$4,143 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 assistant that lives on its machine all month hits E2B's 24-hour cap and Codespaces' 12-hour cap, so both need restarts, while boat keeps running.
51st of 366, with limits
$5,348 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
E2B is built for short code runs that start fast and pause with their memory; a codespace builds a dev container on a new VM, which is slow for one-minute jobs.
37th cheapest of 345
$421 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
E2B is made to hand sandboxes to your users through an API, while Codespaces is tied to GitHub users and repos and does not publish how many can run at once.
23rd cheapest of 361
$2,354 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
E2B ranks 2nd here: memory forks and a high start rate suit many short rollouts, and Codespaces has no fork at all.
2nd cheapest of 360
$9,384 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
78th cheapest of 364
$1,975 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
Neither is a strong CI runner: E2B has no nested virtualization and Codespaces has no fork or snapshot API, while boat has both /dev/kvm and forks.
337th of 377, with limits
$1,429 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 and E2B is an API sandbox, but both stop on a timer, while boat runs all month on one machine.
192nd of 368, with limits
$358 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
E2B has a Linux desktop for computer use and Codespaces has none; boat streams its desktop at 60fps and can be embedded in your app.
32nd cheapest of 369
$1,342 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
100th of 367, with limits
$746 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
57th cheapest of 346
$554 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
227th of 338, with limits
$9,223 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
11th cheapest of 360
$1,043 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 itCan'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

FeatureE2BGitHub Codespacesboat
What it isA sandbox API for agents, driven from Python or JavaScript SDKsA cloud dev environment for a GitHub repository, opened in VS Code, the browser or the CLIA sandbox API for agents with full VMs, an SDK and built-in coding agents
IsolationFirecracker microVM with its own kernelA Docker container on its own newly built VM, with its own virtual networkFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
CPU benchmark (4 vCPU / 8 GB)12.61 runs/sNot measured26.69 runs/s
Session lengthUp to 1 hour on Hobby and 24 hours on Pro; pausing resets the clock12 hours at most even while in use, and 30 idle minutes by defaultNo cap on paid plans; runs until you stop it
Pause and resumeSaves memory and disk; resumes in about a second with processes runningFiles are kept on stop; processes end; stopped codespaces are deleted after 30 days by defaultDisk saved every minute and on stop; a stopped sandbox costs nothing; resume boots it again
ForkFork a running sandbox with its memory, up to 20 copies per callNo fork or snapshot endpoint; each codespace starts from a repo, branch or prebuildFork a running sandbox with its disk; named snapshots as templates
Docker and nested virtualizationDocker inside; nested virtualization not supportedDocker and sudo in the dev container; /dev/kvm not documentedDocker, root, systemd and /dev/kvm on every machine
Desktop and computer useLinux desktop for computer useVS Code, JupyterLab and a terminal; no graphical desktop60fps desktop with Chromium, computer use and an embeddable stream
Starting pointTemplates built from a Docker imageDev container config in the repo, with prebuilds built by GitHub ActionsNamed snapshots shared by code; no Dockerfile builds
Coding agentsTemplates and guides for many agents, run through the command APIGitHub Copilot as a VS Code extension; other agents you install yourselfClaude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API
Keeping API keys out of the sandboxSecrets injected into outbound HTTPS headers (private beta)Secrets copied into the codespace as environment variablesCredentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Inbound accessHTTPS URL per port, public unless you turn on a token; no dedicated IPA URL per forwarded port, private, organization or public; no public IPHTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv4 or IPv6
Outbound rulesAllow and deny lists by IP, CIDR or domainOpen internet; GitHub says there is no way to restrict itOpen internet, no provider-side allowlist
RegionsUS by default; EU and APAC on Pro and aboveUS East, US West, Europe West and Southeast AsiaEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureE2BGitHub Codespacesboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdYesNot publishedYes
Desktop GUIYesNoYes
BrowserYesNoYes
Computer-use APIYesNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeYesYesYes
Automatic snapshotsYesNoYes
Fork/cloneYesNoYes
Live fork (no pause)YesNoYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesNoYes
Idle auto-stopYesYesNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistYesNoNo
Secret proxyYesNoYes
Secret proxy for any APIYesNoYes
Preinstalled agentsYesNoYes
Agent harness APINoNoYes
MCP serverYesNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingYesNoNo
BYOCYesNoNo
Open sourceYesNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsYesYesYes
Usage per sandbox (API)NoNoYes
Audit logsNot publishedYesNo
SSONoYesNo
SOC 2YesYesNo
HIPAAYesNoNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

E2B12.61 runs/s
GitHub CodespacesNot measured
boat26.69 runs/s

On StarSling's hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB, in the same run, boat did 26.69 runs per second and E2B did 12.61, so boat did about twice the CPU work. GitHub Codespaces was not in the benchmark runs, 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. 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.

ScenarioE2B, 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
$202 · Pro$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
$368 · Pro · 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,773 · Pro$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
$1,395 · Pro+ (600 concurrent)$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
$2,797 · Pro++ (1,100 concurrent)$1,889 · Personal account: GitHub Free · with limits$2,000 · $2000/mo · with limits

E2B: E2B bills per second for the vCPU and RAM you set, idle time included, until you pause or kill the sandbox. Pro costs $150 a month for higher limits with no usage credit, and more concurrency costs $500 a month per 500 slots.

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. There is no 4-core machine with 8 GB, so 4 vCPU jobs are priced on the 4-core 16 GB machine; personal accounts get a free monthly quota and organizations do not.

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

Neither fits the always-on scenario: E2B Pro caps a session at 24 hours and Codespaces at 12, so both prices assume restarts. GitHub does not publish how many codespaces can run at once, so 300 user sandboxes and 1,000 short jobs are not confirmed there, while E2B fits both on Pro+ and Pro++. E2B Pro includes 20 GiB of disk, with no published price for more. boat has no session cap, but at 1,000 short jobs at once its start limits per hour and per day do not fit.

ScenarioE2BGitHub Codespacesboat
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
None that biteNone that bite
One agent that never stops
  • Pro: sessions capped at 24 h
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • Personal account: GitHub Free: sessions capped at 12 h
None that bite
50 agents in parallel
  • egress price not published
  • 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 users
  • egress price not published
  • 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
  • egress price not published
  • bursts above 300 starts/min are queued (a burst of 333 takes ~2 min to start)
  • 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 E2B when

your code creates many short sandboxes for agents or users, needs memory pause and forks, or must run in the US or APAC.

  • Built for agents you drive from code. Useful when your app creates sandboxes for agents or users: SDKs, templates and a high start rate, not an editor.
  • Memory pause, wake on request and memory forks. Useful for short jobs that sleep between requests: a paused sandbox comes back in about a second with processes running.
  • Outbound rules and an open-source runtime. E2B can limit which hosts a sandbox reaches, and its Apache-2.0 runtime can run in your own cloud on Enterprise.

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 ready.
  • A full editor for people. Useful when humans do the work: VS Code in the browser or on your machine, JupyterLab and port forwarding.
  • 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

If what you are really running is coding agents that work for hours, both E2B and Codespaces cut them off on a timer and neither gives them /dev/kvm. boat gives each agent a full VM that runs until you stop it, with coding agents built in and keys kept outside.

No session cap

E2B stops a sandbox at 24 hours on Pro and Codespaces at 12, even while in use. Your code has to pause or restart them, and on Codespaces running processes end at each stop. boat has no cap on paid plans.

A full VM with /dev/kvm and a desktop

E2B does not support nested virtualization and Codespaces does not document /dev/kvm, so Android emulators and microVMs will not start. Codespaces also has no desktop. boat has /dev/kvm, systemd, Docker and a 60fps desktop.

Agents and keys handled for you

On Codespaces you start and watch each agent over SSH, and API keys sit in environment variables any code can read; E2B's secret injection is private beta. boat preinstalls the agents and keeps keys in a credentials proxy.

Use boat when your agents do real 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 never cut them off. Compare it one to one: boat vs E2B and boat vs GitHub Codespaces.

Questions people ask

Is E2B cheaper than GitHub Codespaces?

Not usually in our scenarios. One coding agent on workdays is $202 a month on E2B against $51 on Codespaces, and 300 user sandboxes are $1,395 against $850, though Codespaces is not confirmed to run 300 at once. 50 agents in parallel are $2,773 on E2B against $3,019 on Codespaces. boat is $20, $200 and $317 for those three.

Which is faster, E2B or GitHub Codespaces?

There is no comparable CPU score for Codespaces. E2B did 12.61 runs per second on the hpc-sandbox-benchmarks Node.js test at 4 vCPU / 8 GB, and boat did 26.69 in the same run. For start time, E2B boots from a snapshot, while a codespace builds a dev container on a new VM.

Can I run an AI agent 24/7 on E2B or Codespaces?

Not in one session on either. E2B stops a sandbox after 24 hours on Pro, and a codespace stops after 12 hours even while in use, plus 30 idle minutes by default. boat has no session cap on paid plans.

Can E2B and Codespaces run Docker?

Both run Docker inside: E2B sandboxes have root, and Codespaces has Docker and sudo in the dev container. Neither offers /dev/kvm for Android emulators or VMs. Every boat machine has Docker, systemd and /dev/kvm.

Can I run Claude Code in E2B or GitHub Codespaces?

Yes. E2B has templates and guides for Claude Code run through its command API, and in Codespaces you install it yourself with your key as an environment variable. boat preinstalls Claude Code, Codex and others and keeps real keys outside the sandbox.

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