Claude Code Remote Control keeps disconnecting? Check sleep first

By Matyas Rathonyi. Updated November 25, 2026. Guides

Check Mac sleep first, because one Terminal command proves in a minute whether macOS slept at the exact moment your session dropped. If the log shows sleep after you closed your MacBook lid, free idle tools like caffeinate cannot stop it; Clamshell for Mac keeps a closed Apple Silicon MacBook awake and online while armed, with no sudo, no external monitor, and nothing to undo, for $9.99 once after a 7-day free trial (no card required). If your Mac stayed awake through the drop, the cause is the claude process, your network, your login, another device, or an open Remote Control bug.

Written by Matyas Rathonyi, the maker of Clamshell for Mac.

Two rows over time. The top row shows the Mac awake except for one sleep gap. The bottom row shows the Remote Control link with two breaks. The first break lines up with the sleep gap. The second break happens while the Mac is awake, so sleep did not cause it. Mac z Link Sleep Mac slept Not sleep Mac awake time
Two drops, two different causes.The first break in the link sits inside a sleep gap, so keeping the Mac awake fixes it. The second happens while the Mac is awake, and no keep-awake setting will help.

From your phone, every Remote Control disconnect looks identical: the session goes quiet or says it cannot reach your machine. Below is the exact diagnosis order built from Anthropic's Remote Control documentation and the public GitHub issue tracker (checked October 11, 2026), followed by the right fix for whichever step matches your drop. For full closed-lid setup details, see Remote Control with the MacBook lid closed.

The order to check things in

Diagnosis ladder. First: is a reason shown on screen? If yes, follow that fix. If no: is there a sleep entry in the power log at the drop time? If yes, keep the Mac awake. If no: did the claude process stop? If yes, start it again. If no: did the network or login change? If yes, fix it and reconnect. If none apply, it is probably a known bug. Reason on screen? Follow that fix Sleep in the log? Keep Mac awake Process stopped? Start it again Network or login? Fix, reconnect Likely a bug see #33041
Right means yes, down means no. Each step is cheaper than the one below it, and only the second step has anything to do with sleep. Most people skip straight to the last box; the first two take a minute and often settle it.

Work from top to bottom. Each check takes less time than the one below it, and the first two take about a minute.

Step 1: read the reason Claude Code gives you

Before guessing, check the terminal on your Mac. Anthropic's docs state that when an interactive Remote Control connection fails, the indicator changes and "Claude Code shows the reason in a notification and adds it to the conversation." Scroll up in your session and look for a line beginning with Remote Control disconnected. If one is present, it names the cause so you can jump directly to the matching step below.

In server mode (claude remote-control), Anthropic's docs list --verbose for detailed connection and session logs and --debug-file <path> to save debug logs to a file. Enable them if disconnects repeat.

Do not take the phone's wording at face value. A commenter on GitHub issue #33041 reported the client displaying that the machine "may be asleep or offline" while both the Mac and the Remote Control process were still up. Treat the phone message as a guess and verify against the Mac's power log next.

"It may be asleep or offline. This session will reconnect when it's back."

The phone or web app shows Can't reach <your computer>. It may be asleep or offline. This session will reconnect when it's back. when it gets no answer from the Mac. A sleeping Mac is one cause, and Step 2 rules it in or out with one command. The message is the app's guess, though: GitHub issue #104917 (open, filed October 2026) reports it staying on screen after the computer was back online and the server had logged Connected. If the power log shows sleep at the drop time, the fix is to keep the Mac awake with the lid closed, which is what Clamshell for Mac does. If it shows no sleep, go to Step 3.

"Remote Control disconnected — Transport recovery exhausted (code 4094)"

This line appears in the terminal on the Mac. The wording says the reconnect attempts ran out. GitHub issue #108302 (open, filed November 2026) reports it on Claude Code 2.1.319 in a sandbox whose traffic to api.anthropic.com goes through a proxy. Check the power log for sleep at that time first (Step 2), then the network path (Step 4).

