· 6 min read
The best way to work with Claude Code in the cloud (6 options compared)
Does Claude Code run locally or in the cloud? Both. The six ways to run Claude Code in the cloud: cloud sessions, Remote Control, scheduled tasks, GitHub Actions, your own VPS and a hosted workspace. What each costs on your plan, and which one fits your job.
Claude Code runs on your computer by default, and it can also run in the cloud, where the work keeps going with your laptop closed. There are six ways to do it: cloud sessions at claude.ai/code, Remote Control, scheduled tasks, GitHub Actions, your own VPS, or a hosted workspace such as Kavela. The right one depends on what the job needs from you.
Does Claude Code run locally or in the cloud?
The model always runs on Anthropic's servers. What runs locally is everything around it: the claude process, the shell commands it runs, the files it edits and the tools it calls. That loop is the part that stops when your laptop sleeps.
Running Claude Code in the cloud means moving that loop onto a machine that stays on. A task then keeps going after you close the lid, you can check on it from your phone, and it can start on a schedule with nobody at a keyboard.
The trade-off is that a cloud machine starts without your local files, logins and tools. You either bring them along or pick an option that keeps them. Each of the six options below makes that trade differently.
What are the ways to run Claude Code in the cloud?
| Option | Where Claude Code runs | How it starts | Keeps going with your laptop closed | Best for |
|---|---|---|---|---|
| Remote Control | Your own computer | claude remote-control, then the Claude app or claude.ai/code | No. Your computer has to stay on | Steering local work from your phone |
| Cloud sessions | A virtual machine Anthropic manages | claude.ai/code, the Claude app or claude --cloud | Yes | One-off tasks on a GitHub repo |
| Scheduled tasks | Anthropic's cloud | A schedule, an API call or a GitHub event | Yes | Recurring work on a repo |
| GitHub Actions | A GitHub runner | @claude mentions, repo events or cron | Yes | Work that starts from pull requests and issues |
| Your own VPS | A server you rent | SSH and tmux | Yes | Full control, private networks, heavy builds |
| A hosted workspace (Kavela) | A cloud computer for each agent | A message, a schedule or an event | Yes | Work across your tools, checked and approved |
Remote Control is on the list because it is usually the first thing people try, but the session still runs on your machine. Anthropic's docs put it plainly: "your computer has to stay on and the claude process has to keep running."
How do Claude Code cloud sessions work?
A cloud session runs Claude Code in a fresh virtual machine that Anthropic manages: Ubuntu 24.04 with about 4 vCPUs, 16 GB of RAM and 30 GB of disk, your repository cloned and common toolchains installed. You start one at claude.ai/code, from the Code tab in the Claude app, or with claude --cloud "your task" in a terminal. Cloud sessions are available on Pro, Max, Team and Enterprise plans.
Four things matter in practice:
- GitHub comes first. Cloning and pull requests need GitHub. A GitLab or Bitbucket repo can be sent as a local bundle, but the results can't be pushed back.
- Handoff from the terminal goes one way.
claude --teleportpulls a cloud session down into your terminal. You can't push a running terminal session up to the cloud from the CLI. - Idle machines pause. After a few minutes with nothing to do, the VM pauses with its files saved. A paused VM can later be reclaimed, and background processes are not restored.
- The network is allowlisted. The default level reaches package registries and GitHub. Anything else needs a custom allowlist.
Setup scripts, environment variables, secrets and network levels are covered in the guide to the Claude Code cloud environment.
Can I use Claude Code from my phone?
Yes, two ways. The Code tab in the Claude app starts and steers cloud sessions, which keep running after you lock the phone. Remote Control connects the same app to a session on your computer, so your local files and tools stay available, and your computer has to stay awake.
Remote Control is also where the loudest complaints are. An open issue about connections that drop "with no indication on either side that the connection is dead" has 110 reactions (#34255), and another reports sessions dying after about 20 minutes idle (#32982).
Setup, push notifications and the fixes for dropped sessions are in how to use Claude Code from your phone.
Should I run Claude Code on my own VPS?
A VPS is a machine that stays on, with the tools, network access and compute you choose. You SSH in, start Claude Code inside tmux, detach, and the session survives your laptop closing.
Signing in is the first hurdle. A Pro or Max login normally opens a browser, which a server doesn't have. One open issue calls it "impossible to authenticate on headless environments (VMs, SSH sessions, containers, cloud instances) when using a Pro/Max subscription". The documented route is claude setup-token, which prints a one-year token you set as CLAUDE_CODE_OAUTH_TOKEN on the server.
The ongoing cost is upkeep: you update the server, renew the token every year and keep the tmux sessions alive. A Hacker News thread from October 2026, "Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling", reached 170 points arguing about exactly that.
The full setup is in Claude Code on a VPS.
How do I keep Claude Code running 24/7?
Pick by what starts the work:
- A schedule, on a GitHub repo: cloud scheduled tasks, created with
/scheduleor at claude.ai/code/routines. The shortest interval is one hour. - Repo events: GitHub Actions with
anthropics/claude-code-action, triggered by@claudementions, pull requests or issues. - Continuous work with your own tools: a VPS that runs headless
claude -pjobs from cron. - A few hours of polling inside an open session:
/loop, which needs your machine on and expires after 7 days.
What each one needs, and what breaks when nobody is watching, is in how to run Claude Code 24/7. Cron and GitHub Actions recipes are in the Claude calendar guide.
What does running Claude Code in the cloud cost?
| Option | What you pay |
|---|---|
| Cloud sessions | Your plan's usage, shared with all your other Claude use |
| Scheduled tasks | Your plan's usage, with a cap of 100 scheduled runs an hour per account |
| GitHub Actions | Actions minutes, plus API tokens with an API key, or your plan's usage with a setup-token login |
| Your own VPS | The server, plus your plan's usage or API tokens |
| Anthropic Managed Agents (API) | Tokens, plus $0.08 per session-hour while running |
| Kavela | Your Claude plan pays for the model. Kavela charges 1 credit ($0.01) per minute an agent works, and waiting on you costs nothing. Plans start at $30 a month, billed annually |
The cost that catches people out is the usage limit. Parallel cloud sessions draw down the same limit as everything else, so it arrives sooner and usually mid-task. An open request to continue after the limit resets has 215 reactions (#13354); its author writes that "the workflow now stops for a few hours".
Which option should I pick?
- You're at your desk mid-task and want to step away: Remote Control.
- A one-off task on a GitHub repo: a cloud session.
- A recurring job on a repo: a scheduled task, or GitHub Actions when it starts from pull requests and issues.
- The job needs a private network, your own tools or more compute than the cloud VM: your own VPS.
- The job spans your other tools (email, docs, a CRM, a signed-in browser), needs your approval at some steps, and has to be checked before it reaches you: a hosted workspace like Kavela.
The options combine well: a cloud option for repo work, and something that stays on for everything else.
What goes wrong when Claude Code runs without you?
Running in the cloud fixes the closed laptop. It also brings problems you never see at your desk:
- A green run can still be a failed job. Anthropic's docs on scheduled tasks say a green status means the session exited without an infrastructure error, and "does not mean the work your prompt describes succeeded."
- Nobody is there to approve. Cloud scheduled tasks run without permission prompts, and included connectors can write without asking. On your own machine, an unattended task can stall on an approval nobody gives (#101851).
- Logins lapse. If a scheduled task's GitHub connection expires, it skips runs for up to 72 hours, then turns itself off.
- Results land where nobody looks. A run that finished overnight is only useful if someone reads it.
Three habits fix most of this, whichever option you pick. Write what "done" means into the prompt. Make the run prove it with something checkable, such as a passing test run or a file in a known place. And have something other than the worker check the result.
How does Kavela run Claude Code in the cloud?
Kavela gives each agent its own cloud computer (2 vCPU, 8 GiB) with a shell, files, git and a real browser, and runs the unmodified Claude Code CLI there on your own Claude plan. You sign in once for the workspace, from a card. The login is stored encrypted (AES-256-GCM) and never reaches your browser. Connect more than one account and runs rotate across them.
Work starts from a message to Kav, the lead agent, from a schedule, or from an event such as a webhook, and it keeps going with your laptop closed. The computer sleeps about 2 minutes after a run, with its files saved, and wakes for the next one. Browser sign-ins are kept between runs, and you can take over the browser at any time.
When an agent needs a decision, a sign-in or a password, it asks in one Approvals inbox you can answer from your phone, and its next turn starts from your answer. Every workflow run is checked by a second agent against your checklist. Work that falls short goes back with the exact gap, and after three tries you're told what's missing. When your plan reaches its limit, the task waits and picks up after the reset, or you choose to finish it on Kavela credits.
Kavela starts with a 14-day free trial, no card. Start your free trial