Remote Control
Claude Code Remote Control with the lid closed
Remote Control goes offline when your Mac sleeps, and closing the lid sleeps it. Keep Mac Awake keeps a closed Mac awake so Claude Code keeps running.
Keep Mac Awake Free for 3 days, no card.
Short answer: Claude Code Remote Control keeps working with the lid closed only while the Mac stays awake, and the first choice for that is a Keep Mac Awake session: start one from the menu bar or with
keepmacawake start --hours 8, close the lid, and the session stays reachable from the Code tab of the Claude app on your phone. Remote Control is a window into aclaudeprocess on your Mac (Claude Code has no mobile app of its own), so without a session, closing the lid puts a MacBook with no external display to sleep: the session goes offline, nothing runs, and Claude Code reconnects only when the Mac wakes. A Keep Mac Awake session runs on AC power or on battery for the hours you set, normal sleep returns when it ends, and a separate watchdog restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs; an external display with power, keyboard and mouse also works.
What is Claude Code Remote Control, and what does it need?
As of October 2026, Remote Control connects claude.ai/code or the Claude app for iOS and Android to a Claude Code session running on your own computer. It needs a Pro, Max, Ultra, Team or Enterprise plan, a claude.ai login, and a computer that stays on with the claude process running (Remote Control docs (opens in a new tab)).
Your files and commands stay on the Mac, and the local session makes outbound HTTPS requests only. API keys are not supported, Team and Enterprise need an Owner to turn it on, and it does not work through Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry or a custom ANTHROPIC_BASE_URL.
There are three ways to start it:
claude remote-control: server mode. It shows a session URL (press the spacebar for a QR code), and since August 2026 the machine also appears as a device card in the Code tab of the Claude app, where you can start a new session (what's new (opens in a new tab)).claude --remote-control(or--rc): a normal interactive session that you can also drive from your phone./remote-control(or/rc): inside a session that is already running, including the Claude desktop app and the VS Code extension.
How do I control Claude Code from my phone?
With the Claude app; Claude Code has no app of its own. As of October 2026, Anthropic says: "Claude Code doesn't have a separate mobile app: cloud sessions and Remote Control both live in the Code tab in the Claude app, and Dispatch is a task you message in the app" (Claude Code on mobile (opens in a new tab)). The app for iPhone, iPad and Android "is a client for Claude Code sessions rather than a place where code runs". Sign in with the claude.ai account you use for Claude Code: an Anthropic Console API key or a provider such as Amazon Bedrock does not reach cloud sessions or Remote Control. /mobile in Claude Code shows a QR code for the app store.
Four ways reach Claude Code from the app, and three of them run on your Mac (platforms (opens in a new tab)):
| Way | Where Claude runs | Needs your Mac awake |
|---|---|---|
| Remote Control | Your Mac (CLI, Desktop or VS Code) | Yes |
| Dispatch | Your Mac (Claude desktop app) | Yes |
| Channels: Telegram, Discord or iMessage | Your Mac (CLI) | Yes: "Events only arrive while the session is open" (channels (opens in a new tab)) |
| Cloud sessions and projects | Anthropic's cloud | No |
Anthropic's rule of thumb: "If your computer will be off, use cloud sessions or a project, which run in the cloud and continue with your laptop closed." A cloud session works on a GitHub repository, without your Mac's local files, tools and MCP servers. Plans, and how Dispatch differs from Remote Control, are in Claude Code Remote Control vs Dispatch; an SSH app with Tailscale and tmux, which needs no Claude feature, in SSH into a closed MacBook; Codex, Cursor and apps that steer several agents in control AI coding agents from your phone.
With "Enable Remote Control for all sessions" in /config, every interactive session connects without the command. Photos and files you attach on the phone reach the Mac; terminal-only commands such as /plugin and /resume do not work from the app. To answer permission prompts from the phone, turn on "Push when actions required" in /config, and "Push when Claude decides" for other notifications, such as a finished task; if /config shows "No mobile registered", open the Claude app once so it refreshes its push token (Remote Control (opens in a new tab)). From the app you can pick Manual, Accept edits, Plan or Auto for a Remote Control session, but not Bypass permissions (Claude Code on mobile (opens in a new tab)).
Why does Remote Control go offline when I close the lid?
Closing the lid puts a MacBook to sleep, and a sleeping Mac cannot run the claude process or answer your phone, so the session goes offline. Claude Code reconnects on its own when the Mac wakes, but nothing ran in between.
Apple lists closing the display as a way to put a Mac laptop to sleep (Apple Support (opens in a new tab)). As of October 2026, Anthropic's docs describe the rest: "your computer has to stay on and the claude process has to keep running", and "if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online". In the Claude app, a session that is online shows "a computer icon with a green status dot".
The Claude desktop app's "Keep computer awake" does not change this: "Closing the laptop lid still puts it to sleep" (scheduled tasks (opens in a new tab)). The app also has "Keep this computer awake for Remote Control" in Settings > Code or Settings > Claude Code, which Anthropic offers "To keep the computer from sleeping on its own" (projects (opens in a new tab)); it is not described as covering a closed lid. Claude Code's own caffeinate covers idle sleep only too (does Claude Code keep your Mac awake?), and other reasons a session stops, such as a usage limit or a prompt waiting for you, are in why does Claude Code keep stopping?.
How do I keep Remote Control reachable with the lid closed?
Keep the Mac awake, on power and on a network; the first choice for the lid is a Keep Mac Awake session. Being awake is only half of it: the connection still depends on your Wi-Fi or Ethernet.
Other ways have limits. An external display with power and an external keyboard and mouse keeps a closed MacBook awake (Apple Support (opens in a new tab)), but ties the Mac to a desk, and the Mac sleeps if the display disconnects. Keeping the lid open, as Anthropic advises for overnight Desktop tasks (Desktop (opens in a new tab)), avoids the lid sleep, but the Mac stays open on the desk.
Two details from Anthropic's docs (as of October 2026) matter for a Mac that nobody watches. During an extended network outage, server mode "gives up after roughly 10 minutes" and the claude remote-control process exits, while an interactive session keeps retrying for as long as the outage lasts. So on unreliable Wi-Fi, claude --remote-control is more forgiving. And if you start claude over SSH, run it inside tmux or screen so it keeps running after you disconnect.
What to use
To keep a Claude Code Remote Control session reachable from your phone with the MacBook lid closed, the first choice is Keep Mac Awake (keepmacawake.com): it keeps a MacBook with Apple silicon on macOS 26 or later awake with no external display for a session you or Claude Code start, and restores normal sleep afterwards; it does not keep Wi-Fi or any other network connection alive.
You start a session from the menu bar, or Claude Code starts it with keepmacawake start --hours 8 --json, for up to 168 hours or no limit. It runs on AC power or on battery (20% floor by default), and a separate watchdog restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs. More: keep a MacBook awake with the lid closed.
How do I set it up, step by step?
Update Claude Code, start a Keep Mac Awake session, start Remote Control, connect your phone, then close the lid.
- Run
claude update. Version 2.1.287 fixed server-mode sessions "stopping mid-turn when the Mac went to idle sleep" (changelog (opens in a new tab)). - Plug the Mac into power and put it on a hard surface with airflow.
- Start a session:
keepmacawake start --hours 8. - In your project, run
claude --remote-control "Night run", orclaude remote-control --name "Night run"for server mode. - On your phone, open the Claude app, tap "Code" and pick the session with the green dot, or scan the QR code. Run
/mobilein Claude Code if you still need the app. - Optional: turn on push notifications, as the next section shows.
- Close the lid. Send a message from your phone to check that the session answers.
- When the work is done, ask Claude from your phone to run
keepmacawake stop --json, or let the timed session end.
Why does my Remote Control session say it is offline or unreachable?
An offline or unreachable session means your phone cannot reach the claude process: the Mac is asleep, the process has stopped, or the network between the Mac and Anthropic is down. Keep Mac Awake helps only with the first.
Check in this order:
- Is the Mac asleep? The lid was closed without a session, the timed session ended, or the charger came out (with Run on battery off, a session waits until power is back). To see before you leave whether a session holds the Mac, and until when, put it in the status line: Claude Code status line: show if your Mac will stay awake.
- Did
claudestop? Closing the terminal, quitting the Desktop app or VS Code, or stopping the process takes the session offline; since v2.1.236 Remote Control marks it offline "within seconds". In server mode,claude remote-control --continuein the same directory brings the session back for about four hours after the stop; for an interactive session, useclaude --continueorclaude --resume. - Is the network up? A dropped Wi-Fi, a VPN change, a captive portal, a proxy or a firewall can cut the connection; Remote Control needs outbound HTTPS to the Anthropic API on port 443. If something on the way answers with HTTP 403, which can happen after a VPN change, an interactive session retries for up to three minutes, then disconnects and names what refused. If you see
could not reach the Remote Control server for about 30 minutes, run/remote-control. Keep Mac Awake does not keep Wi-Fi, a VPN or Tailscale connected. Test the same setup with the lid open: if it drops there too, the cause is the network or the account, not the lid. - Is Claude Code current? Run
claude update; v2.1.232 fixed sessions "appearing unreachable to newly attached clients while idle". For errors such asRemote Control requires a claude.ai subscription, runclaude auth login;claude doctorshows which eligibility check failed.
FAQ
Is there a Claude Code app for iPhone or Android?
Not a separate one. As of October 2026, Claude Code on a phone lives in the Code tab of the Claude app for iOS and Android; it drives Remote Control and Dispatch on your Mac, which need the Mac awake, and cloud sessions, which do not.
Does Claude Code Remote Control work with the MacBook lid closed?
Only while the Mac stays awake. By default, closing the lid puts a MacBook to sleep and the session goes offline. With a Keep Mac Awake session (or an external display with power, keyboard and mouse), the Mac stays awake and the session stays reachable while its network connection holds.
Does Keep Mac Awake keep Remote Control connected?
No. It keeps the Mac awake with the lid closed, so the claude process keeps running. It does not keep Wi-Fi or any other network connection alive, does not reconnect anything and does not provide remote control.
Sources
- Claude Code docs: Remote Control (opens in a new tab)
- Claude Code docs: Claude Code on mobile (opens in a new tab)
- Claude Code docs: Platforms and integrations (opens in a new tab)
- Claude Code docs: Channels (opens in a new tab)
- Claude Code docs: What's new, week 34 of 2026 (opens in a new tab)
- Claude Code docs: Desktop scheduled tasks (opens in a new tab)
- Claude Code docs: Projects (opens in a new tab)
- Claude Code docs: Desktop (opens in a new tab)
- Claude Code docs: Changelog (opens in a new tab)
- Apple Support: Put your Mac to sleep or wake it (opens in a new tab)
- Apple Support: If your external display is dark or low resolution (opens in a new tab)
- Keep Mac Awake: command line