"Remote Control failed to disconnect: Cannot read properties of undefined (reading 'session_url')"

This one is not about sleep or your network. It was reported as a bug in the disconnect step of /remote-control (GitHub issues #81155, #82262 and #82702, all closed; #82702 names Claude Code 2.1.220 on macOS). Update Claude Code first. Keeping the Mac awake does not change it.

Step 2: rule sleep in or out

Note the approximate time the session dropped, open Terminal on your Mac, and run:

pmset -g log | grep -E "Entering Sleep|Wake from" | tail -40

The pmset(1) manual describes -g log as "a history of sleeps, wakes, and other power management events." It requires no sudo. On an Apple Silicon MacBook, matching lines look like this:

2026-10-11 14:43:28 +0200 Sleep     Entering Sleep state due to 'Maintenance Sleep' ... Using Batt (Charge:65%)
2026-10-11 14:47:32 +0200 Wake      Wake from Deep Idle [CDNVA] : due to ... lid ... HID Activity
A power log where the session dropped at 14:02. The log shows Sleep at 14:02 and Wake at 14:31, so sleep caused the drop. 13:10 Wake 14:02 Sleep 14:31 Wake dropped at 14:02 Sleep caused it A power log where the session dropped at 14:02. The log shows a Wake at 09:15 and no Sleep until 23:40, so the Mac was awake and sleep did not cause the drop. 09:15 Wake 23:40 Sleep dropped at 14:02 Look elsewhere
Compare the drop time with the log. A Sleep entry at the drop and a Wake entry where the session came back means sleep. A Mac that was awake straight through the drop means you can stop adjusting sleep settings.

How to read your output:

If the timestamps line up, pick the fix for how you use the laptop:

That is where Clamshell for Mac solves the disconnect: it keeps a closed Apple Silicon MacBook awake and on Wi-Fi while armed, with no monitor, no sudo, an always-on heat cut-off, and a 20% low-battery floor, and restores normal lid sleep when you disarm or quit. Test it on your Mac before paying anything: Download free trial (free for 7 days, no card required; $9.99 once for 1 Mac or $19.99 for up to 3 Macs, 14-day money-back guarantee).

To see what is preventing sleep right now, run pmset -g (check the sleep line) or pmset -g assertions. If your Mac stayed awake straight through the drop time, sleep did not cause it. Move to Step 3.

Step 3: check the process is still running

Remote Control depends on a live local process. Anthropic's docs state: "If you close the terminal, quit the Desktop app or VS Code, or otherwise stop the claude process, the session goes offline."

Step 4: network changes and outages

A Mac can stay awake and still lose contact with Anthropic's servers. Anthropic's docs describe four network cases:

What happenedClaude Code behaviorWhat you seeFix
VPN or proxy HTTP 403Retries up to 3 minutesReason naming edge, VPN, or proxyFix hop, run /remote-control
Long outage (interactive)Keeps retrying until backAuto-reconnects on recoveryNone needed
Long outage (server mode)Exits after about 10 minutesProcess no longer runningRun claude remote-control
Presence heartbeats failDisconnects interactive sessioncould not reach the Remote Control server for about 30 minutesRun /remote-control

Step 5: login, policy and other devices

Step 6: the drops that are not your Mac

If your Mac stayed awake, claude stayed running, your network held, and your login was valid, you may be hitting a documented bug. Three threads in anthropics/claude-code (checked October 11, 2026) describe drops on awake Macs:

None of those threads includes an official fix. Workarounds users report there:

If your logs match, comment on #33041 with your Claude Code version and the pmset -g log output proving the Mac stayed awake.

When keeping the Mac awake is the fix

Keep-awake tools fix Remote Control disconnects whenever Step 2 shows a Sleep entry at the drop time. If your log shows the lid-close reason because you closed your MacBook lid without an external monitor, your choices are sudo pmset -a disablesleep 1 (admin password both ways, no timer, no menu bar state, no heat or battery cut-off) or a lid-closed app built for daily coding-agent runs.

Why pay $9.99 once for Clamshell? You stop the Remote Control drops that lid-close sleep causes, with no sudo, no external monitor, and nothing to undo, while getting an always-on heat cut-off and a 20% battery stop out of the box.

When you do not need Clamshell:

Frequently asked questions

Why does Claude Code Remote Control keep disconnecting?

Six causes account for drops: Mac sleep (especially closing a MacBook lid), the claude process exiting, a network or VPN change, an expired claude.ai login, another device taking over or archiving the session, or an open connection bug tracked in GitHub issue #33041. Check pmset -g log first; if lid-close sleep matches your drops, arm Clamshell for Mac.

How do I tell if Mac sleep caused the disconnect?

Note the drop time and run pmset -g log | grep -E "Entering Sleep|Wake from" | tail -40 in Terminal. A Sleep entry at the drop time (with the lid-close reason from Step 2 after closing the lid) and a Wake entry when it returned confirms sleep caused it; arm Clamshell to prevent closed-lid sleep. If the Mac stayed awake across the drop, follow Steps 3 to 6.

Does caffeinate stop Remote Control from disconnecting?

Only when open-lid idle sleep caused the drop. caffeinate blocks idle sleep with the lid open, does not override lid-close sleep, and cannot prevent network, login, or server-side drops (issues #33041 and #50767 report drops with caffeinate active). When closing the lid triggers the drop, use Clamshell instead.

How do I reconnect Remote Control after it drops?

After sleep or a brief network drop, Anthropic's docs say Claude Code reconnects automatically once the Mac is awake and online. If it does not, run /remote-control inside the session, restart claude remote-control in server mode, or resume an exited session with claude --continue or claude --resume.

Can I reconnect from my phone without touching the Mac?

Not once the link fails on the Mac side: Anthropic's documented recovery is running /remote-control on the host machine. Commenters on issue #33041 work around this by keeping SSH into tmux or Screen Sharing available to reach the Mac remotely, which still requires the Mac to stay awake.

Will keeping the Mac awake fix every Remote Control disconnect?

No. Keeping the Mac awake eliminates every drop lined up with a Sleep entry in pmset -g log, including closed-lid drops when paired with Clamshell. It cannot prevent VPN HTTP 403 blocks, expired logins, or the server-side drops tracked in issue #33041.

Why pay $9.99 for Clamshell instead of using pmset disablesleep?

sudo pmset -a disablesleep 1 needs admin rights to enable and disable, applies on battery with no stop, and leaves no menu bar indicator or heat cut-off if you forget to undo it. Clamshell costs $9.99 once (no subscription) so you stop closed-lid Remote Control drops with no sudo, always-on thermal safety, and a 20% battery floor. Test the 7-day free trial (no card required) first.

Try Clamshell free for 7 days

Stop closed-lid Claude Code Remote Control disconnects on your Apple Silicon MacBook with no monitor, no sudo, an always-on heat cut-off, and a 20% battery floor. Normal lid sleep returns when you disarm or quit.

Download free trial $9.99 once, no subscription

$9.99 for 1 Mac, $19.99 for up to 3 Macs. 7-day free trial with no card required and a 14-day money-back guarantee. Apple Silicon, macOS 14 or later, notarized by Apple. Also available via Homebrew (brew install --cask clamshell) or Setapp.

Related guides

Sources checked October 11, 2026: Anthropic's Claude Code Remote Control docs and error reference, GitHub issues #33041, #34500, #50767, and #81832 in anthropics/claude-code, macOS pmset(1) and caffeinate(8) manuals, and Apple's sleep settings guide. Issue states and counts are as of that date; comments are user reports, not confirmed diagnoses. Clamshell details from version 2.0.5 and published documentation. Product names belong to their respective owners.