If I close my laptop, will Claude keep running?

By Matyas Rathonyi. Updated November 16, 2026. Guides

Only the part that runs in Anthropic's cloud. Closing a MacBook lid puts the Mac to sleep, and Claude Desktop's Keep computer awake setting only stops idle sleep, so local Claude Code sessions, Dispatch, local scheduled tasks, MCP servers and anything using your files or screen pause until you open it. To keep that local work going, leave the lid open, use Apple's external display setup, or arm Clamshell for Mac before you close the lid.

Cloud tasksKeep going, lid shut
Work on your MacPauses when the lid closes
Keep awakeIdle sleep only, not the lid
$9.99 onceClamshell, after a 7-day trial

An animated MacBook with a coding agent deploying a website from its terminal. The Option key is held and the lid closes: the display goes black, but the Mac stays awake, so a dimmed copy of the terminal keeps working above the closed laptop while its front edge fills with light. When the deploy is done, a pointer shows how to lift the lid. Opening it wakes the Mac to its lock screen, which unlocks to the finished run: deployed, with the live address. The lid can then be opened and closed freely.

Clamshell for Mac keeps the Mac awake and online with the lid closed while armed, so Claude's local work keeps going. No sudo, no monitor. Free for 7 days.

Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or install with Homebrew: brew install --cask clamshell.

Two Claude tasks when the MacBook lid closes. The one running in Anthropic's cloud keeps filling its progress bar. The one running on the Mac stalls and the Mac falls asleep. Claude in the cloud keeps going Claude on your Mac z z lid shut: asleep
Same app, two places.Claude Desktop is a window onto work that runs either on Anthropic's servers or on your Mac. Closing the lid only stops the second kind.

You give Claude a long task in the desktop app, fold the MacBook and head out. Whether anything happened when you get back depends on where that task was running, not on which tab you started it from. This page sorts each part of Claude Desktop into "keeps going" or "pauses", explains the Keep computer awake setting that a lot of people read as a lid fix, and lists what does keep local work alive with the lid shut. Everything about Claude below comes from Anthropic's own docs and help pages, checked October 14, 2026, plus the setting text in the Claude Desktop app itself.

Keep Claude working on your Mac with Clamshell for Mac

  1. Install Clamshell for Mac. Download the free trial from clamshell.dev, or run brew install --cask clamshell, then open it once. It runs in the menu bar.
  2. Arm it. Right-click the menu bar icon to arm until you turn it off, or press both Option keys to arm for the next close only. Open the menu and check that it says Armed or Armed for Next Close. External displays can stay connected.
  3. Start the Claude task, then close the lid. Start the local Claude Code session or Desktop task with the lid open and approve any permission prompts while you can see them; Clamshell never answers prompts for you. Then close the lid. The built-in display stays black, the Mac stays online, and the task keeps running on this Mac.

You need an Apple Silicon MacBook on macOS 14 or later, on a hard surface with air around it, ideally on power. Leave Keep computer awake on for the times the lid is open, and turn on the Agent Screen module if Claude needs the screen for computer use. At serious or critical thermal pressure Clamshell disarms toward normal lid sleep, which pauses Claude's local work too. Disarm when the task is done, and check it is inactive before the Mac goes in a bag. Clamshell for Mac is a paid, closed-source app: $9.99 once at clamshell.dev after a 7-day trial, also on Setapp, not on the Mac App Store, and not Apple's clamshell mode, which needs an external display.

On this Mac, in the cloud, or on a server

If the question is a Claude Code task, there are three ways to keep it going while your laptop is shut. Pick by what the task needs. Anthropic's current docs, checked November 14, 2026, say a Claude Code cloud session keeps running after you close your laptop, while a local session, including one you steer with Remote Control, runs on your Mac, which "has to stay on".

Where it runsFits whenWhat keeps runningEffortLimits
This Mac, lid closed, with Clamshell for MacThe task needs this Mac: your checkout as it is now, local MCP servers, your browser or screen, apps you are signed in toLocal Claude Code sessions in Terminal or Desktop, Remote Control, Dispatch and local scheduled tasksArm Clamshell, check it shows armed, close the lid. $9.99 once after a 7-day trialApple Silicon and macOS 14 or later. Keep the Mac on a desk with air around it, ideally on power. Permission prompts still wait for you. At serious or critical heat, or at 20% on battery, Clamshell disarms and the Mac sleeps
Anthropic's cloud: a Claude Code cloud sessionThe task needs only the repository and the tools the cloud environment providesThe session on Anthropic's infrastructure. You can check on it or steer it from any deviceConnect GitHub, push your branch, then start the task on the web, in the Claude app, from Desktop with a Cloud environment, or with claude --cloudIt starts from a copy of the repository, not your live checkout, and cannot reach anything else on your Mac. Usage counts toward your plan's limits. Needs a Pro, Max, Ultra or Team plan, or an Enterprise seat that includes it
Your own server, in tmuxYou already have a machine that stays on, such as a VPS, a Linux box or a desktop Mac, with the project and its tools set up thereEverything inside the tmux session. tmux keeps programs running in the background after you detach, and you reattach over SSHSet up the machine, SSH keys, the repository and Claude Code, then tmux new -s agent and later tmux attach -t agent. Desktop's SSH environment does this without tmuxA server to pay for or keep on, and to maintain. It cannot reach files or apps on your MacBook. In Desktop's SSH environment, Anthropic notes a task can stop when its sign-in expires

