Coding Agents in the Cloud: Parallel, Overnight, Own Keys, Checkpoints
Updated November 21, 2026 .md
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).
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 | 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 | 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 | 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? | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 or Codex.
- Several agents at once: one VM each. Not sure you need VMs? Read worktrees or VMs first.
- Their branches collide: merge conflicts. Their data collides: a database each.
- Nobody watching: overnight runs, plus a state file that survives crashes.
- Your own model key, open models: OpenRouter with OpenCode.
- Undo a bad run: checkpoints.
- Review more than the diff: everything it changed outside git.
- Score an agent on repo setup: a fresh sandbox per attempt.
- Done with the sandbox: what to keep before you delete it.
The guides in this cluster#
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 covers signing in on a headless VM, unattended codex exec, IDE access over SSH and sbx prompt --provider codex.
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? reproduces what worktrees share on one machine and gives a decision table for when they are enough.
Handle merge conflicts between parallel 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 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 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 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 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 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 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 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 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.
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 …):
/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. 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 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#
More guides
For running AI-written code we rank Sandboxer, Freestyle and E2B first: each gives code its own VM with an API or SDK and can pause with memory. Pick Daytona for Windows or GPUs, Modal or Northflank for GPUs at scale, E2B or Northflank to run in your own cloud, and Vercel Sandbox if your app lives on Vercel.
For coding agents we rank Sandboxer first: a full Ubuntu VM with Claude Code and Codex preinstalled, Docker, and stop-and-resume that keeps the agent's session in memory. Freestyle and Amp Orbs also keep memory across pauses. Pick E2B for prebuilt agent templates on open source, Docker Sandboxes for free local runs, and Codespaces if you live in GitHub.
The best Daytona alternatives depend on why you're switching. For a full Linux microVM on every sandbox with memory-saving stop and Docker, we rank Sandboxer first. E2B suits open source and self-hosting, Modal massive short-job fleets, Northflank bring-your-own-cloud with GPUs, and Vercel Sandbox apps on Vercel.
If you're leaving E2B for longer sessions or a fuller machine, we rank Sandboxer first, then Freestyle: both give each sandbox a full Linux VM that keeps memory across pauses, with Docker and no short session cap. Pick Daytona for Windows or GPUs, Northflank for bring-your-own-cloud, and stay on E2B if you need open source.