What is runspace?
runspace runs commands inside disposable GitHub Codespaces instead of on your local machine. It provides a command-line interface for developers and an MCP server that lets AI agents create sandboxes, run commands, and return changes. A sandbox checks out a branch pushed to GitHub, and runspace can send its output and a patch back to the host. The product is designed for builds, tests, scripts, and other repository work that you want to run away from your machine.
runspace Features:
Disposable Sandboxes: Create a GitHub Codespace for a repository and branch, then delete it when the work is done.
Remote Commands: Run commands, scripts, or an interactive shell on the Codespace VM through SSH over its Dev Tunnel.
Patch Export: Collect commits, edits, and new files made since sandbox creation into a single patch on the host.
One-Command Runs: Run a command in a fresh sandbox, pass its exit code through, and delete the sandbox afterward.
CLI and MCP: Use the same seven commands from the terminal or through the MCP server for an AI agent.
Sandbox Boundaries: runspace manages Codespaces with the display name runspace, and deleting one leaves no sandbox state behind.
runspace Benefits:
Clean Host: Builds, tests, and installs happen on a Codespace VM, avoiding changes to the host machine from those commands.
Reviewable Changes: A single patch gives you a way to inspect sandbox edits before applying them to your local checkout.
Repeatable Agent Work: Using the same commands for people and agents makes it easier to keep their sandbox workflows consistent.
Less Cleanup: A one-command run removes its temporary environment automatically, so you do not need to delete that sandbox yourself.
Separate Workspaces: Disposable environments let you run repository tasks without mixing their files with work already on your machine.
Use Cases:
Run Test Suites: Run a repository's test command in a fresh Codespace and receive its output and exit code without running the tests locally.
Format a Branch: Run a formatting script against a branch pushed to GitHub, export its edits as a patch, and review them before applying.
Build in Isolation: Execute build scripts in a disposable VM when you want to keep their dependencies and generated files off your host.
Delegate Coding Tasks: Give an AI agent MCP access to create a sandbox, run repository commands, export a patch, and delete the environment.
Check Agent Changes: Review a patch produced by an agent before bringing its changes into your working tree.