Clamshell for Mac is the way to do the first row without a monitor or admin rights. The rows also mix: cloud sessions for tasks that need only the repository, the closed Mac for the ones that need this Mac. The table further down sorts every other part of Claude Desktop the same way.

What closing the lid does to Claude on a Mac

Closing the display is one of Apple's documented ways to put a Mac laptop to sleep. A sleeping Mac is still on but uses much less power, and apps on it stop running. For Claude that means:

What "Keep computer awake" does, and what it does not

Claude Desktop has a setting called Keep computer awake. In the macOS app (version 2.31226.1, checked October 14, 2026) its description reads, word for word:

"Prevent your computer from idle-sleeping while Claude is open so scheduled tasks can run. Your display can still turn off. Closing the laptop lid will still put it to sleep."

The same app build has a second toggle, Keep computer awake while Claude works, for Claude Code sessions: "Prevent your computer from sleeping while a Code session is running, so long tasks can finish. Your display can still turn off. Closing the laptop lid will still put it to sleep." Anthropic's scheduled tasks docs say the same in their own words: "To prevent idle-sleep, turn on Keep computer awake in Settings > This computer > System. Closing the laptop lid still puts it to sleep."

The Keep computer awake switch turns on. It blocks idle sleep, so an open MacBook stays awake. Its link to the closed lid is cut, so a closed MacBook still sleeps. Keep awake Idle sleep blocked, Mac awake Lid-close sleep not covered z
One switch, two kinds of sleep. Idle sleep is the timer that fires when nobody touches the Mac, and apps are allowed to hold it off. Lid-close sleep starts the moment the lid shuts, and the setting does not reach it.

So the setting is useful, just for a different situation: a Mac left open on a desk, maybe with the screen dimmed, so that scheduled tasks fire on time and a Code session is not cut off by the idle timer. Leave it on. It does not conflict with anything below. The same idle-versus-lid split is behind Claude Code's built-in keep-awake and why caffeinate does not work with the lid closed.

What keeps running and what stops

As of October 2026, Anthropic runs most of Claude's longer work in the cloud and reaches into your Mac only for local things. On October 6, 2026, new Cowork tasks on Pro and Max plans moved to the cloud, and Anthropic is folding Cowork into plain Claude conversations, so your app may not show a separate Cowork option at all.

Keeps going with the lid shut: cloud tasks and Cowork sessions, cloud scheduled tasks, Claude Code cloud sessions. Stops until the Mac wakes: local Claude Code sessions, Dispatch, local scheduled tasks, local files, browser and computer use, and local MCP servers. Keeps going, lid shut Cloud tasks and Cowork Cloud scheduled tasks Claude Code cloud sessions Stops until the Mac wakes Local Claude Code sessions Dispatch, local scheduled tasks Local files, browser, computer use Local MCP servers
The split follows the machine, not the tab. Anything Anthropic runs on its servers keeps going. Anything that has to touch your Mac waits for it to wake.
What you are usingLid closedWhyAnthropic's wording
A Claude task in the cloud (chat or Cowork) Keeps going Runs on Anthropic's servers "More involved tasks keep running in the cloud even if you close your laptop or leave the page."
That same task using local folders, your browser or computer use Local part waits Reaches your Mac through Claude Desktop "keep the desktop app open so Claude can reach them"
Cowork scheduled task Runs Runs remotely on its schedule "even when your computer is asleep or the Claude Desktop app is closed"
Claude Code cloud session in Desktop Keeps going Anthropic-managed infrastructure "continue even if you close the app or shut down your computer"
Claude Code local session in Desktop Pauses Runs on your Mac "runs on your machine with direct access to your files"
Local scheduled task in Claude Code Desktop Skipped Fires on your Mac; one catch-up run on wake "only fires while the app is open and your computer is awake"
Dispatch Pauses Works on your desktop computer "your computer needs to be awake and the Claude Desktop app open while Claude works"
Local MCP servers and desktop extensions Pause Installed and run on your Mac Plugins with local MCP servers "work through the desktop app only"
Claude Code SSH session in Desktop Usually keeps going Runs on the remote machine; its sign-in can expire while you are away "Closing the lid counts as sleep." The task goes on until it finishes, needs you, or hits a limit.

