How to run Claude Code in the cloud (and keep it running when your laptop sleeps)
November 9, 2026 · 4 min read · By the bestcloudagents team
bestcloudagents is operated by Replicas, one of the products discussed here. Every claim about a product comes from its own docs or pricing; see how we score.
Claude Code runs on your laptop. Close the lid and it stops. That's fine when you're pairing with it, and frustrating when you wanted it to finish a migration overnight, work three tickets at once, or pick up a bug report from Slack while you're in a meeting.
There are four common ways to run Claude Code in the cloud. Which is right depends on how many engineers are involved, where your code lives, and how you want to pay for the model. (bestcloudagents is operated by Replicas, which is one of the four.)
1. Claude Code on the web
Anthropic's own cloud. Start a session at claude.ai/code, from the Code tab in the Claude app, or with claude --cloud "your task" in a terminal. Each session runs in an Anthropic-managed Ubuntu VM, and claude --teleport brings a finished session back to your terminal.
What to know before you rely on it:
- It's included with Claude Pro, Max and Team plans, and eligible Enterprise seats. There's no separate VM charge.
- It doesn't accept API keys or AWS Bedrock. You sign in with a Claude account.
- It works with GitHub. GitLab and Bitbucket repos can be sent as a bundle, but the session can't push back.
- Network access defaults to an allowlist of package registries, GitHub and cloud SDKs; you can change it.
- When it's done it pushes a branch, and you create the pull request.
Use it if you use only Claude Code, your code is on GitHub, and you already pay for Claude plans. It's the least effort of the four.
2. A rented VM with tmux
Rent a Linux server, install Claude Code, and run it inside tmux so it survives you disconnecting. It works with an API key or a Claude login, on any git host.
The catches are all operational. Give the VM enough memory (Claude Code's docs ask for 4 GB or more). Set a git name and email and log in to GitHub on the box, or the agent will make the fix and then fail to commit. Answer Claude Code's first-run questions once before leaving it unattended. And you own patching, cleanup and keeping one task from stepping on another.
Use it if you're one engineer who wants full control and doesn't mind looking after a server.
3. GitHub Actions
Anthropic publishes claude-code-action. Install it, add an ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN secret, and mention @claude in an issue or PR comment. It works on a branch and posts a link to a pre-filled pull request. You pay for tokens plus runner minutes after GitHub's free allowance.
Use it if the trigger is always an issue or a PR comment and the tasks are short.
4. Replicas
Replicas runs Claude Code in its own isolated Linux VM for each task, built from an environment you configure once: repositories cloned, dependencies preinstalled with warm hooks, MCP servers, skills and secrets in place. The agent can start your services, drive a real browser to check its own work, and open the pull request itself.
Claude Code signs in with your Claude plan or an Anthropic API key, AWS Bedrock or Microsoft Foundry, so model usage stays on your account. Tasks start from Slack, Linear, GitHub or GitLab comments, the dashboard, the API, or automations. Codex, Cursor, OpenCode, Pi and Muse Code run the same way, so you can switch agent per task.
Compute is billed per workspace minute by VM size, and a sleeping workspace costs nothing. Plans start at $50 a month including $50 of usage, and the free trial has $100 of usage with no card. Check replicas.dev/pricing for current rates.
Use it if more than one engineer is involved, work should start from Slack or Linear, your code is on GitLab, you want API-key or Bedrock billing, or you use more than one agent.
Side by side
| Claude Code on the web | Rented VM | GitHub Actions | Replicas | |
|---|---|---|---|---|
| Where it runs | Anthropic VM | Your server | GitHub runner | VM per task |
| API keys or Bedrock | No | Yes | Yes | Yes |
| Claude plan login | Yes | Yes | OAuth token | Yes |
| GitLab | Bundle only, no push | Yes | No | Yes |
| Starts from Slack or Linear | Check with Anthropic | Build it | No | Yes |
| Opens the PR | You do | If configured | Pre-filled PR link | Yes |
| Other agents | No | Install them | Separate actions | Yes |
What changes for a team
For one engineer, the question is "how do I keep my session alive?" For a team, it becomes "how do we hand work to agents the way we hand it to each other?" That means starting from the tracker or chat where work already lives, a clean machine per task so nothing leaks between runs, a pull request at the end that goes through normal review, and a record of what each run cost.
If that's where you're heading, see the full Replicas vs Claude Code on the web comparison, or take the chooser and let your answers decide.
Get a second opinion on your shortlist
Tell us what you're weighing and an engineer from the Replicas team, who operate this site, will reply by email. We'll point you to whichever option fits, including when that isn't Replicas.
Keep reading
The best cloud coding agents for engineering teams in 2026
Replicas, Devin, Cursor Cloud Agents, Claude Code on the web, Codex cloud and OpenCode compared on what matters to a team lead, with the cases where each one wins.
Why your team needs a multi-harness cloud coding agent platform
What a multi-harness platform is, why the agent is becoming a commodity while the environment is not, and what to check before you commit to one agent's cloud.
Isolated VM environments for cloud coding agents, explained
Why cloud coding agents should get a fresh, isolated VM per task, how that compares with containers and shared machines, and what a good agent environment includes.