Run Claude Code in a cloud VM, on your plan
Give Claude Code its own Linux VM in the cloud, signed in with your Claude plan, while the token stays outside the VM. Install, sign in, hand it a task, fork it.
3 min read
Claude Code is happiest with a whole machine to itself: a shell, Docker, a package manager and permission to break things. Your laptop is a poor place for that once you want three of them running at once, or one running while the lid is closed.
This guide puts Claude Code in its own Zode VM, signed in with your Claude plan, and hands it a task. It takes about five minutes.
What you get
- A full Linux VM per agent: Ubuntu 24.04, its own kernel, Docker and the usual toolchains. Root inside is root in that VM only.
- Claude Code, Codex, OpenCode, pi and Kimi Code installed in every sandbox.
- Your Claude login kept on the host. The VM only ever sees a placeholder.
- Stop to hibernate. Memory and disk are kept, compute billing stops, and running processes pick up where they were when you start it again.
1. Install the CLI and sign in
curl -fsSL https://zode.dev/install | sh
zode loginzode login opens your browser and prints a code. Confirm it and the CLI saves an API key for your workspace. You need a card saved in the console under Billing before your first sandbox; saving the first card adds a one-time $10 credit.
2. Connect your Claude subscription
In the console, open Agents & proxying, then Claude Code, and click Sign in on the subscription row. A tab opens on Claude's own sign-in page. Approve, then paste the code it shows back into the console.
Behind that button, Zode runs the official claude setup-token in a short-lived sandbox and deletes it when you finish, so you don't need a sandbox first. Zode never sees your password and holds no OAuth client of Anthropic's.
Pro, Max, Team and Enterprise plans all work. Calls count against your plan's limits, not an API bill. Prefer API keys? Paste an Anthropic key instead; Bedrock and Vertex are supported as well.
3. Give it a task
zode prompt --new --size large "upgrade the test suite to vitest"--new makes a sandbox first. zode prompt signs the agent in the way you chose and streams what it does. The agent runs unattended with its own permission prompts off, because nobody is inside the VM to answer them, and that is exactly why it belongs in a VM rather than on your laptop.
Already have a sandbox with your repo in it? Point at it by name:
zode prompt box "fix the failing tests"
zode prompt box --agent codex "add a /healthz endpoint"Want to watch or take over? zode ssh box gives you a login shell in the same machine.
4. Fork to try two ideas at once
When the agent has the repo installed and the tests running, fork the machine. The child gets a copy of the parent's disk and memory; processes running in the parent are running in the child at the same point.
zode fork box box-try-2 --branch try-2
zode prompt box "make the cache an LRU"
zode prompt box-try-2 "make the cache a TTL map"A fork takes about 20 seconds today (the docs show a real one at 19.8 s). The child gets fresh random state, the current time and a new network address, so the two copies never collide. Keep the one that wins and zode rm the other.
Where your login lives
This is the part we care about most. The Claude token stays on the host. Each sandbox gets its own placeholder, and the host's egress proxy swaps in the real token only on requests to api.anthropic.com. A placeholder read from inside one VM is useless anywhere else, including in another of your own sandboxes.
Your login is also yours alone. It is sealed, never listed to other workspace members, and used only in sandboxes you created or forked. A teammate who opens a shell in your sandbox does not get it.
The same mechanism protects any other key you give the agent. We wrote up the reasoning in Keep API keys out of your AI agent's sandbox.
Stop paying when it is idle
zode stop box # hibernate: memory and disk kept, compute billing stops
zode start box # back where it was
zode rm box-try-2 # delete for goodCompute is billed per second only while a sandbox runs. Storage is free for the first 48 hours of every sandbox, then billed on its disk size until you delete it, so delete the forks you no longer need. Current prices are on the pricing section.
Next steps
- Run several agents in parallel: one
zode prompt --newper task. - Drive it from code with the TypeScript SDK,
npm i @zodedev/sdk. - Read the agents docs for key failover, default models and spend caps.
Try it: install the CLI, or start free in the console.
curl -fsSL https://zode.dev/install | sh