Two gaps in Anthropic's material are worth knowing. First, its help pages do not say what happens to a short chat reply that is still streaming at the moment the Mac sleeps; Anthropic only says that "a quick question still gets a quick answer" and that longer tasks run on in the cloud. If a reply looks cut off when you come back, reopen the conversation before you resend. Second, Anthropic does not say whether a Dispatch task resumes after a wake. The Dispatch and Cowork guide covers what is and is not documented there, and the cloud vs local guide helps decide which Claude Code work belongs in the cloud.

Using the Claude Code CLI instead?

The same rule applies: claude in Terminal runs on your Mac, so a closed lid pauses it like any other local session. Start with how to keep Claude Code running with the lid closed, which includes a short test that proves the session kept working. If you steer the CLI from your phone, read Claude Code Remote Control with the lid closed.

How to keep local Claude work going

Pick by situation. The first three are free.

The task needs nothing from this Mac

Run it in the cloud: a normal Claude or Cowork task, a Cowork scheduled task, or a Claude Code cloud session. There is nothing to keep awake. A cloud task reaches folders on your Mac only through Claude Desktop while it is open.

The lid can stay open

Turn on Keep computer awake in Claude Desktop, plug in, and let the display turn off. This is the case the setting was built for, and it costs nothing.

Lid closed at a desk with a monitor

Apple's closed-display mode keeps a closed Mac laptop running with an external display, as long as Apple's conditions are met: the Mac is connected to power and using an external keyboard and mouse.

Lid closed, no monitor

Arm Clamshell for Mac. It keeps an Apple Silicon MacBook awake and on the network with the lid closed while armed, with no sudo or admin rights, and normal lid sleep returns when you disarm or quit. $9.99 once after a 7-day free trial.

There is also sudo pmset -a disablesleep 1, which does survive a closed lid but is a system-wide admin switch that stays on until you undo it. pmset disablesleep explained covers the risks and the undo command.

To set up Clamshell, follow the three steps near the top of this page.

Clamshell keeps your Mac awake with the lid closed, so Claude Code, Dispatch and local MCP servers keep running. Free for 7 days, then $9.99 once for one Mac. 14-day money-back guarantee.

Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or install with Homebrew: brew install --cask clamshell. Also on Setapp.

Frequently asked questions

If I close my laptop, will Claude still run?

Work that runs in Anthropic's cloud does: Anthropic says Cowork sessions, cloud scheduled tasks and Claude Code cloud sessions keep going when you close the laptop. Work that runs on your Mac does not. Closing the lid sleeps the Mac, so local Claude Code sessions, Dispatch, local scheduled tasks, local MCP servers, and anything that needs your files, browser or screen stop until it wakes.

Does Claude's Keep computer awake setting work with the lid closed?

No. The setting prevents idle sleep while Claude Desktop is open, and its own description in the app says closing the laptop lid will still put the computer to sleep. Anthropic's docs say the same. It keeps an open, untouched Mac awake, which is what scheduled tasks need.

Will a Claude chat keep generating if I close my laptop?

Anthropic says more involved tasks keep running in the cloud even if you close your laptop or leave the page, and the result waits in the conversation. Its help pages do not say what happens to a short reply that is still streaming, so reopen the chat and check. Anything that uses files or apps on your Mac needs Claude Desktop open on an awake Mac.

Do Claude scheduled tasks run while my Mac is asleep?

Cowork scheduled tasks run remotely, so Anthropic says they run even when the computer is asleep or the desktop app is closed. Local scheduled tasks in Claude Code Desktop only fire while the app is open and the computer is awake. A run the Mac sleeps through is skipped, and on wake Desktop starts one catch-up run for the most recent miss.

How do I keep Claude running on my Mac with the lid closed?

Move the task to the cloud if it needs nothing from your Mac. Otherwise the Mac itself has to stay awake after the lid closes: use Apple's closed-display mode with power, an external display, keyboard and mouse, or arm Clamshell for Mac, which keeps an Apple Silicon MacBook awake with the lid closed without a monitor or admin rights.

Related guides

Sources checked October 14, 2026: Anthropic's Claude Code docs for Desktop, Desktop scheduled tasks and Remote Control; the Claude Help Center articles on Cowork, Cowork on web, desktop and mobile, Cowork and chat as one Claude, Cowork scheduled tasks, Dispatch, computer use and local MCP servers; the setting text in Claude Desktop for macOS 2.31226.1; and Apple's guides on putting a Mac to sleep and using a Mac laptop with its lid closed. Claude Desktop changes quickly, so check Anthropic's current pages before relying on a detail. The "On this Mac, in the cloud, or on a server" table was checked on November 14, 2026 against Anthropic's cloud sessions, Remote Control and Desktop docs and the tmux wiki. No new hardware testing was done for this page. Clamshell is an independent app, not affiliated with or endorsed by Anthropic or Apple. Claude is a trademark of Anthropic.