Remote work
Steer your coding agents from your phone while your Mac stays closed
Claude Code, Codex and Cursor can be steered from a phone, but each needs your Mac awake and online. How to keep it working with the lid closed.
Short answer: As of October 2026 you can steer Claude Code (Remote Control), Codex (the ChatGPT app) and Cursor (Cursor for iOS) from your phone while the work runs on your own Mac, or build the same with SSH, Tailscale and tmux. Every option needs the Mac awake and online, and a MacBook sleeps when you close the lid. Keep it awake with the lid closed, with an external display or a Keep Mac Awake session, keep it on power with airflow, and the agents keep working while you check in from your phone.
How does steering agents from your phone work?
The agent runs on your Mac, with your files, tools and logins, and your phone is a window into it: you read progress, approve actions and send the next task. So the Mac has to stay awake and online the whole time.
The makers agree as of October 2026: Anthropic says "code execution and filesystem access stay on your machine" (Remote Control), OpenAI that files "come from the connected host" (remote connections), and Cursor that your repository and credentials "stay on your machine" (Cursor for iOS). The conversation still passes through the maker's servers. If your Mac will be off, Anthropic points to cloud sessions instead (mobile).
Which coding agents can I control from my phone?
As of October 2026, three makers offer it for work on your own Mac: Claude Code Remote Control, Codex through the ChatGPT app, and remote control for local agents in Cursor for iOS. You can also do it yourself with SSH.
Claude Code Remote Control
You drive a claude session from claude.ai/code or the Claude app for iOS and Android, started with claude remote-control, claude --remote-control or /remote-control; in server mode the Mac appears as a device card in the app's Code tab, where you can start new sessions. It needs a Pro, Max, Team or Enterprise plan, and "your computer has to stay on and the claude process has to keep running". Dispatch (Pro and Max) hands a task to the Claude desktop app, which also needs the computer on (mobile). Details: Claude Code Remote Control with the lid closed.
Codex in the ChatGPT app
The host is the ChatGPT desktop app on macOS (or Windows). You pair it in "Settings > Connections > Control this Mac or PC" by scanning a QR code with the ChatGPT app on iOS or Android; on iOS you then open "Codex" to steer, approve commands and review diffs. Setup cannot start from the Codex CLI. The host must be "awake, online, and signed in", and OpenAI is explicit about the lid: "On a Mac laptop, remote access can stay available with the lid open and power connected. With the lid closed, connect an external display as well. Choosing Sleep still stops remote access." (remote connections). The app's "Prevent sleep while running" and the Codex CLI's experimental features.prevent_idle_sleep say nothing about the lid (settings, config reference).
Cursor remote control
As of October 2026, Cursor for iOS can "see and reply to the local agents running on your computer"; you approve the pairing in the Cursor desktop app. Cursor says: "Your computer needs to stay on and online for remote control to work", and its "Keep this computer awake" setting needs the computer "plugged in with the lid open" (Cursor changelog).
Do it yourself: Remote Login, Tailscale, Termius and tmux
Turn on System Settings > General > Sharing > Remote Login to allow SSH; Apple notes that "allowing remote login to your Mac can make it less secure" (Apple Support). Tailscale puts your phone and Mac on a private WireGuard network where only your own devices reach each other (Tailscale); on macOS its own SSH server needs the open source tailscaled variant, so use Remote Login over Tailscale (Tailscale SSH). Termius is an SSH client for iOS and Android (Termius). tmux keeps a program running after you disconnect (tmux wiki); it does not come with macOS, and Homebrew installs it with brew install tmux:
tmux new -A -s agent # create or reattach the session "agent"
claude # or codex, inside tmux
# detach with Ctrl-b, then d; later, over SSH:
tmux attach -t agent
What does each option need on the Mac?
Every option needs the Mac awake and online; they differ in what runs on the Mac and what their keep-awake setting covers.
| Option, as of October 2026 | Phone app | Runs on the Mac | Account | Its keep-awake setting and the lid |
|---|---|---|---|---|
| Claude Code Remote Control | Claude app or claude.ai/code | A claude process (CLI, Claude desktop app or VS Code) | Claude Pro, Max, Team or Enterprise | Desktop app's "Keep computer awake": "Closing the laptop lid still puts it to sleep" |
| Codex in the ChatGPT app | ChatGPT app | ChatGPT desktop app, signed in | ChatGPT with Codex access | "Prevent sleep while running"; with the lid closed, OpenAI asks for an external display |
| Cursor remote control | Cursor for iOS | Cursor desktop app | Cursor; remote control is on by default except for Enterprise | "Keep this computer awake": plugged in, lid open |
| Do it yourself | An SSH app such as Termius | Remote Login, plus Tailscale and tmux if you choose | None extra | None |
What do all of them have in common?
All of them need a Mac that is awake and online, and a MacBook goes to sleep when you close the lid (Apple Support). The fixes are the same for every agent: keep the lid open, connect an external display, or keep the Mac awake with the lid closed while the work runs. Apple's supported way to use a closed MacBook is an external display with power and an external keyboard and mouse (Apple Support).
"Wake for network access" does not help: Apple describes it as letting the Mac "wake briefly so users can access shared services" (Apple Support), which does not keep an agent working. The network is a separate requirement: if the Mac's Wi-Fi or VPN drops, the remote session drops with it, whatever keeps the Mac awake.
What to use
To steer Claude Code, Codex or Cursor from your phone while a MacBook stays closed with 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; the agent's own remote control, or SSH, still provides the connection.
Keep Mac Awake is a menu bar app plus the keepmacawake command. A session lasts as long as you pick (no limit, 1 hour, 8 hours or a custom number of hours up to 168), and your agent can start it with keepmacawake start --hours 8 --json and end it with keepmacawake stop --json. It does not keep Wi-Fi, a VPN or Tailscale connected, does not wake a Mac that is already asleep and does not provide remote control; it works alongside these tools. It is free for 3 days (sessions up to 8 hours, no card), then 9 USD once per Mac plus tax. Setup with Claude Code: keep Claude Code running with the lid closed. The app: keep a MacBook awake with the lid closed.
How do I keep a closed Mac safe while agents work?
Give it airflow, keep it on power and limit who can reach it. A Mac with the lid closed still makes heat.
- Leave it on a hard surface, never in a bag, under a pillow or on a soft surface.
- Keep Mac Awake runs on AC power by default; if you unplug, the session waits until power is back. Battery use is optional, down to a floor you pick (for example 20%), and on battery a session ends at a serious thermal state. A watchdog restores normal sleep if anything stops or hangs.
- Limit access: OpenAI advises a VPN or mesh network instead of exposing its app server to the internet (remote connections). Anthropic's optional Trusted Devices (beta as of October 2026) lets only enrolled devices view or steer a session (Remote Control).
FAQ
Can I control Claude Code from my phone?
Yes. As of October 2026, Claude Code Remote Control connects the Claude app for iOS and Android, or claude.ai/code, to a session on your computer, on Pro, Max, Team and Enterprise plans. The computer has to stay on and awake.
Can I use Codex from my phone with the MacBook lid closed?
Yes, if the Mac stays awake. As of October 2026, OpenAI's guide says to connect an external display when the lid is closed; without one, keep the Mac awake another way, for example with a Keep Mac Awake session.
Does Cursor remote control work when my Mac is asleep?
No. As of October 2026, Cursor says the computer needs to stay on and online, and that tool calls cannot run while it is asleep or offline (Cursor for iOS). Its "Keep this computer awake" setting needs power and the lid open.
Do I need an external display to keep a closed MacBook working?
Not necessarily. Apple's supported route needs a display, power, keyboard and mouse; without a display, sudo pmset disablesleep 1 or a Keep Mac Awake session keeps a closed Mac awake.
Does Keep Mac Awake give me remote access to my Mac?
No. It only keeps the Mac awake with the lid closed. The connection comes from the agent's own remote control or from SSH, and it lasts as long as the Mac's network connection holds.
Sources
- Claude Code docs: Remote Control
- Claude Code docs: Claude Code on mobile
- Claude Code docs: Desktop scheduled tasks
- OpenAI: Remote connections
- OpenAI: ChatGPT desktop app settings
- OpenAI: Codex configuration reference
- Cursor changelog: Remote control for local agents
- Cursor docs: Cursor for iOS
- Apple Support: Allow a remote computer to access your Mac
- Apple Support: Put your Mac to sleep or wake it
- Apple Support: Set sleep and wake settings for your Mac
- Apple Support: If your external display is dark or low resolution
- Tailscale: What is Tailscale?
- Tailscale: Tailscale SSH
- Termius
- tmux wiki: Getting Started