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.
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 trialApple 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.
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."
- Server mode:
claude remote-controlin your project folder. It shows a session URL, and pressing the spacebar shows a QR code for your phone. - Interactive session:
claude --remote-control(or--rc) starts a normal terminal session that you can also drive remotely. - From a running session: type
/remote-control(or/rc). This also works in the VS Code extension and in a local session in the Claude Desktop app's Code tab. - Plans: Pro, Max, Team and Enterprise. API keys are not supported, and on Team and Enterprise an Owner has to turn Remote Control on first.
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
- You close the lidmacOS starts its lid-close sleep. A running agent does not hold it off.
- The Mac sleepsThe
claudeprocess is still there, but it stops running. So do builds, tests and downloads. - The phone has nothing to talk toMessages you send cannot reach the Mac, and no work happens.
- 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.
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.
| Option | Survives a lid close | What it takes | The 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 |
| Clamshell for Mac | Yes, while armed | Apple Silicon, macOS 14+, no sudo or monitor | $9.99 once after a 7-day trial; pauses while an external display is connected |
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."
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
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 trialApple 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.
- Start Remote Control with the lid open. In your project, run
claude remote-control, or type/remote-controlin 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. - Turn on push notifications if you want them. Anthropic's docs describe two
/configtoggles, Push when Claude decides and Push when actions required, so your phone hears about finished tasks and permission prompts. - 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" - 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.
- 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.
- Desktop scheduled tasks (Code tab, Local). Anthropic's docs say they run only while the Desktop app is open and the computer is awake. If the Mac sleeps through the scheduled time the run is skipped, and on wake Desktop starts one catch-up run for the most recently missed time within the last seven days.
- Cowork scheduled tasks. As of October 9, 2026, Anthropic's help article says they run remotely, so they keep their schedule while your computer is asleep or the Desktop app is closed, unless a task needs local files or apps; then it only runs locally.
- Remote routines. For work that should run while the Mac is off, Anthropic points to routines, which run in the cloud.
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
- Keep Claude Code running with the lid closed
- What Claude Code's built-in keep-awake covers, and what it misses
- Claude Code cloud vs local on your Mac
- Run AI coding agents overnight on a MacBook
- Clamshell mode without an external display
- What pmset disablesleep does, and its risks
- Is it safe to run a MacBook with the lid closed?
- Keep Codex running when you close your MacBook lid
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.