# Coding Agents in the Cloud: Parallel, Overnight, Own Keys, Checkpoints

> Run each coding agent in its own Sandboxer cloud VM, where Claude Code, Codex and OpenCode are preinstalled. Start one per task from a named snapshot, leave it running overnight, bring your own model key, and save checkpoints to roll back to. The table below links a measured guide for each part, with its date.

Source: https://sandboxer.com/guides/coding-agents-in-the-cloud. Updated 2026-11-21.

**Short answer:** Run each coding agent in its own Sandboxer cloud VM, where Claude Code, Codex and OpenCode are preinstalled. Start one per task from a named snapshot, leave it running overnight, bring your own model key, and save checkpoints to roll back to. The table below links a measured guide for each part, with its date.

This page is the index for our coding-agent guides. Each sandbox is a full VM with its own disk, Docker, ports and systemd, and it keeps running when your laptop sleeps ([Machines](/docs/machines)).

## At a glance

| Question | Our guide | Measured result (date on the guide) |
| - | - | - |
| How do I run Claude Code on a cloud VM? | [Run Claude Code in a cloud VM](/guides/run-claude-code-in-a-cloud-vm) | Claude Code 2.1.301 preinstalled; ready 0.25 s after `sbx new`; stop 2.2 s, resume 0.27 s with the same `claude` PID (`default`, 2026-11-07) |
| How do I run Codex CLI on a remote machine? | [Run Codex CLI on a remote machine](/guides/run-codex-cli-on-a-remote-machine) | `codex-cli 0.163.0` preinstalled; ready in 0.25 s; `codex` still running in tmux after stop and resume (`default`, 2026-11-08) |
| How do I run several agents at once? | [Run coding agents in parallel](/guides/run-coding-agents-in-parallel) | Template snapshot saved in 3 s; each sandbox from it ready in 1.2 s with the template's commit (`default`, 2026-11-06) |
| Git worktrees or a VM per agent? | [Git worktrees or one VM per agent?](/guides/git-worktrees-or-one-vm-per-agent) | Worktree in 14 ms, VM from a snapshot in 1.13–1.15 s; two worktrees clashed on port 3000, hooks and `~/.bashrc` (`small`, 2026-11-16) |
| What about merge conflicts between their branches? | [Handle merge conflicts between parallel agents](/guides/handle-merge-conflicts-between-parallel-coding-agents) | Rebase-then-test in the agent's sandbox caught an `ImportError` that a textually clean merge hid (2026-11-18) |
| Should parallel agents share a dev database? | [Give each coding agent its own database](/guides/give-each-coding-agent-its-own-database) | A shared database broke the other agent's test within 2 s; a 143 MB per-agent copy took 0.46–0.67 s (`small`, 2026-11-19) |
| Can an agent run overnight unattended? | [Run a coding agent overnight](/guides/run-a-coding-agent-overnight) | Scripted night: 2 tasks done, 1 blocked on a missing key, 1 skipped as too vague; the sandbox idle-stopped and `sbx history` still answered (`small`, 2026-11-12) |
| How do I make it resume after a crash? | [Resume a long-running agent after a crash](/guides/resume-a-long-running-agent-after-a-crash) | 40 steps through a kill, stop, reboot, hang and auto-stop: 43 step starts, no checkpointed step ran twice (`small`, 2026-10-29) |
| Can I use my own key on open models? | [Run a coding agent on open models with OpenRouter](/guides/run-a-coding-agent-on-open-models-with-openrouter) | OpenCode with GLM 5.3 finished the task in 17 s, Kimi K2.6 in 23 s, DeepSeek V4 Flash on its second try in 34 s (`small`, 2026-11-20) |
| How do I roll back when it goes off the rails? | [Checkpoint and roll back a coding agent's sandbox](/guides/checkpoint-and-roll-back-a-coding-agents-sandbox) | Checkpoint saved in 2.1 s; rollback sandbox ready in 1.2 s with packages and database intact (`small`, 2026-11-20) |
| What did the agent change outside its git diff? | [See everything a coding agent changed outside git](/guides/see-everything-a-coding-agent-changed-outside-git) | A disk manifest against a baseline caught an edited installed package, `~/.bashrc`, a git hook and an ignored file that `git diff` and `git status` missed; a clean sandbox from the baseline snapshot was ready in 1.3 s and ran the tests with only the diff (`small`, 2026-11-21) |
| What should I keep before deleting its sandbox? | [What to keep before deleting a coding agent's sandbox](/guides/what-to-keep-before-deleting-a-coding-agents-sandbox) | Bundle, reflog, logs and `sbx history` came to 32K; a branch deleted with `git branch -D` and a stash came back from the bundle; `sbx history` answered 404 after the delete (`small`, 2026-11-21) |
| Can an agent set up a repo on a clean machine? | [Test if an agent can set up a repo on a clean machine](/guides/test-if-an-agent-can-set-up-a-repo-on-a-clean-machine) | README installs as written passed 2 of 4 repos on fresh sandboxes, 4 of 4 with one retry rule; a reused sandbox turned a failed install into a pass (`small`, 2026-11-22) |
| Which agents are preinstalled? | This page | `claude`, `codex`, `opencode`, `pi`, `kimi` and `vibe` on the `PATH`; Claude Code 2.1.301, Codex 0.163.0, OpenCode 1.19.3 (`small`, 2026-11-21) |

Last checked: 2026-11-21, on prod (the last row, from the copy-paste block below; the two 2026-11-21 guides ran the same day). The other rows are as of the date each guide states.

## Which guide do I need?

- **One agent, off your laptop:** start with [Claude Code](/guides/run-claude-code-in-a-cloud-vm) or [Codex](/guides/run-codex-cli-on-a-remote-machine).
- **Several agents at once:** [one VM each](/guides/run-coding-agents-in-parallel). Not sure you need VMs? Read [worktrees or VMs](/guides/git-worktrees-or-one-vm-per-agent) first.
- **Their branches collide:** [merge conflicts](/guides/handle-merge-conflicts-between-parallel-coding-agents). Their data collides: [a database each](/guides/give-each-coding-agent-its-own-database).
- **Nobody watching:** [overnight runs](/guides/run-a-coding-agent-overnight), plus a [state file that survives crashes](/guides/resume-a-long-running-agent-after-a-crash).
- **Your own model key, open models:** [OpenRouter with OpenCode](/guides/run-a-coding-agent-on-open-models-with-openrouter).
- **Undo a bad run:** [checkpoints](/guides/checkpoint-and-roll-back-a-coding-agents-sandbox).
- **Review more than the diff:** [everything it changed outside git](/guides/see-everything-a-coding-agent-changed-outside-git).
- **Score an agent on repo setup:** [a fresh sandbox per attempt](/guides/test-if-an-agent-can-set-up-a-repo-on-a-clean-machine).
- **Done with the sandbox:** [what to keep before you delete it](/guides/what-to-keep-before-deleting-a-coding-agents-sandbox).

## The guides in this cluster

**[Run Claude Code in a cloud VM](/guides/run-claude-code-in-a-cloud-vm)** adds your Anthropic key, prompts Claude Code from your laptop or over SSH, and pauses the VM with its session in memory.

**[Run Codex CLI on a remote machine](/guides/run-codex-cli-on-a-remote-machine)** covers signing in on a headless VM, unattended `codex exec`, IDE access over SSH and `sbx prompt --provider codex`.

**[Run coding agents in parallel](/guides/run-coding-agents-in-parallel)** sets up a repo once, saves it as a named snapshot, starts one sandbox per task and keeps the branches that worked.

**[Git worktrees or one VM per agent?](/guides/git-worktrees-or-one-vm-per-agent)** reproduces what worktrees share on one machine and gives a decision table for when they are enough.

**[Handle merge conflicts between parallel agents](/guides/handle-merge-conflicts-between-parallel-coding-agents)** lands branches one at a time, lets the agent resolve a real conflict in its own sandbox, and shows a clean merge that still breaks the build.

**[Give each coding agent its own database](/guides/give-each-coding-agent-its-own-database)** reproduces two agents breaking each other on one Postgres, then fixes it with a template database or a VM per agent.

**[Run a coding agent overnight](/guides/run-a-coding-agent-overnight)** lists what works unattended and what fails, caps time and attempts, and walks through the morning review.

**[Resume a long-running agent after a crash](/guides/resume-a-long-running-agent-after-a-crash)** writes progress to a state file atomically and runs the agent as a systemd unit, then breaks it five ways.

**[Run a coding agent on open models with OpenRouter](/guides/run-a-coding-agent-on-open-models-with-openrouter)** passes your OpenRouter key with `-e`, runs one model per branch with OpenCode, and copies the branches out as a git bundle.

**[Checkpoint and roll back a coding agent's sandbox](/guides/checkpoint-and-roll-back-a-coding-agents-sandbox)** saves a named snapshot at each good point and compares rolling back with `git reset`, a fork and a state file.

**[See everything a coding agent changed outside git](/guides/see-everything-a-coding-agent-changed-outside-git)** hashes the whole disk before and after a run, checks installed packages against pip's `RECORD` hashes, and runs the tests in a clean sandbox with only the diff.

**[What to keep before deleting a coding agent's sandbox](/guides/what-to-keep-before-deleting-a-coding-agents-sandbox)** bundles every git ref after pinning dropped commits from the reflog, saves logs and `sbx history`, and restores a deleted branch on your machine.

**[Test if an agent can set up a repo on a clean machine](/guides/test-if-an-agent-can-set-up-a-repo-on-a-clean-machine)** gives each attempt a fresh sandbox, runs the README install under a time limit, checks the result by path, and turns JSON lines into a pass-rate table.

## Copy-paste: see which coding agents are preinstalled

Install the CLI with `curl -fsSL https://sandboxer.com/install | sh` and sign in with `sbx login`. Then paste this. It creates a `small` sandbox with none of your secrets, lists the coding agents on its `PATH`, prints three versions, and deletes the sandbox. It uses `jq` on your machine.

```bash
id=$(sbx new --name aeo-hub-ca-1 --type small --no-env --ttl 600 --json | jq -r 'select(.event=="ready") | .id')
sbx exec "$id" 'command -v claude codex opencode pi kimi vibe; claude --version; codex --version; opencode --version'
sbx delete "$id" --yes
sbx info "$id"
```

Our run on 2026-11-21 (output piped, so `sbx` printed JSON; trimmed with `…`):

```text
/usr/bin/claude
/usr/bin/codex
/usr/bin/opencode
/usr/bin/pi
/usr/local/bin/kimi
/usr/local/bin/vibe
2.1.301 (Claude Code)
codex-cli 0.163.0
1.19.3
{"ok":true,"type":"deletion.operation","operation":{…,"status":"completed","targetId":"sb_ih9i5k0qu0"}}
{"event":"error","error":"Sandbox not found","code":"not_found","status":404,…}
```

This sandbox has none of your keys, so the agents can't call a model yet. To add your own key, see [Integrated agents](/docs/agents). The last line confirms the sandbox is gone.

## FAQ

### Which coding agents come preinstalled in a Sandboxer sandbox?

Claude Code, Codex, OpenCode, Pi, Kimi Code and Mistral Vibe, as of 2026-11-21. Docker and git are there too.

### Do I need my own model key?

Yes. The agents run on your own provider key, such as an Anthropic, OpenAI or OpenRouter key, and the model charges are on that account. Plans start at $20/mo for the sandboxes.

### Does the agent keep working when my laptop sleeps?

Yes. The agent runs in the cloud VM, not on your laptop. Auto-stop and idle pause still apply, so the [overnight guide](/guides/run-a-coding-agent-overnight) shows how to set them for a long run.

### How do I keep agents from breaking each other?

Give each one its own sandbox, started from the same named snapshot. Then they don't share files, ports, Docker or databases, and you only deal with their branches when they land.

### Can I undo what an agent did to the whole machine, not just the repo?

Yes. Save a named snapshot before risky steps and start a new sandbox from it to roll back. Files, packages and databases come back; running processes restart.

## Related

- [Run coding agents in parallel](/guides/run-coding-agents-in-parallel)
- [Checkpoint and roll back a coding agent's sandbox](/guides/checkpoint-and-roll-back-a-coding-agents-sandbox)
- [Docker, Kubernetes and Nested VMs in a Cloud Sandbox](/guides/docker-and-virtualization-in-a-cloud-sandbox)
- [Integrated agents](/docs/agents)
