A rented cloud machine left on for three years costs 8.6 times a laptop, and agents leave machines on
Claude Code's model already runs in Anthropic's data centers, and its own cloud sessions carry no machine charge. The code it writes runs on a 1,299-dollar laptop.
When a researcher works in Claude Code, the model runs in Anthropic’s data centers under the subscription. What runs on the researcher’s side is the code the agent writes: a data pull, a merge, a regression, a LaTeX build. That work fits on a laptop, and renting a server for it adds a bill that grows with every hour the agent works.
The laptop costs less once a rented machine passes 3,068 hours
AWS bills an on-demand machine “from the time an instance is launched until it is terminated or stopped,” per second after the first minute. The table compares three of its general machines with two Apple computers, at US prices read on 4 November 2026.
| Machine | Price | Three years at office hours (2,000 hours a year) | Three years left running |
|---|---|---|---|
| MacBook Air 13-inch, M5, 10-core CPU, 16 to 32 GB | From 1,299 dollars, once | 1,299 | 1,299 |
| Mac mini, M6, 12-core CPU | From 899 dollars, once | 899 | 899 |
| AWS m8i.2xlarge, 8 vCPU, 32 GiB | 0.42336 dollars an hour | 2,540 (2.0 times the Air) | 11,126 (8.6 times) |
| AWS m8i.4xlarge, 16 vCPU, 64 GiB | 0.84672 dollars an hour | 5,080 (3.9 times) | 22,252 (17.1 times) |
| AWS r8i.4xlarge, 16 vCPU, 128 GiB | 1.11136 dollars an hour | 6,668 (5.1 times) | 29,207 (22.5 times) |
AWS prices are on-demand Linux in US East (N. Virginia). The Apple prices are the base models before tax. The cloud column leaves out the disk: a 500 GB volume at the 0.08 dollars per GB-month AWS uses in its own pricing example adds 1,440 dollars over three years, more than the laptop. AWS gives each account 100 GB a month of free data transfer out to the internet.
The multiple is not fixed. It grows with every hour the rented machine stays on: twice the laptop at office hours, eight and a half times when the machine never stops. The 1,299 dollars of a MacBook Air buys 3,068 hours of the 8-vCPU machine, which is 128 days left running.
Agents keep machines on through the night
An agent’s working day is longer than a researcher’s. A /goal keeps the session going until a check passes, a /loop repeats a task on an interval, and an overnight run is the same session left open in tmux. Each of those hours is free on a machine you own and billed on a machine you rent.
The owned machine has one condition: it has to stay awake. Claude Code’s documentation says a local scheduled task “only fires while the app is open and your computer is awake,” and adds: “Closing the laptop lid still puts it to sleep.” A Mac mini that stays on a desk costs 899 dollars, the price of 2,123 hours of the 8-vCPU rental, or 88 days.
Claude Code’s own cloud session has no machine charge
For work that has to continue after the lid closes, Claude Code can run the session in Anthropic’s cloud. The documentation describes the cost: “It counts toward your plan’s usage limits alongside the rest of your Claude and Claude Code usage, and there’s no separate charge for the cloud VM.”
| Your own machine | A Claude Code cloud session | A rented server | |
|---|---|---|---|
| Machine cost | Paid once | None beyond the plan | Every hour it runs |
| Sees your files | All of them | The committed repository. .env files and untracked files stay behind |
Whatever you copy to it |
| Licensed data | Stays on your disk | Never commit it, so it never goes | Copied to a third party’s disk, which the license may forbid |
| Runs with the lid closed | Only a desktop that stays awake | Yes | Yes |
A cloud session uploads the repository from git. Keep licensed rows out of git, as in the guide to each part of a finance paper, and the cloud session works on code and pseudo data only.
Rent by the hour only for a job the laptop cannot hold
| The job | Where to run it |
|---|---|
| Data licensed through WRDS, or a query too large to download | WRDS Cloud, which WRDS says is “included free of charge with every WRDS subscription.” A job can ask for up to 8 cores and 48 GB of memory and run up to one week |
| One estimation that needs 128 GB of memory | An r8i.4xlarge for the hours it runs, at 1.11 dollars an hour, stopped the moment it finishes |
| Running an open model yourself instead of a lab’s model | A rented GPU, priced in the GPU rental comparison |
| Unattended runs when you will not leave a computer on | A Claude Code cloud session, or a desktop machine that stays awake |
Sources
- Amazon Web Services, EC2 On-Demand pricing aws.amazon.com
- Amazon Web Services, EBS pricing aws.amazon.com
- Apple, Buy MacBook Air apple.com
- Apple, Buy Mac mini apple.com
- Claude Code documentation, Claude Code on the web code.claude.com
- Claude Code documentation, desktop scheduled tasks code.claude.com
- WRDS, system policies wrds-www.wharton.upenn.edu