What running Claude Code in the cloud really costs

There are always two bills: one for the model that thinks, one for the machine that runs the code. Here's what each costs in October 2026, and how to keep both down.

Published

Claude Code itself is free to install. What you pay for is the model it talks to and the computer it runs on. Prices below are as of October 2026; the sources are at the end.

Bill 1: the model

A Claude subscription

PlanPriceClaude Code
Pro$20 a month ($17 a month billed yearly)Included
MaxFrom $100 a month, for 5x or 20x Pro’s usageIncluded
Team, standard seat$25 per seat a month ($20 billed yearly)Included
Team, premium seat$125 per seat a month ($100 billed yearly), 5x a standard seat’s usageIncluded

Claude Code shares your plan’s usage limits with the rest of Claude, wherever it runs: your laptop, a server, or Anthropic’s cloud sessions. Running several sessions in parallel uses the limits up faster.

The API, paid per token

ModelInputOutputCached input (reads)
Claude Opus 5.5$4 per million tokens$20 per million$0.20 per million
Claude Sonnet 5.5$2 per million$10 per million$0.10 per million
Claude Haiku 5.5 (prompts up to 100K tokens)$0.10 per million$0.50 per million$0.01 per million

Why agent sessions get expensive at API rates

A coding agent re-reads its whole context, the files, the conversation, the tool output, on every step. In one public report, a 58-minute Claude Code cloud session on Opus 5.5 produced only 3.4K tokens of output, but read 109.8 million cached tokens, and showed $34.38 at API rates (Reddit). Caching made those reads cheap per token; there were simply a lot of them.

That’s why most people who run Claude Code daily use a subscription: the cost is fixed, and heavy days don’t produce a surprise bill.

Bill 2: the machine

Where Claude Code runs decides whether it keeps working when you close your laptop.

Where it runsMonthly costWhat you get
Your laptop$0Stops when the laptop sleeps
Claude Code cloud sessions$0 extraAnthropic’s VM, included in your plan; reclaimed after a period of inactivity
Small VPS (Hetzner CX23, EU)From €5.49, plus €0.50 for IPv42 vCPUs, 4 GB; you set it up and maintain it, and cheap plans are often unavailable
CubeFrom $12 running, $4 paused2 vCPUs, 4 GB, 30 GB SSD, ready in minutes with your repos and agents

The same 4 vCPU, 8 GB machine, priced for a full month (730 hours)

ProviderPer monthNotes
boat.dev$26.284 CPUs, 50 GB SSD, EU; billed per second while running
exe.dev$35A 4-vCPU pool shared across your VMs, 200 GB disk
DigitalOcean$48Basic Droplet, 4 shared vCPUs, 160 GB SSD
AWS EC2$111.69c6a.xlarge on demand; disk and IP extra
Docker Cloud Sandboxesabout $204Medium size at $0.28 an hour; sessions last up to 24 hours

On Cube, each vCPU costs $6 a month running, with RAM and SSD included, so 4 vCPUs with 8 GB and 60 GB comes to four times that. A machine that pauses when you don’t need it costs less than these always-on figures.

Three typical setups

SetupModel billMachine billGood for
Pro + cloud sessions$20$0Occasional tasks you start from the browser or phone
Pro or Max + a VPS you run$20–$200A few euros to ~$50People who like running servers
Pro or Max + Cube$20–$200From $12Daily agents that keep running, with no server to maintain

Six ways to spend less

  1. Use a subscription for daily work, and the API only for automation and light use.
  2. Match the model to the task. Sonnet 5.5 costs half of Opus 5.5 per token; save Opus for the hard problems.
  3. Keep context lean. Every step re-reads it. Use /compact or /clear between unrelated tasks.
  4. Don’t run more parallel sessions than you can review. Each one draws on the same usage limits.
  5. Pause machines you aren’t using. On Cube, a paused computer costs $2 per vCPU a month and keeps its files.
  6. Price the whole month, not the hour. Per-hour prices look small until a machine runs all 730 hours.

Questions

Do Claude Code cloud sessions cost extra?

Not for the machine. Anthropic doesn't charge separately for the cloud VM; cloud sessions count toward your Claude plan's usage limits like the rest of your Claude Code use. They're available on Pro, Max and Team plans.

Is a Claude subscription or the API cheaper for Claude Code?

For daily use, usually a subscription: Pro is $20 a month and Max starts at $100, with usage limits instead of a per-token bill. Agents re-read their context on every step, so heavy sessions can cost tens of dollars at API rates. The API makes sense for light, occasional or automated use where you want to pay per token.

What's the cheapest way to keep Claude Code running 24/7?

Pair a Claude subscription with a machine that stays on. A small VPS costs a few euros a month but you set it up and maintain it; a cloud computer for agents costs a little more and is ready in minutes. Claude Code cloud sessions add no machine cost, but the VM is reclaimed after a period of inactivity.

Sources

A new home
for your agents.

Download for Mac

Enter your email for the Cube download link. Open it on a Mac with Apple Silicon.