# Should Claude Code run on your laptop or a cloud machine?

> Keep Claude Code on your laptop for hands-on work; move it to a cloud machine when it must outlive the lid, outgrow 16 GB or touch GPUs. Costs inside.

Source: https://www.nodus-compute.ai/blog/claude-code-local-or-cloud/
Build revision: 675f54c185563e8015231c41b18e86019042ffe3

Run Claude Code on your laptop while you are steering it, and move it to a cloud machine when the session has to keep going after you close the lid, needs more than about 16 GB of memory, or needs a GPU. On Nodus that cloud machine can be a CPU Workspace listed at $0.1054/hr for 4 vCPUs and 16 GiB, with its home directory saved on stop, and Claude can send GPU work from it to separate Jobs that bill only while they run. The mistake to avoid is parking the agent itself on a GPU all day.

The `claude` process can live in four places. Which one fits depends on whether you are watching, whether the work fits a small VM, and whether any step needs a GPU. We read the current Claude Code docs and the [Nodus Workspaces guide](https://www.nodus-compute.ai/docs/guides/workspaces/) on November 10, 2026, and priced each setup from the [Nodus pricing page](https://www.nodus-compute.ai/pricing/).

## What are the options for where Claude Code runs?

Claude Code runs wherever its process runs. The four choices differ in who pays for the machine and what happens when you walk away.

|Where `claude` runs|Keeps going when you close the laptop|Machine size|GPU access|What you pay for the machine|
|-|-|-|-|-|
|Your laptop|No|Your laptop|Only a local GPU|Nothing extra|
|Laptop plus Remote Control|No, the laptop must stay on|Your laptop|Only a local GPU|Nothing extra|
|Anthropic cloud session (`claude --cloud`)|Yes|About 4 vCPUs, 16 GB RAM, 30 GB disk|None listed|No separate VM charge; counts toward plan usage|
|Your own cloud machine (for example a Nodus Workspace)|Yes, inside `tmux`|What you choose, CPU or GPU|Yes|Hourly while running, storage while stopped|

Sources: [Claude Code cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web), [cloud environment resource limits](https://code.claude.com/docs/en/cloud-environments#resource-limits), [Remote Control](https://code.claude.com/docs/en/remote-control), [Nodus Workspaces](https://www.nodus-compute.ai/docs/guides/workspaces/). Checked November 10, 2026.

## When is the laptop the right place?

The laptop is right whenever you are in the loop: reviewing diffs, answering questions, testing against local services. Claude Code reads and edits your real checkout, uses your editor, and costs nothing beyond your Claude plan or API usage.

Its limit is that the session lives and dies with the machine. The [Remote Control docs](https://code.claude.com/docs/en/remote-control) are explicit that phone and browser access is only a window into the local session, so “your computer has to stay on and the `claude` process has to keep running.” Remote Control fixes where you steer from, not where the work runs.

## When should you use Anthropic’s cloud sessions?

Use a cloud session when the task is a self-contained coding job on a GitHub repository and fits a small VM. `claude --cloud "Fix the flaky test in auth.spec.ts"` starts a session that keeps running after you close the laptop, and you can check on it from your phone.

It is the cheapest cloud option for that job, because Anthropic [says](https://code.claude.com/docs/en/claude-code-on-the-web) there is “no separate charge for the cloud VM”; usage counts toward your plan limits.

The trade-offs are documented too. Each VM gets roughly 4 vCPUs, 16 GB of RAM and 30 GB of disk, ceilings Anthropic says may change, and may stop memory-hungry builds. An idle VM pauses after a few minutes and can later be reclaimed. A command that hits its timeout moves to the background and can run about 30 more minutes before it is stopped. The listed resources include no GPU, and `--cloud` is not available when Claude Code is configured for Amazon Bedrock or Google Cloud’s Agent Platform.

## When do you need your own cloud machine?

You need your own machine when any of those limits bites: a build that needs 32 GB, a Git host that cloud sessions only partly support, state that must survive for weeks, a Bedrock-only setup, or work that touches a GPU. For workloads beyond the VM limits, Anthropic’s docs suggest your own hardware or a self-hosted environment.

On Nodus that machine is a [Workspace](https://www.nodus-compute.ai/docs/guides/workspaces/): a CPU or GPU machine reached with `nodus ssh`, whose `/home/nodus` lives on a Volume and is saved every time it stops. The native Claude Code installer puts the binary under `~/.local/bin`, inside the saved home, so it survives restarts. The setup is four commands, built from the Nodus and Claude Code docs:

Terminal window

```bash
nodus create workspace agent --cpu 4 --memory 16Gi
nodus ssh workspace/agent
curl -fsSL https://claude.ai/install.sh | bash
tmux new -s claude   # then run: claude
```

Start `claude` inside `tmux` or `screen`. The Remote Control docs make the same point for any remote machine: without it, the session ends when your SSH connection drops.

## How much does an always-available Claude Code machine cost?

A 4 vCPU, 16 GiB machine, the same size as an Anthropic cloud VM, is listed at $0.1054/hr on the Nodus pricing page. Most of the bill depends on whether it stops at night, not on the hourly rate.

* Eight hours on 22 workdays is 176 hours: 176 x $0.1054 = $18.55 a month.
* A 10-hour weekday schedule is 220 hours: 220 x $0.1054 = $23.19 a month.
* Left on around the clock, 730 hours: 730 x $0.1054 = $76.94 a month.

![Monthly compute cost of a 4 vCPU, 16 GiB Nodus Workspace for Claude Code: $18.55 at 8 hours on workdays, $23.19 on a 10-hour weekday schedule, $76.94 always on.](https://www.nodus-compute.ai/blog-charts/claude-code-local-or-cloud/monthly-cost.svg) *Turning the machine off at night is worth more than any rate difference.*

These figures are compute only; the saved home Volume is billed separately while the Workspace is stopped. A Workspace stops itself after `idleTimeout` (default one hour) with no SSH session, editor traffic or process, but a `claude` session left running in `tmux` can keep it from ever looking idle. Set a schedule as well, which starts the machine 15 minutes before `readyBy` and stops it at `stopAt`:

```yaml
spec:
  schedule:
    readyBy: "2026-10-01T09:00:00-07:00"
    stopAt: "2026-10-01T19:00:00-07:00"
```

A `maxCostUSD` on the Workspace stops and saves it when its cost reaches the limit, which caps the forgotten-weekend case.

## Should Claude Code run on the GPU machine itself?

No, keep the agent on a CPU machine or your laptop and send GPU work out as Jobs. An agent spends most of its time reading, editing and waiting on the model. A GPU billed by the hour costs the same whether anything uses it or not.

Here is one workday where Claude prepares a fine-tune and the GPU part takes 1.5 hours. With Claude Code living on an NVIDIA H100 Workspace, listed at $2.60/hr, eight hours cost 8 x $2.60 = $20.80. With Claude on the CPU Workspace, the same day costs 8 x $0.1054 = $0.84 for the agent plus 1.5 x $2.60 = $3.90 for a Job, $4.74 in total.

![One workday with 1.5 GPU-hours of training: Claude Code on an H100 Workspace all day costs $20.80; Claude on a CPU Workspace plus an H100 Job costs $0.84 plus $3.90, $4.74 in total.](https://www.nodus-compute.ai/blog-charts/claude-code-local-or-cloud/workday-cost.svg) *Paying for the GPU only while it trains cuts this day by 77%.*

From a Workspace, Claude can launch that Job with the Nodus CLI. `nodus run --from workspace/agent` saves the current home and pins it as the Job’s input, so the Job trains on exactly the files Claude just edited, and `--max-cost` caps it:

Terminal window

```bash
nodus run --from workspace/agent --gpu H100 --max-cost 10 -d -- python train.py
```

From your laptop, connect Claude Code to the Nodus MCP server with `claude mcp add --scope user --transport http nodus https://api-next.nodus-compute.ai/mcp`, and it can estimate, launch and watch the same Jobs. [Giving Claude Code GPUs through MCP](https://www.nodus-compute.ai/blog/give-claude-code-codex-cursor-gpus-mcp/) covers that setup, and [how coding agents run jobs that take hours](https://www.nodus-compute.ai/blog/coding-agents-long-running-jobs/) covers the hand-off and polling pattern.

A GPU Workspace is still the right call for interactive GPU work: profiling a kernel, stepping through a CUDA error, or a notebook where you rerun cells every few minutes.

## Which setup should you pick?

Pick by the first rule that matches:

1. You are watching and the code is local: run Claude Code on your laptop.
2. It is a GitHub coding task that fits 4 vCPUs and 16 GB with no GPU: start an Anthropic cloud session.
3. It needs more memory, weeks of state, a Git host other than GitHub or a Bedrock setup: run it in `tmux` on your own CPU machine with a stop schedule.
4. Any step needs a GPU: keep Claude where rule 1, 2 or 3 put it, and send the GPU step to a capped Job.

Teams running several agents at once will want the rest of the stack too, which [the infrastructure background coding agents need](https://www.nodus-compute.ai/blog/infrastructure-for-background-coding-agents/) walks through.

## FAQ

### Can I move a running Claude Code session from my laptop to the cloud?

Not from the terminal. The CLI handoff is one-way: `claude --teleport` pulls a cloud session down to your terminal, while `claude --cloud` starts a new cloud session from your pushed branch. The Claude desktop app can send a local session to the cloud from its Open in menu.

### Does my code leave my machine with a cloud session?

Yes. The cloud VM clones your repository from GitHub, or uploads a bundle of it when there is no usable remote; on macOS and Linux uncommitted `.env` and key files are left out of that upload. On a Nodus Workspace your code sits in the Workspace’s home Volume in your own project.

### Do I need an Anthropic subscription to run Claude Code on a Nodus Workspace?

You need some way to sign Claude Code in, the same as on a laptop: a Claude plan or an `ANTHROPIC_API_KEY`. Nodus bills only the machine and any Jobs it launches, not the model usage.

### What happens to Claude Code’s files when the Workspace stops?

Everything under `/home/nodus` is saved, including the Claude Code install and your repository, and restored on the next start on a fresh machine. Anything installed outside the home directory is lost, so install packages with `pip install --user` or in a virtual environment under `/home/nodus`.
