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
| Plan | Price | Claude Code |
|---|---|---|
| Pro | $20 a month ($17 a month billed yearly) | Included |
| Max | From $100 a month, for 5x or 20x Pro’s usage | Included |
| 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 usage | Included |
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
| Model | Input | Output | Cached 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 runs | Monthly cost | What you get |
|---|---|---|
| Your laptop | $0 | Stops when the laptop sleeps |
| Claude Code cloud sessions | $0 extra | Anthropic’s VM, included in your plan; reclaimed after a period of inactivity |
| Small VPS (Hetzner CX23, EU) | From €5.49, plus €0.50 for IPv4 | 2 vCPUs, 4 GB; you set it up and maintain it, and cheap plans are often unavailable |
| Cube | From $12 running, $4 paused | 2 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)
| Provider | Per month | Notes |
|---|---|---|
| boat.dev | $26.28 | 4 CPUs, 50 GB SSD, EU; billed per second while running |
| exe.dev | $35 | A 4-vCPU pool shared across your VMs, 200 GB disk |
| DigitalOcean | $48 | Basic Droplet, 4 shared vCPUs, 160 GB SSD |
| AWS EC2 | $111.69 | c6a.xlarge on demand; disk and IP extra |
| Docker Cloud Sandboxes | about $204 | Medium 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
| Setup | Model bill | Machine bill | Good for |
|---|---|---|---|
| Pro + cloud sessions | $20 | $0 | Occasional tasks you start from the browser or phone |
| Pro or Max + a VPS you run | $20–$200 | A few euros to ~$50 | People who like running servers |
| Pro or Max + Cube | $20–$200 | From $12 | Daily agents that keep running, with no server to maintain |
Six ways to spend less
- Use a subscription for daily work, and the API only for automation and light use.
- Match the model to the task. Sonnet 5.5 costs half of Opus 5.5 per token; save Opus for the hard problems.
- Keep context lean. Every step re-reads it. Use
/compactor/clearbetween unrelated tasks. - Don’t run more parallel sessions than you can review. Each one draws on the same usage limits.
- Pause machines you aren’t using. On Cube, a paused computer costs $2 per vCPU a month and keeps its files.
- 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
- Claude plans and pricing
- Claude API pricing
- Claude Code docs: Use Claude Code in the cloud
- Reddit r/ClaudeCode: a 58-minute cloud session showing $34.38 at API rates (Sep 26, 2026)
- Hetzner Cloud: cost-optimized plans
- DigitalOcean Droplet pricing
- boat.dev pricing
- exe.dev personal billing
- AWS EC2 c6a instances
- Docker: Introducing Cloud Sandboxes