Claude Code Remote Control with the MacBook lid closed

By Matyas Rathonyi. Updated October 9, 2026. Guides

Remote Control runs your Claude Code session on your Mac; the phone is only a window into it. Close a MacBook's lid and the Mac sleeps, so the session pauses until you open it again. To keep it working with the lid shut, the Mac has to stay awake: with an external display, with pmset, or with an app such as Clamshell for Mac.

Runs onYour Mac, not the cloud
Lid closesMac sleeps, session pauses
Lid opensReconnects automatically
$9.99 onceClamshell, after a 7-day trial

Clamshell for Mac keeps the Mac awake with the lid closed while armed, so your Remote Control session keeps working. No sudo, no monitor. Free for 7 days.

Download free trial

Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or buy now, $9.99. Reading this on your phone? Send the Mac download link to yourself.

A phone sends prompts to a Claude Code session and receives results. The session runs on a MacBook whose lid closes while it keeps working. prompts results Phone a window Your Mac runs the session
The phone steers. The Mac does the work.Every tool call, file edit and test run happens on the Mac, so the session only moves while the Mac is awake.

Remote Control is the easiest way to keep a Claude Code session going from the couch, the train or another computer. It is also easy to break: you start a task, put the MacBook to sleep by closing it, and the phone has nothing to talk to. This guide sets out what Anthropic's documentation says happens, which fixes actually survive a lid close, and how to set up a phone session that keeps working with the lid shut.

What Remote Control actually runs

Per Anthropic's Remote Control docs, Remote Control connects claude.ai/code or the Claude app for iOS and Android to a Claude Code session running on your machine. Your filesystem, MCP servers, tools and project configuration stay where they are. The docs put the consequence plainly: the web and mobile interfaces are "a window into that local session, so your computer has to stay on and the claude process has to keep running."

The Mac only makes outbound HTTPS requests to the Anthropic API; it opens no inbound ports. That is why it works from anywhere, and also why it needs a Mac that is awake and online to answer.

What happens when you close the lid

  1. You close the lidmacOS starts its lid-close sleep. A running agent does not hold it off.
  2. The Mac sleepsThe claude process is still there, but it stops running. So do builds, tests and downloads.
  3. The phone has nothing to talk toMessages you send cannot reach the Mac, and no work happens.
  4. You open the lidAnthropic's docs say Claude Code reconnects automatically when the machine comes back online.

So closing the lid does not end a Remote Control session; it freezes it. The docs list surviving interruptions as a feature: "if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online." What it cannot do is make progress in between. If you closed the lid for a two-hour train ride, the task you left running is where you left it.

What actually takes a session offline is stopping the process: closing the terminal, quitting the Desktop app or VS Code, or pressing Ctrl+C in server mode. One more case is worth knowing if you keep the Mac awake: when an awake Mac loses its network, server mode gives up after roughly ten minutes and exits, while an interactive session keeps retrying until the network returns.

Lid closed with nothing armed: the MacBook sleeps, the link to the phone is cut and the session's work stops. z Mac sleeps session paused Lid closed with Clamshell armed: the MacBook stays awake, the link to the phone stays up and the session keeps working. Mac stays awake session working
Same lid, two outcomes. Without a lid-sleep fix the Mac sleeps and the phone loses its session until you open the lid. With the Mac kept awake, the link stays up and the work continues behind a black screen.

Every way to keep it running, honestly

The fix is never in Claude Code; it is whatever keeps the Mac awake after the lid closes. Some of the usual answers don't do that.

OptionSurvives a lid closeWhat it takesThe catch
Mac mini or another desktop Mac No lid to close A Mac that stays on a desk Only helps if the work can live on that Mac
External display (closed-display mode) Yes Power, a display, and an external keyboard and mouse, per Apple Hardware you have to own and stay plugged into
Cloud session instead Yes A task that only needs your repository; nothing runs on the Mac No local files, MCP servers, tools or keys; it is not Remote Control
caffeinate No Nothing, it ships with macOS Blocks idle sleep only; the lid still sleeps the Mac
pmset disablesleep Yes, with risk Admin rights: sudo pmset -a disablesleep 1 System-wide until you undo it, on battery and in a bag too

Claude Desktop's own Keep computer awake setting belongs in the caffeinate row. Anthropic's Desktop scheduled tasks docs say it prevents idle sleep, and that "closing the laptop lid still puts it to sleep."

Timeline of a two-hour task. With no fix and with caffeinate, progress stops when the lid closes and the Mac sleeps. With Clamshell armed, progress continues to the end with the lid closed. No fix z caffeinate z Clamshell lid closes
Where the two hours go. Without a lid-sleep fix, and with caffeinate, progress stops at the moment the lid closes and resumes only when you open it. With the Mac kept awake, the task finishes while the lid is shut.

Pick in three questions

Decision tree. Does the task need this Mac? If no, use a cloud session. If yes, must the lid close? If no, keep the lid open or use a desktop Mac. If yes, is a monitor at hand? If yes, use closed-display mode. If no, arm Clamshell. Needs this Mac? No Yes Cloud session Lid must close? No Yes Lid open Monitor? Yes No Display mode Clamshell
Most people stop at the first question. If the work does not need this Mac, a cloud session needs no keep-awake at all. If it does and the lid has to close without a monitor, pmset disablesleep also works at the last step, at the cost of a system-wide setting you have to remember to undo.

