Run Claude Code 24/7: what it costs a month
Running Claude Code 24/7 costs two bills: your Claude plan, $20 to $200 a month, and a machine for the agent to work on. On the machine, what decides the total is the difference between a machine that is there 24/7 and one that runs 24/7. A shedix machine with 2 vCPU that is there all month, working 4 hours every workday and asleep the rest with its programs kept, costs $11.77; a whole workday on it is under a dollar.
We make shedix. Every other figure comes from each provider's own pages, linked, as of 2026-11-11, before tax; free allowances are left out.
For one 4 vCPU machine priced hour for hour across several services, see what a coding agent's computer costs, compared.
What are the two bills?
The model bill is your Claude plan. Claude's plans are Pro at $20 a month ($17 billed yearly), Max at $100 and Ultra at $200, as of 2026-11-11. Claude Code comes with all three, and the plan is the same wherever Claude Code runs: your laptop and a cloud machine draw on the same usage limits.
The machine bill is the computer Claude Code works on. Claude Code itself is light; most of the time it waits on the model. The machine matters for what the agent runs: builds, tests, Docker, a dev server, a browser.
A 24/7 agent spends your plan's usage around the clock, so plan limits shape the schedule. When a scheduled run reaches its usage limit, Anthropic's scheduled task docs say it is rejected until the usage window resets, unless you turn on usage credits, which bill the overage. Signing in with an API key instead bills each token.
What does the machine cost for a month?
Two months, priced for the same two boxes everywhere:
- There 24/7, working part of it: the agent works 4 hours on each of 22 workdays (88 hours), and the machine waits the other 642, ready to pick up.
- Running 24/7: 730 hours, the whole month.
Rows are ordered by the working month:
| Option, as published | Included in the price | 2 vCPU, 4 GB: working month | 2 vCPU, 4 GB: running all month | 4 vCPU, 8 GB: working month | 4 vCPU, 8 GB: running all month |
|---|---|---|---|---|---|
| shedix, by the second while it runs, asleep the rest, no plan | The whole disk, Ubuntu with root and Docker, a full desktop, Claude Code, Codex, VS Code in the browser, previews and SSH | $11.77 (2 vCPU, 4 GB RAM, 30 GB disk) | $65.70 | $24.26 (4 vCPU, 8 GB RAM, 45 GB disk) | $153.30 |
| Sprites, $0.0385 per CPU-hour + $0.021875 per GB-hour, at full use | The CPU and memory used; storage extra | $14.48 | $120.09 | $28.95 | $240.17 |
| Codespaces, $0.09 per core-hour + $0.07 per GB-month of storage | A dev container with VS Code; storage counted in the figures | $18.08 (2 cores, 8 GB) | Not possible: 12 hours at most | $33.92 (4 cores, 16 GB) | Not possible: 12 hours at most |
How the figures are worked out:
- shedix bills by the second while a machine runs, and its disk (plus memory above 8 GB) while it sleeps. Working month: $0.09/hr × 88 hours + $0.006/hr × 642 hours = $11.77, and $0.21/hr × 88 + $0.009/hr × 642 = $24.26. Running all month: 730 hours at $0.09/hr or $0.21/hr. Per vCPU-hour that's $0.0450 at 2 vCPU and $0.0525 from 4 vCPU, memory and disk included.
- Sprites bill the CPU and memory used, priced here with the whole box in use: 2 × $0.0385 + 4 × $0.021875 = $0.1645 an hour and 4 × $0.0385 + 8 × $0.021875 = $0.329 an hour, times 88 or 730 hours. Storage is extra, about $0.50 per GB-month while awake.
- Codespaces has no 2 vCPU, 4 GB or 4 vCPU, 8 GB machines; the nearest have 2 cores and 8 GB, or 4 cores and 16 GB (machine types). Working month: 88 × $0.18 + 32 GB × $0.07 = $15.84 + $2.24 = $18.08, and 88 × $0.36 + $2.24 = $33.92.
In a working month, a shedix machine costs 16–35% less than the same box on Sprites at full use or the nearest Codespaces machine, with its disk included and its programs kept while it sleeps. Running all month, the 2 vCPU shedix machine is $65.70 and the 4 vCPU one $153.30, disk included, and Codespaces can't stay on at all: GitHub stops a codespace after 12 hours at most.
Does 24/7 mean the machine runs all 730 hours?
No. What most people want from 24/7 is an agent that is there whenever work arrives, with everything where it left it. A shedix machine is there all month and bills its running price only for the hours it works:
- While Claude Code works, the machine runs, around the clock if the job does, at $0.09/hr for 2 vCPU or $0.21/hr for 4 vCPU.
- When the work stops, the machine goes to sleep by itself and keeps its files and its running programs: the dev server, the tmux session, Claude Code and its conversation.
- Asleep, it costs $0.006/hr for 2 vCPU or $0.009/hr for 4 vCPU. A machine asleep all month is $4.38 or $6.57.
- When work arrives, it wakes in under a minute and picks up where it left off.
So a machine that is there 24/7 costs $11.77 for 2 vCPU or $24.26 for 4 vCPU in a working month, against $65.70 or $153.30 for one that never sleeps. Our post on a cloud machine that sleeps when idle compares how each service decides a machine is idle.
What does each shedix size cost by the hour and the month?
A running machine is charged by the second, and a sleeping one pays for its disk, plus memory above 8 GB. There is no plan and no subscription:
| Machine | Disk included | Running | Working month | 730 hours running | Asleep | 730 hours asleep |
|---|---|---|---|---|---|---|
| 2 vCPU, 4 GB RAM | 30 GB | $0.09/hr | $11.77 | $65.70 | $0.006/hr | $4.38 |
| 4 vCPU, 8 GB RAM | 45 GB | $0.21/hr | $24.26 | $153.30 | $0.009/hr | $6.57 |
| 8 vCPU, 16 GB RAM | 60 GB | $0.42/hr | $46.59 | $306.60 | $0.015/hr | $10.95 |
| 16 vCPU, 32 GB RAM, from the API and CLI | 75 GB | $0.84/hr | $89.33 | $613.20 | $0.024/hr | $17.52 |
Custom sizes go from 2 to 16 vCPU and cost $0.042 per vCPU-hour plus $0.00525 per GB of RAM per hour, with 30 GB of disk included. More disk is $0.003/hr per 15 GB, running or asleep.
The price covers the machine: the CPU and memory, the disk, Ubuntu with root and Docker, the full desktop, Claude Code, Codex, VS Code in the browser, preview links and SSH with your keys. Your agent's model usage stays on your own Claude account, because you sign in to Claude Code yourself on the machine.
Sleeping and deleting both end a machine's running hours:
- Sleep: the running charge ends and the asleep price starts. Everything stays: your repositories, installed dependencies, Claude Code's sign-in and its conversations, and the programs that were running.
- Delete: the machine and its disk are gone for good, and it costs nothing from then on.
Can Anthropic's cloud sessions run Claude Code 24/7 for free?
They cover a lot of what people mean by 24/7, at no extra cost. Cloud sessions come with Pro, Max, Ultra and Team plans, and the docs say "there's no separate charge for the cloud VM." A session keeps working after you close your laptop.
They're built for Claude Code tasks rather than as a machine you keep. Per Anthropic's environment docs, as of 2026-11-11:
- After a few minutes without activity, the VM pauses with its files saved, and a paused VM can later be reclaimed. Background commands and subagents that were still running don't survive a reclaim.
- A command Claude runs gets 2 minutes by default and up to 10. Environment variables raise these limits.
For work that repeats, scheduled tasks run Claude Code in the cloud on a schedule and count against your plan's usage like any other session.
If your 24/7 agent is "check the repo every hour and fix what's broken", that's a good fit. If it needs a long-running server, Docker, your own tools, other agents such as Codex, or a shell you can attach to, it needs a machine of its own. Our post on cloud sessions or your own machine walks through where that line falls.
What does each option give your agent?
As of 2026-11-11, from each provider's pages:
| Sprites | Codespaces | shedix | |
|---|---|---|---|
| Whole disk persists | Yes, "a real disk that survives sleep" | Yes, until the container is rebuilt | Yes, the whole disk: everything you set up stays |
| Root and Docker | Not stated on its page | sudo and Docker in the default image | Root (sudo) and Docker, ready |
| Full desktop | Not built in | Not built in | Yes, plus a browser your agent shares with you |
| Its own public address | A URL per Sprite, private or public | No; ports forwarded through GitHub | Yes |
| How you get in | sprite CLI, API, its URL |
Browser, VS Code, SSH through gh |
SSH with your keys, VS Code or a terminal in the browser, the desktop, your phone |
| Your agent can start and drive it | Through the CLI or API | Through the gh CLI |
Yes, with the shedix skill: it starts machines, drives them and copies them |
| Move your current session | By hand | By hand | Your agent moves the conversation it's in |
| Sleeps by itself, keeping programs | Sleeps when idle, files kept | Stops after 30 idle minutes; processes end | Yes, files and running programs, and wakes in under a minute |
| What you pay while idle | Storage, about $0.02 per GB-month cold | Storage, $0.07 per GB-month | $0.006/hr for 2 vCPU, $0.009/hr for 4 vCPU, disk included |
What is each option built for?
- Sprites are built for bursty work that mostly waits: a persistent Linux microVM from Fly.io, billed on use, reached through the
spriteCLI, its API or its own URL. - Codespaces is built for a person at an editor, in a dev container made from a GitHub repository, reached from VS Code, a browser or SSH.
- shedix is a real computer for your coding agents: a whole VM with a full desktop, root, Docker, its own public address and every way in. Your agent can start and drive it, shares a browser with you on it, and finds Claude Code and Codex ready; it sleeps by itself and you pay only while it works.
What happens in the hours nobody is using it?
- Sprites go to sleep seconds after activity ends and keep their files. Fly.io's pricing page notes that output to a detached tmux session doesn't count as activity, so for a long agent session you hold a task open (
sprite-env tasks create). - Codespaces stop after 30 idle minutes by default, and GitHub stops a codespace after 12 hours at most, "regardless of your idle timeout policy or settings". Files are kept; running processes end.
- shedix puts a machine to sleep by itself when nobody uses it; Claude Code or Codex working, an open terminal or SSH session, or a busy CPU counts as use. Asleep it keeps its files and running programs, it wakes in under a minute, and Keep awake holds one up for an unattended job, so you can close the laptop and the work carries on.
Keep awake holds a machine up for a long unattended job; otherwise it sleeps by itself.
For the ways to keep a session going with the lid shut, see keep Claude Code running after closing your laptop.
How do you add a second agent?
- Sprites: create another from the CLI or API, then install what the agent needs.
- Codespaces: open another codespace on the repository; it's configured by the same
devcontainer.json. - shedix: copy a signed-in machine, or have your agent copy it, and the copy starts with your files, packages and sign-ins, so each agent gets its own machine.
What does the whole month come to?
Add the two bills. With Max at $100, the 2 vCPU machine used 4 hours a workday adds $11.77 on shedix, $14.48 on Sprites at full use and $18.08 on Codespaces. The 4 vCPU, 8 GB machine adds $24.26 on shedix, $28.95 on Sprites at full use and $33.92 on Codespaces. A shedix machine kept for the month and not used at all adds $4.38 or $6.57, with everything on it kept. Machines run in the United States; every size is on our pricing page, the FAQ covers sleep, and about and security say who runs shedix and how machines are kept apart.
Prices change, so check each provider's own pricing before you choose.
What to do next
Start a shedix machine, or install the shedix skill and let Claude Code start one for you. Your first 12 hours of compute are on us.