Claude Code cloud sessions vs running locally on your Mac

By Matyas Rathonyi. Updated October 5, 2026. Guides

Use a cloud session when the task only needs your GitHub repo: it keeps running after you close the laptop. Stay local when the work needs this Mac: its files, Xcode and the iOS Simulator, local models, or keys on disk. To keep local work running with the lid shut and no monitor, arm Clamshell for Mac.

CloudLinux VM, repo from GitHub
LocalYour Mac, everything on it
Lid closedLocal needs the Mac awake
$9.99 onceClamshell, after a 7-day trial

Clamshell for Mac keeps the Mac awake with the lid closed while armed, so local Claude Code sessions keep working. Free for 7 days.

Download free trial

Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or buy now, $9.99

Two places Claude Code can keep working after the lid closes: a cloud VM, and the MacBook itself when it is kept awake. Cloud
Both can keep going after you close the lid.A cloud session runs on Anthropic's VM. A local session keeps your files and tools, as long as the Mac stays awake.

Searches like "Claude Code web vs CLI" and "run Claude Code without keeping laptop open" usually hide one question: does this job need my Mac, or just my code? Anthropic made the cloud answer much easier this autumn. This page compares the two honestly, including the cases where you do not need Clamshell at all.

What changed: cloud sessions are generally available

On September 23, 2026, Anthropic updated its announcement: cloud sessions, previously called Claude Code on the web, are now generally available for Pro, Max and Team users, and for Enterprise users with eligible seats. Its cloud docs say a session "keeps running after you close your laptop". You can start one at claude.ai/code, from the Code tab in the Claude mobile app, by choosing Cloud in the desktop app, or with claude --cloud "task" in a terminal.

Claude Code web vs CLI: where the work actually runs

"Web" and "CLI" describe where you type, not where the work happens. The CLI and the desktop app can run sessions locally or in the cloud, and claude.ai/code can steer a local session through Remote Control. The difference that matters is the machine, as of October 2026:

QuestionCloud sessionLocal session on your Mac
Where it runs A fresh Ubuntu 24.04 x86_64 VM per session macOS on your Apple Silicon Mac
Lid closed Keeps running Only if the Mac stays awake
Code access Clones from GitHub, or uploads a git bundle under 100 MB without untracked files Any folder, tracked or not
Tools Common runtimes, Docker, PostgreSQL and Redis preinstalled, plus your setup script Whatever you installed, including Xcode and macOS apps
iOS Simulator No Yes
Network Limited by default to an allowlist you can change Your network, VPN and local services
Usage Shares your plan's rate limits, no separate VM charge Shares your plan's rate limits, runs on hardware you own

The cloud details come from Anthropic's cloud environments docs and the cloud sessions docs, including their limitations section.

What a cloud session can reach: your GitHub repo and preinstalled toolchains, but not your local files, the iOS Simulator, or keys stored on your Mac. Cloud VM GitHub repo Toolchains Local files iOS Simulator Keys on disk What a local session on your Mac can reach: all of it, including local files, the iOS Simulator and keys on disk. Your Mac GitHub repo Toolchains Local files iOS Simulator Keys on disk
Same agent, different reach. A cloud session sees what you push to GitHub. A local session sees everything on the Mac, which is also why it stops when the Mac sleeps.

When a cloud session is the better choice

If that describes your job, you do not need a lid-closed tool for it. Close the laptop and go.

When running locally on your Mac wins

Decide in two questions

Decision tree. Does the task need your Mac? If no, use a cloud session. If yes, must the lid close? If no, run locally with the lid open. If yes, run locally with Clamshell armed. Needs your Mac? No Yes Cloud session Lid must close? No Yes Lid open Clamshell
Most of the decision is the first question. If the work does not need this Mac, the cloud is the simplest answer. If it does, the only remaining question is whether the lid has to close.

Does not need your Mac

Cloud session. Push first: the VM clones your GitHub remote at your current branch, not your local checkout.

Needs your Mac, lid can stay open

Local session on power. Claude Code's built-in keep-awake covers idle sleep; caffeinate -i claude closes its known gaps. See what the built-in keep-awake covers.

Needs your Mac, lid has to close

Local session with Clamshell armed. The Mac stays awake and online with the lid shut and the built-in display black, with no monitor, sudo or admin rights.

Run Claude Code locally without keeping the laptop open

  1. Install Clamshell and open it once. It runs from the menu bar on Apple Silicon MacBooks with macOS 14 or later.
  2. Start your local session. Run /remote-control if you want to steer it from your phone. Anthropic's docs say Remote Control needs the computer to stay on and the claude process to keep running.
  3. Arm and close. The menu bar menu arms for the next close only; holding Option while closing works on a MacBook Air M2 (2022) or later or a 14-inch or 16-inch MacBook Pro (2021) or later. Disconnect external displays first, since Clamshell pauses while one is connected.

Heat and power stay on your side of the trade: Clamshell disarms toward normal lid sleep at serious or critical thermal pressure, and an optional Disarm on low battery setting is off by default. It does not detect Claude Code or end the session when a task finishes. The Claude Code lid-closed guide walks through a full phone session.

Clamshell keeps your Mac awake with the lid closed. Free for 7 days, then $9.99 once for one Mac. 14-day money-back guarantee.

Download free trial

Move work between cloud and local

Other ways to keep a local session going lid-closed

External display

Apple's closed-display mode needs power, a display, and an external keyboard and mouse. The better fit at a desk with that hardware.

An always-on Mac

A Mac mini or other desktop Mac that never closes avoids the lid problem altogether, if you have one.

sudo pmset -a disablesleep 1

Free and works lid-closed, but it is a persistent system-wide admin switch. See how to undo it.

Frequently asked questions

Can I run Claude Code without keeping my laptop open?

Yes, in two ways. A Claude Code cloud session runs on Anthropic's infrastructure and keeps running after you close your laptop. A local session keeps running with the lid closed only if something keeps the Mac awake, such as an external display setup, sudo pmset -a disablesleep 1, or a lid-sleep app like Clamshell for Mac.

Do Claude Code cloud sessions cost extra?

As of October 2026, Anthropic's docs say cloud sessions share rate limits with the rest of your Claude and Claude Code usage and that there is no separate compute charge for the cloud VM. They are available on Pro, Max and Team plans, and for Enterprise users with eligible seats.

Can a Claude Code cloud session use my local files or the iOS Simulator?

No. A cloud session runs in an Ubuntu Linux VM that clones your GitHub repository or receives an uploaded bundle of a git repository. Untracked files are not included, and Anthropic's docs say the iOS Simulator pane works in local sessions only because a cloud machine cannot reach the simulators on your Mac.

What is the difference between Claude Code Remote Control and a cloud session?

Remote Control lets you steer a session that runs on your own machine from a phone or browser, so the machine has to stay awake. A cloud session runs on Anthropic's infrastructure, so it keeps going when your computer is closed or off, but it cannot reach your local files, apps or keys.

Can I move a Claude Code session between local and cloud?

Partly. From the CLI you can start a new cloud session with claude --cloud and pull a cloud session into your terminal with claude --teleport, but you cannot push an existing terminal session to the cloud. The desktop app can send a local session to the cloud from its Open in menu.

Related guides

Sources checked October 5, 2026: Anthropic's Claude Code on the web announcement and its September 23, 2026 update, and the Claude Code docs for cloud sessions, cloud environments, Remote Control, the iOS Simulator pane and computer use; Apple's closed-display guidance. Clamshell behavior is described from its changelog and FAQ. Clamshell is an independent app, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.