Guide · October 2026

Keep Remote Control sessions alive with the lid closed

If you use Claude Code's Remote Control to keep a session going from your phone and it stops the moment you close the MacBook lid: the session runs on the Mac, so it pauses when the Mac sleeps. The official docs only promise to reconnect "when your machine comes back online".

What Remote Control does, and doesn't

It does: run claude remote-control (or /remote-control inside a session), scan the QR code with the Claude app, and you can continue that session from your phone or claude.ai/code. It needs a Pro or Max login. Turn on Push when actions required in /config and permission prompts and questions arrive as phone pushes.

It doesn't: keep the Mac awake. The session executes on your Mac, so closing the lid without an external display puts macOS to sleep and Claude stops with it. From the docs: "if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online." It only reconnects afterwards; nothing runs while the Mac sleeps, and messages from your phone wait until it wakes.

Fixing it yourself

On power with the lid open: the caffeinate -i that Claude Code runs while working blocks idle sleep. Just don't close the lid. You can turn the screen off with pmset displaysleepnow.

If you must close the lid (bag, bedside): sudo pmset -a disablesleep 1 is the only thing that stops lid-close sleep. Set it back with sudo pmset -a disablesleep 0 when done: it survives restarts, and if you forget, the Mac stays awake in your bag, draining and heating. On battery you get a few hours at most, and keep it on a hard, ventilated surface.

To know it finished from your phone: besides Remote Control pushes, Stop and Notification hooks can send an ntfy push (copy-paste scripts: claude-code-hooks-recipes).

With Lidnight

Lidnight takes only the part Remote Control leaves out: sleep. It uses Claude Code and Codex hooks to keep the Mac awake while a turn runs (lid closed, on battery too) and, once every session has been quiet for 10 minutes, restores disablesleep and lets the Mac sleep; it also undoes a leftover setting at boot. Keep using Remote Control as is: continue from the couch on your phone, leave the lid closed, and the Mac sleeps on its own when the work is done. Lid-closed is a Pro feature, included in the 7-day trial. Keep a MacBook awake with the lid closed

Try Lidnight free

Apple Silicon Macs · macOS 13 or later. Every download includes a 7-day trial of everything in Pro, no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99, 50% off through Oct 31) with a 14-day refund.

Homebrew: brew install whereisdw/tap/lidnight