Cube vs GitHub Codespaces

Codespaces is a great dev environment for a repository, one session at a time. Cube is a computer your agents can keep working on after you've gone.

Published

The short version

GitHub Codespaces gives you a development container for a repository, configured by its devcontainer.json, that opens in the browser, VS Code or over gh codespace ssh. It’s built for working on a repository while you’re at the keyboard: it stops after a period of inactivity, and every codespace has a maximum lifetime of 12 hours.

Cube is a Linux computer in the cloud for your coding agents, with an app for your Mac, the browser and your phone. It keeps running when you close your laptop, holds all your repositories with a Git worktree per task, and only stops when you pause it.

Side by side

GitHub CodespacesCube
Built forA dev environment per repositoryA computer for your agents
When it stopsAfter 30 idle minutes by default (4 hours at most), and always after 12 hoursOnly when you pause it, or your credit runs out
Running processesStop when the codespace stopsKeep running when you close the app or your laptop
Stopped or pausedFiles kept; deleted after up to 30 days, even with unpushed changesFiles kept on its disk until you delete the computer
RepositoriesOne per codespaceAll your repos on one computer, a worktree per task
Sizes2 cores, 8 GB RAM up to 32 cores, 128 GB RAM2 to 32 shared vCPUs, 2 GB RAM and 15 GB SSD per vCPU
Price$0.18 to $2.88 an hour by size, plus $0.07 per GB-month of storage; free core-hours on personal plans$6 per vCPU a month running, $2 paused; from $12 a month, billed per second
AgentsInstall your own in the container22 agents, including Claude Code, Codex and OpenCode, install in one click
Connect fromBrowser, VS Code, GitHub CLI and SSHMac app, any browser, phone, and SSH

The difference that matters for agents

A coding agent is most useful on long tasks: a refactor, a test suite to fix, a loop that runs overnight. In a codespace, those tasks race two clocks. The idle timeout counts typing and terminal activity, and GitHub doesn’t say that a quiet background job keeps a codespace awake. And at 12 hours the codespace stops however busy it is, taking running processes with it.

GitHub’s own Copilot coding agent doesn’t run in Codespaces either: it runs in a short-lived GitHub Actions environment.

When to choose Codespaces

  • Your team already defines its environment in devcontainer.json and wants a fresh, identical setup per repository.
  • You work in VS Code or the browser and stop when you stop.
  • Your usage fits the free core-hours on a personal plan.

When to choose Cube

  • Your agents run for hours, overnight or on a loop, and need to keep going after you close your laptop.
  • You work across several repositories and want them, and your agents’ logins and tools, on one computer.
  • You want to check on your agents from your phone, and come back to everything where you left it.

Questions

Can a GitHub codespace run an AI agent overnight?

Not reliably. As of October 2026, a codespace stops after an idle timeout (30 minutes by default, 4 hours at most) and has a maximum lifetime of 12 hours regardless of your settings. When it stops, running processes stop with it.

What happens to a stopped codespace?

Saved files are kept while it's stopped, and you pay for storage. Stopped codespaces are deleted automatically after a retention period, 30 days by default and at most, even if they contain unpushed changes.

How much does GitHub Codespaces cost?

Compute is billed per hour by machine size, from $0.18 an hour for 2 cores to $2.88 for 32 cores, plus $0.07 per GB-month of storage. Personal accounts get 120 core-hours a month on GitHub Free and 180 on GitHub Pro at no charge.

When should I choose Codespaces?

When you want a ready dev environment per repository that opens in the browser or VS Code, especially for a team that already uses dev containers, and your work happens while you're at the keyboard.

Sources

A new home
for your agents.

Download for Mac

Enter your email for the Cube download link. Open it on a Mac with Apple Silicon.