The task only needs your repo

Start a cloud session instead of Remote Control. It runs on Anthropic's infrastructure and does not care about your lid.

You are at a desk with a monitor

Use Apple's closed-display mode: power, display, keyboard and mouse. No extra software.

The lid closes and there is no monitor

Arm Clamshell before you close the lid. The Mac stays awake and online, the built-in display stays black, and Remote Control keeps its session.

Clamshell keeps your Mac awake with the lid closed, so your phone keeps its Remote Control session. Free for 7 days, then $9.99 once.

Download free trial

Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB.

Set up a Remote Control session that survives the lid

Use an Apple Silicon MacBook on macOS 14 or later, on a hard, ventilated surface, ideally on power. Disconnect external displays: Clamshell pauses while one is connected.

  1. Start Remote Control with the lid open. In your project, run claude remote-control, or type /remote-control in a session you already have open. Scan the QR code or open the session URL on your phone, and send a small request to check that the Mac answers.
  2. Turn on push notifications if you want them. Anthropic's docs describe two /config toggles, Push when Claude decides and Push when actions required, so your phone hears about finished tasks and permission prompts.
  3. Arm Clamshell. Use the menu bar, hold Option while closing the lid on a MacBook Air M2 (2022) or later or a 14-inch or 16-inch MacBook Pro (2021) or later, or request it from a terminal:
    open "clamshell://arm"
  4. Confirm the armed state, then close the lid. Open Clamshell's menu and check it is armed before you close. From your phone, send another request and watch for the reply.
  5. Finish cleanly. Open the lid, let the task end, then disarm from the menu or with open "clamshell://disarm". Confirm it is inactive before the Mac goes into a bag.

open "clamshell://arm" only sends a request; a clean exit does not prove the Mac is armed. Check the menu before closing the lid. Menu bar arming covers the next close, and Option-close ends when you open the lid; right-click and Shortcuts arming stay on until you disarm.

Clamshell's thermal safety is always on. If macOS reports serious or critical thermal pressure, it disarms toward normal lid sleep and blocks arming until the Mac cools, which also pauses your session. An optional low-battery cutoff, off by default, does the same before the battery runs flat. None of this replaces airflow: keep a closed, awake Mac out of bags and off soft surfaces. Clamshell does not detect Claude Code or approve permission prompts; your phone still does that. For a step-by-step check that work really continued, see the timestamp test in the Claude Code lid-closed guide.

Claude Desktop, Dispatch and Cowork scheduled tasks

The same rule applies inside the Claude Desktop app. A local session in its Code tab can use /remote-control, and Dispatch, which takes tasks from the Claude mobile app, runs its Code sessions on your machine through Desktop. Both need the Mac awake.

If a scheduled task needs this Mac and the lid will be closed, the options above apply unchanged.

Frequently asked questions

Does Claude Code Remote Control work with the MacBook lid closed?

Only while the Mac stays awake. Remote Control runs the session on your Mac, and closing the lid normally puts the Mac to sleep, so the session stops making progress. It keeps working lid-closed with an external display setup, with sudo pmset -a disablesleep 1, or with a lid-closed app such as Clamshell for Mac.

Does closing the lid end my Remote Control session?

Not by itself. Anthropic's docs say that if your laptop sleeps or your network drops, Claude Code reconnects automatically when the machine comes back online. Nothing runs while the Mac is asleep, though. Closing the terminal, quitting the app or otherwise stopping the claude process is what takes the session offline.

Does caffeinate keep Remote Control running with the lid closed?

No. caffeinate prevents idle sleep, not lid-close sleep. The same applies to the Claude Desktop app's Keep computer awake setting: Anthropic's docs say closing the laptop lid still puts the Mac to sleep.

Should I use a cloud session instead of Remote Control?

If the task only needs your repository, yes. A cloud session runs on Anthropic's infrastructure and does not depend on your Mac being awake. Remote Control is for work that needs your machine: its files, MCP servers, tools and project configuration.

Which plans support Claude Code Remote Control?

Anthropic's docs list Pro, Max, Team and Enterprise plans. API keys are not supported, and on Team and Enterprise an Owner must first turn on the Remote Control toggle in the Claude Code admin settings.

Is it safe to keep a closed MacBook awake for a Remote Control session?

On a hard, ventilated surface, preferably on power, yes. Never put an awake Mac in a bag. Clamshell's thermal safety is always on: at serious or critical thermal pressure it disarms toward normal lid sleep and blocks arming until the Mac cools.

Related guides

Sources checked October 9, 2026: Anthropic's Claude Code docs for Remote Control, Desktop and Desktop scheduled tasks, the Claude Help Center article on Cowork scheduled tasks, and Apple's guidance on using a Mac laptop with its lid closed. Remote Control features change often; check Anthropic's current docs before relying on a detail. Clamshell is an independent app, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.