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 the Mac awake with the lid closed to stay reachable.

Short answer: Claude Code Remote Control is a window into a claude process on your Mac, so the Mac has to stay on, awake and online. Closing the lid puts a MacBook to sleep: the session goes offline, nothing runs, and Claude Code reconnects only when the Mac wakes. Keep the Mac awake with the lid closed, with an external display or a Keep Mac Awake session, and the session stays reachable from your phone as long as the Mac's network connection holds.

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, Team or Enterprise plan, a claude.ai login, and a computer that stays on with the claude process running (Remote Control docs).

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).
  • 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.

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). 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). Why caffeinate does not help either is in keep Claude Code running with the lid closed.

How do I keep Remote Control reachable with the lid closed?

Keep the Mac awake with the lid closed, with an external display or a Keep Mac Awake session, and keep it on power and on a network. Being awake is only half of it: the connection still depends on your Wi-Fi or Ethernet.

The free routes: keep the lid open, as Anthropic advises for overnight Desktop tasks (Desktop), or connect an external display with power and an external keyboard and mouse (Apple Support). Keep Mac Awake does it with the lid closed and no display.

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 and no external display, Keep Mac Awake (keepmacawake.com) keeps a MacBook with Apple silicon on macOS 26 or later awake for a session you 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. A session lasts as long as you pick: no limit, 1 hour, 8 hours or a custom number of hours up to 168. With the lid closed the built-in display goes dark. A session runs on AC power by default, and a separate watchdog restores the normal sleep setting if anything stops or hangs. It is free for 3 days (sessions up to 8 hours, no card), then 9 USD once per Mac plus tax. 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.

  1. Run claude update. Version 2.1.287 fixed server-mode sessions "stopping mid-turn when the Mac went to idle sleep" (changelog).
  2. Plug the Mac into power and put it on a hard surface with airflow.
  3. Start a session: keepmacawake start --hours 8.
  4. In your project, run claude --remote-control "Night run", or claude remote-control --name "Night run" for server mode.
  5. On your phone, open the Claude app, tap "Code" and pick the session with the green dot, or scan the QR code. Run /mobile in Claude Code if you still need the app.
  6. Optional: in /config, turn on "Push when Claude decides" and "Push when actions required" to get notifications.
  7. Close the lid. Send a message from your phone to check that the session answers.
  8. 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 the default AC-only setting, a session waits until power is back).
  • Did claude stop? 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 --continue in the same directory brings the session back for about four hours after the stop; for an interactive session, use claude --continue or claude --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 as Remote Control requires a claude.ai subscription, run claude auth login; claude doctor shows which eligibility check failed.

FAQ

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 an external display or a Keep Mac Awake session, the Mac stays awake and the session stays reachable while its network connection holds.

Does Remote Control reconnect after my Mac wakes up?

Yes. As of October 2026, Anthropic's docs say Claude Code reconnects automatically when the machine comes back online after sleep or a network drop. The work does not continue while the Mac is asleep.

Why does Claude Code Remote Control keep disconnecting?

Usually the Mac went to sleep, the claude process stopped, or the network dropped. Keep the Mac awake and plugged in, prefer claude --remote-control on unreliable Wi-Fi, and update Claude Code.

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.

Can I start a new Claude Code session from my iPhone?

Yes, with server mode. Run claude remote-control on the Mac, and the machine appears as a device card in the Code tab of the Claude app; tap it to pick a directory and start a session. More options are in steer your agents from your phone.

Sources