You start Claude Code on a long task, turn on Remote Control, close the MacBook and head out. An hour later you open the Claude app on your phone. The session is there, but nothing has moved.
That's not a Remote Control bug. Your Mac went to sleep, and Claude Code went to sleep with it.
The short answer
Remote Control doesn't move Claude Code anywhere. The claude process keeps running on your Mac, and the phone is only a window into it. Anthropic's docs say it plainly: "your computer has to stay on and the claude process has to keep running."
So when the Mac sleeps, the whole process is frozen. When the Mac wakes and gets back online, an interactive session reconnects on its own and carries on. Nothing is lost, but nothing happened in between either.
That leaves two ways out: keep the Mac awake, or run Claude Code on a machine that never sleeps. Here are the honest options, cheapest first.
What people run into
The Claude Code issue tracker has plenty of this. A few public examples:
- #81832: the Mac idle-sleeps mid-task once the display is off, and "the whole CLI process tree is suspended".
- #102597: background agents were still running when the lid closed on battery. Overnight, every short wake re-sent their full context and used up plan usage, with almost nothing done.
- #21432: Claude Code already starts short
caffeinateruns while it works, and people want a switch for it.
That last one is worth knowing. Recent versions of Claude Code hold off idle sleep while a task is running. They don't keep the Mac awake while the session sits waiting for your next message, and they can't stop the sleep you get from closing the lid on battery.
Option 1: caffeinate (free, built into macOS)
Open a terminal tab and run:
caffeinate -dimsThe Mac stays awake for as long as that command runs. Stop it with Ctrl+C. To tie it to Claude Code itself, so the Mac can sleep again when you quit:
caffeinate -dims claudeTwo things to know. Closing the lid still sleeps a MacBook, unless it's in clamshell mode (power plus an external display). And -s only works while the Mac is on power. To check what is holding the Mac awake right now, run pmset -g assertions.
Good for: an afternoon away from the desk with the lid open and the charger in.
Option 2: pmset (free, system-wide)
pmset changes the Mac's power settings for good, not just for one command. To stop idle sleep while on the charger:
sudo pmset -c sleep 0Some people go further and turn off sleep completely, lid included:
sudo pmset -a disablesleep 1This one is blunt. A closed MacBook in a bag stays fully awake and gets hot, and the battery drains. Turn it back with sudo pmset -a disablesleep 0 and don't forget you set it.
Good for: a laptop that lives on a desk, plugged in, and you know what you changed.
Option 3: Amphetamine (free app)
Amphetamine is a free menu-bar app from the Mac App Store. It does the same as caffeinate, with a nicer switch: keep awake for two hours, until a download finishes, or while a certain app is running. It also has a closed-lid mode. Read its own notes before you use that, because a shut MacBook with no airflow runs warm.
Good for: people who don't want to remember terminal flags.
Option 4: a spare Mac that never sleeps
If you have an old Mac mini or MacBook lying around, it can be Claude's machine. In System Settings, under Energy, turn on "Prevent automatic sleeping when the display is off" and "Start up automatically after a power failure" (on a MacBook, the sleep setting is under Battery, Options). Then start Claude Code inside tmux, so closing the terminal doesn't kill it:
tmux new -s claude
cd ~/your-project
claude remote-controlclaude remote-control is server mode. It prints a link and a QR code for your phone. If you'd rather have a normal session, run claude and type /remote-control.
The catch: it's a server now, on your home Wi-Fi and your power. If the Mac restarts for an update, tmux doesn't come back by itself.
Option 5: tmux on a small Linux server
Same idea, but a rented box in a data center, which has steady power and network. A few dollars a month covers light work; builds and tests need more memory. The full setup, and what breaks in the weeks after, is in Running Claude Code on a server.
The catch: you are the sysadmin. Reboots, Claude's login running out, the process dying at night: all yours, and nothing tells you. You find out when the phone shows nothing.
Option 6: Claude Code cloud sessions
If your task is "take this GitHub repo and do X", Anthropic's cloud sessions are worth trying first. You start one from claude.ai/code or the Claude app, it runs on Anthropic's machines, and it keeps going after you close the laptop. It counts toward your normal plan usage.
The catch: it's a session, not a machine you keep. After a while of no activity the machine is reclaimed. The chat comes back; a dev server, a database or a long script doesn't. Great for one-off repo tasks.
The trade-offs, side by side
- caffeinate / Amphetamine: free, one minute to set up. The Mac stays on your desk with the lid open, and you can't take it with you.
- pmset disablesleep: free, covers lid close. Heat and battery drain, and easy to forget it's on.
- Spare always-on Mac: free if you own one. Your power, your Wi-Fi, and you restart things after updates.
- Linux server + tmux: a few dollars a month. Steady, but you babysit it.
- Cloud sessions: included in your plan. Not a machine that keeps your services running.
Where Podway fits
Podway is built for the last gap: the server option, without being the sysadmin. A pod is a small always-on cloud computer with Claude Code already on it. You sign in once with your own Claude Pro or Max plan, and Remote Control is turned on every time Claude starts. You open the session from the Claude app on your phone, and your Mac can sleep all it wants.
If the agent crashes, Podway restarts it and reconnects Remote Control on its own. Before Claude's login expires, Podway tells you and gives you a one-click reconnect. Pod restarts and updates reconnect too. Your files, dev server and scheduled jobs stay on the pod.
To be plain about what it needs: your own Claude Pro or Max plan, since Podway doesn't include one. On a Team or Enterprise plan, your org Owner has to enable Remote Control first. Your first pod is free, no card needed, and pods start at $4/month. If that sounds useful, start a pod.
If you're fine keeping a Mac plugged in, caffeinate is free and works today. Pick the one that matches how often you walk away.
FAQ
Does Claude Code keep running when I close my MacBook lid?
No. Closing the lid puts the Mac to sleep, and the claude process sleeps with it. The exception is clamshell mode, with power and an external display connected, or a setting like pmset disablesleep that blocks sleep entirely.
Does Remote Control work while my Mac is asleep?
No. Your phone shows the session, but it can't do anything until the Mac wakes up. When it's back online, an interactive session reconnects on its own and picks up where it was.
Doesn't Claude Code already keep my Mac awake?
Partly. Recent versions run short caffeinate timers while a task is in progress, which holds off idle sleep. It doesn't cover the time the session waits for you, and it doesn't stop lid-close sleep on battery.
Can I use Remote Control on a Team or Enterprise plan?
Yes, once an Owner turns on Remote Control in the Claude Code admin settings. Until then it won't start. API keys don't work with Remote Control; you need a claude.ai sign-in on Pro, Max, Team or Enterprise.
What's the cheapest way to keep Claude Code running 24/7?
A Mac you already own, plugged in, with sleep turned off. It costs nothing but power. The trade-off is that you restart things yourself after an update or an outage.