Run Claude Code remotely on a PC that sleeps, and keep it awake only while it works
Claude Code’s Remote Control hands a live coding session to your phone or any browser — but the session runs on a real machine, and that machine has to be awake for as long as the session does and no longer. So the questions people actually type are the practical ones: how do I keep my computer awake while Claude Code runs without leaving it on all night, what happens when the laptop sleeps mid-session, and can I wake the PC from my phone to start one?
This guide is the answer in one arrangement: the machine sleeps until you want it, one button wakes it, holds it awake, starts Claude Code headlessly in a folder you chose in advance, and hands you the live session in the Claude app — then lets the machine drift back to sleep when you are done. Start claude remote-control yourself at the keyboard and the same free agent notices, and holds the machine awake for exactly as long as it runs. Rooster Wake works with Claude Code as a compatible launcher; Claude Code itself, and the Anthropic account it signs in with, stay entirely yours. And since Rooster Wake joined the Claude connectors directory, the whole of it — the setup included — runs from a chat, which is where the walkthrough below starts.
The problem: the session has to start at the machine
Remote Control is a genuinely good feature: start a Claude Code session in a terminal, and the Claude website or phone app can drive it from wherever you are. The catch sits in the first clause. The session starts in a terminal, on the machine — which means the machine is awake and somebody is at a keyboard on it, and that somebody has so far been you.
So the arrangements people actually end up with are the two this whole site exists to retire. Either the dev box stays on around the clock for sessions that run a couple of hours a day — 40 to 100 idle watts, all night, every night — or it stays on anyway so a remote-desktop route can reach it, and you thumb claude into a phone-sized picture of a terminal, which works in the way that eating soup with a fork works.
Keeping the computer awake while Claude Code runs, without leaving it on
The usual answer is to stop the machine sleeping: caffeinate in a Mac terminal, a keep-awake plugin or tray app on Windows, or the power settings set to never. They all work the same way and fail the same way: they hold the machine up while you remember to run them, go on holding it after the session is over, and can do nothing about a machine that has already gone to sleep — the laptop that closed at ten o'clock stays closed until somebody opens it. Even our own Keep awake…, on Plus and Pro, is only the bounded form of the same idea: a window you choose, after which the machine sleeps by itself.
The free agent takes the reverse position: let the machine sleep, wake it when you want it, and hold it awake only while it is in use. On Windows, macOS and Linux, the agent notices a running claude remote-control process and holds the machine awake for as long as it runs — whether you typed the command in a terminal or pressed Remote AI… on the dashboard. Nothing to remember, nothing to type before you leave: start the session and the hold is there. While it runs, the machine's row reads in use — Claude Code, so your phone can see what is keeping it up.
When the session ends, the agent holds the machine for ten more minutes, long enough to reconnect after a drop, and then lets it go, as at the end of any hold: a machine on a cable goes back to sleep by itself unless somebody is using it, a machine on a certified smart plug, on the paid plans, shuts down cleanly with the switch left on for the next Wake, and a Wi-Fi-only machine with no plug is left to its own power settings, because nothing could wake it again. Asleep, it costs nothing until the next session wakes it; A sleeping PC cannot wake itself below says what sends that wake.
On a Mac, install from the installer package rather than the bare download: the package carries the helper that lets the Mac say goodbye before it sleeps, so the dashboard reads the sleep the moment it happens and offers the wake. A Mac wakes by packet over Ethernet only, from sleep only; how to wake a PC remotely has the Mac and laptop cases. Starting the session from the dashboard is on the Windows agent today — on a Mac or on Linux, start claude remote-control at the keyboard, and the hold, the ten minutes and the sleep afterwards are the same.
When your laptop or Mac sleeps mid-session
The complaint under most of these searches: the session was going fine, the lid closed or the idle timer fired, and the phone now shows a session that no longer answers. That is what sleep does. The process is suspended with everything else, the connection drops, and nothing you send from the phone reaches it until the machine is up again — the messages wait, and the session picks them up after the next wake.
With the free agent on the machine, that stops being the normal case. While claude remote-control runs the machine is held, so the idle timer never fires; closing the lid still sleeps a laptop, on every operating system, because the lid is a person's decision. If the machine does go — the lid, or the ten minutes after a session ran out — the agent says goodbye on the way down, on Windows, on Linux and, from the installer package, on a Mac, so the row reads asleep as of a minute ago rather than a green line that stopped being true, and it offers Wake. Press it from your phone and a desktop machine on a cable is back in seconds, provided something on its network is awake to send the wake — the section below names the three things that can — with a fresh session one tap away on Windows, Remote AI…, and one command away at the keyboard elsewhere.
The limits are the hardware's, and no product changes them: a laptop on Wi-Fi cannot be woken by packet at all, a Mac wakes over Ethernet only and never from full power-off, and a MacBook off its dock is a laptop on Wi-Fi. An Apple-silicon desktop Mac on a certified plug can be switched on from off, on the paid plans. How to wake a PC remotely covers the settings that make a machine wakeable and every route for sending the wake.
Set up from inside Claude, without leaving the chat
Since Rooster Wake joined the Claude connectors directory, the setup runs from inside a chat, and this is what it looks like end to end. Open the Rooster Wake listing, press Add, then Connect; sign in with your email when Rooster Wake asks — an emailed link, so the address is the whole account — and press Approve on the consent page. Connecting runs nothing by itself — no tool fires and no chat opens — so on an account with no machine yet the next page is Connected. One step left.: the install commands with your address already in them, the first thing to ask Claude, and a button back to Claude. A welcome email with the same commands arrives at sign-up, for the moment you are at the PC.
Then open any Claude chat — the website, the desktop app or the phone app — and type the thing that page suggested. On an empty account, with your own address in the lines, Claude answers:
Youlist my machines
No machine is saved on this account yet, so there is nothing here to reach. Install the free Rooster Wake agent on the computer you want to control and one machine gets you, with nothing else on the network: whether it is up, sleep it from anywhere, hold it awake while a job runs — it goes back to sleep ten minutes after the last activity — and, on Windows, a Claude Code session in a folder on it while it is up. It has to be run at that computer; the machine registers itself on the account as soon as the agent starts.
Windows — paste into a terminal window (it asks once to allow the install):
msiexec /i https://roosterwake.com/agent/roosterwake-agent.msi [email protected]
macOS — download the installer package and open it:
https://roosterwake.com/agent/roosterwake-agent.pkg
Then paste this into Terminal:
sudo roosterwake-agent enrol --email [email protected]
Linux — paste into Terminal (on a Raspberry Pi swap linux-amd64 for linux-arm64):
curl -fLo roosterwake-agent 'https://roosterwake.com/api/agent/download?platform=linux-amd64' chmod +x roosterwake-agent sudo ./roosterwake-agent install --email [email protected]
Waking it once it has slept needs something else on the network that is awake: the same agent on a box that already stays on, a dongle, or a linked voice assistant. A laptop on Wi-Fi cannot be woken by any of them, so that one you wake at the keyboard or by its lid — everything above still works on it.
Then ask me to list your machines again. The full walkthrough: https://roosterwake.com/run-claude-code-remotely
That is the install, and it is the one part of this that has to happen at the PC rather than in the chat. Windows asks once to allow it; a Mac opens the package — signed and notarised by Apple, so there is no warning to click past — and the line under it joins that Mac to your account; Linux fetches the binary by name and runs install with sudo, and on a Pi the platform is linux-arm64. No MAC address to find, no form to fill: the machine registers itself on your account the moment the agent starts. Back in the chat, ask again:
Youlist my machines
1 machine saved on this account.
Laptop (00:00:5E:00:53:01): up, agent connected. Once Laptop sleeps nothing on the account can wake it: the only agent is on Laptop itself.
A sleeping machine cannot wake itself, so something else on the account has to send the wake. Any one of these does it: the free Alexa skill — enable it and link the account, then say "Alexa, turn on Laptop" (https://www.amazon.co.uk/dp/B0HDQDJ4LT); the agent on a machine you mark as always on — a NAS, a Home Assistant box, a mini PC or a Pi (https://app.roosterwake.com/emitters#always-on); or a Rooster Wake dongle (https://roosterwake.com/dongle-kit).
The second sentence on that row is the one to read twice, and it has a section of its own below, A sleeping PC cannot wake itself: the agent on Laptop sleeps with Laptop, so an account with nothing else on it has nothing that can send the wake. Everything else already works — status, and a session while the machine is up — and the moment a second waker is in place, the sentence goes away, in the chat and on the dashboard.
The session is one sentence too. Name the folder the first time: while the machine has no saved workspace, Claude saves that folder as one and starts the session in it — provided the folder was trusted once by running claude in it at the keyboard, a rule that has not changed. With workspaces already saved, Claude names them and asks which.
Youstart a Claude session on Laptop in C:\dev\my-app
Saved C:\dev\my-app as the workspace "my-app" (id 1) on "Laptop"; list_machines offers it from now on.
A Claude session is running on "Laptop". Open Claude on any device — claude.ai, the desktop or mobile app — and the session is there to work in. The machine is held awake for it until 18:52.
That start used one of the month's included sessions — 9 remain; the meter resets on the 1st.
From here the rest of this guide applies unchanged: the session is Claude Code exactly as if you had started it at the desk, the answer carries the session's own link — the same handoff Open in Claude makes on the dashboard — the hold lapses on its own, and the machine sleeps again. The dashboard is optional throughout; when you want it, "give me a dashboard link" answers with a one-time sign-in link that lasts ten minutes, works once, and signs in whoever opens it — so open it yourself rather than forwarding it.
One button: wake, hold, start, hand off
On the Rooster Wake dashboard, a machine whose agent supports Remote AI has a Remote AI… button on its row. Press it, pick the workspace folder and how long to hold the machine awake, and the rest happens without you. If the machine is asleep it is woken first — by an emitter that is awake, the free agent on another machine that stays on or a dongle, never by the sleeping PC itself, because software on a sleeping machine is asleep along with it. Then the agent starts Claude Code headlessly in the folder you registered, and the machine's card offers Open in Claude: the live session, in the Claude app or on the Claude website, on whatever device you pressed the button from.
The hold is explicit about time, and it works like a parking meter. You choose the window, the card shows the deadline ("held awake until 14:52"), and it lapses by itself — a session you forget does not become a machine that never sleeps again. Need longer? Add time from the held-awake chip on the machine's row (+15 minutes or +1 hour), and five minutes before any hold lapses your phone gets a tap — land on the dashboard, top it up, carry on. End session on the same card stops the session, releases the hold, and the machine goes back to following its own sleep schedule.
The session itself is Claude Code exactly as if you had started it at the desk: your install, your sign-in, your Claude plan. Rooster Wake starts and stops the process, holds the machine awake, and never sees the conversation or your Anthropic credentials.

Setting it up
Four steps, all one-time, the first three at the machine — the same setup the chat above walks through, with the reasons attached. After this the machine can sleep on a clear conscience.

- Install the free agent on the PC itself. The agent is what starts and stops Claude Code, holds the machine awake and reports the session's state to your dashboard; sessions started from the dashboard are on the Windows agent today, and the hold for a session you start at the keyboard is on Windows, macOS and Linux. The install line carries your address, and the agent registers the machine on your account by itself the moment it starts — no MAC address to find, no form to fill. This is the one piece of ours on the machine, and installing it is free on every plan.
- Install Claude Code on the same machine and sign in. Get Claude Code if it is not there already; version 2.1.139 or newer —
claude --versiontells you,claude updatemoves you — signed in with your own Anthropic account. The session runs on whatever Claude plan that account has; nothing of ours sits in that path. - Trust each project folder once. Open a terminal in the folder, run
claude, and accept the trust prompt it shows on first use. That consent lives on the machine and there is deliberately no way to grant it remotely — a machine should not be talked into trusting a folder by anything other than the person at its keyboard. - Register the folder as a workspace. Two ways, and they save the same thing: add it in the machine's settings on the dashboard — a label and its path — or, while the machine has no workspace yet, name the folder in your first session request from a Claude chat and it is saved as one on the way. Remote AI only ever starts sessions in workspaces saved like this: the agent resolves the folder from its own copy of the list and refuses a raw path over the wire, so the list is the whole of what a session can reach, whichever door the request came in by.
A sleeping PC cannot wake itself
The agent on a machine sleeps with the machine — software on a sleeping PC is asleep along with it — so the wake has to come from something else on the same network that is awake. Waking is the one step in the loop the sleeping machine cannot do for itself, and on an account whose only agent is on the very machine you want to wake, nothing can. The dashboard says so with a Nothing can wake Laptop yet card at the foot of the roster, and Claude's machine list says the same in its own words; both go quiet the moment something can. Three routes, cheapest first, and any one of them is enough:
- The free Alexa skill, if there is an Echo in the house. Enable the skill, link your Rooster Wake account by signing in, and say "Alexa, turn on Laptop": the skill declares the machine's address to Alexa and your own Echo broadcasts the wake on your own network, which is why it is free on every plan. It works from the Alexa app wherever you are, so a phone is enough.
- The same agent on a second machine that stays on — a NAS, a mini PC, a Raspberry Pi, a home server, a second PC. Install it there with the same one line, and it becomes the emitter for every other machine on the network: the always-on box sends the wake, the sleeping one receives it. Nothing to buy if you already own something that never sleeps, and it is the route we recommend.
- A dongle, for the household with nothing always-on at all: a half-watt emitter you build from the parts list, so that nothing bigger has to stay up on the sleeping machine's behalf. Once it is on the network the card goes, the sentence in Claude's answer goes, and the wake button on the sleeping machine's row is live.
The traps, named here instead of at midnight
Everything above works first time more often than not. These five are what we hit while proving the feature end to end — each is a one-time cost, and each looks like a bug until somebody names it.
- Start remote control from the command line, not from inside a session. The agent recognises a Claude Code session by the command that started it —
claude remote-control— and holds the machine for it. Switching remote control on with the slash command inside aclaudeyou already had open leaves the process looking like any other terminal session, so nothing is held: start it asclaude remote-controland the hold follows, with in use — Claude Code on the row. - Your browser may ask a local-network permission. The first time the dashboard checks whether the browser is sitting on one of your own machines, newer Chromium-based browsers show a one-click prompt about local network access. Allow it. Denying breaks nothing — the dashboard just stops knowing which machine you are at, which only costs a nicety — and the way back is the padlock in the address bar: site permissions, then local network access, then allow.
- The Claude app's session list can lag. After an End session, the Claude website's own list can show the session as connected for a minute or two, and the phone app for longer still; a message sent into a dead session there waits silently. The Rooster Wake card is fed by the agent that owns the process, so trust it for session state: when the card says the session is over, it is over.
- Private repositories need their grant. Creating a session from the Claude app in an environment tied to a private GitHub repository needs that repository granted to the Claude website's own GitHub connection — the check is Anthropic's, fixed in their GitHub settings. Or sidestep it entirely: enter through the session Rooster Wake hands you, which already exists and needs no creation step.
- Wake-from-shutdown is its own discipline. A machine that was shut down rather than slept only wakes with Windows fast startup off and the network adapter armed to wake. The machine's Wake readiness card on the dashboard names both and hands you the fix — read it before your first night away rather than after; the BIOS's own wake option is the one thing it cannot reach.
The connector: talk to your machines from any Claude chat
The button is one door; the connector is the other, and since the directory listing it is the door most people arrive by. Add Rooster Wake to your Claude account as a connector, and any Claude chat — the website, the desktop app, the phone app — can see and act on your machines in plain language. The first thing to type is "list my machines": on an empty account it answers with the install itself, and after that it is the inventory every other request draws on — "which of my machines are awake?", "wake the office PC", "start a Claude session on my desktop in the folder I registered". Ten tools carry the whole loop — listing and status, waking, readying a machine for wake, holding awake and releasing, starting and ending Remote AI sessions, sleep, and a one-time sign-in link to your dashboard — and waking is on every plan here too.
Setup is one click: Rooster Wake is in the Claude connectors directory, so open the Rooster Wake listing, press Add, then Connect, and approve on the Rooster Wake consent page that opens — on an account with no machine yet, that page hands you the install before sending you back, as the walkthrough above shows. Adding it by hand works too, anywhere custom connectors do: in Claude's Customize area, open Connectors and add a custom connector — older instructions say Settings; the connectors screen moved — then paste https://mcp.roosterwake.com/mcp, wait for both detection badges to light, and press Add. Either way the connector follows your account, so the phone app carries it with no extra step. The first time Claude reaches for a tool it asks your permission, tool by tool — that is Claude's own safety model doing its job, and you approve the ones you want it to have.
Claude Code at a terminal reaches the same server without the connector screen: claude mcp add --transport http roosterwake https://mcp.roosterwake.com/mcp --header "Authorization: Bearer <your key>", with a key from your API keys page carrying only the scopes you want it to hold — API keys come with the paid plans, and the CLI saves the connection per project, so run it where you want it available. And a chat changes the surface, never the rules. Sessions started this way meter exactly as the button's do — ten a calendar month on the free plan, unmetered on Plus — and holds follow the plans they always have: inside a session the hold rides with it, and standalone keep-awake stays with the paid plans. Sleep asks for your explicit yes before anything sleeps, and there is deliberately no shutdown from a chat at all: a machine at full power-off may not be wakeable again without someone at the button.
Two of the ten are worth knowing by name. Naming a folder in a session request, on a machine with no saved workspace, saves it as one before the session starts — the trust prompt at the keyboard still applies, and a machine that already has workspaces only starts in one of them, so a saved list is never widened from a chat. And "give me a dashboard link" mints a one-time sign-in link to the dashboard: ten minutes, single use, the account owner only — and it signs in whoever opens it, so it is for you and never for forwarding.
The same loop serves everything else that needs the box on
Nothing about wake, hold and sleep-again is specific to one tool. The identical loop serves a VS Code remote window, plain SSH, a long build you want to look in on from the sofa, or any of the newer agentic CLIs that keep a session alive on your own hardware: wake the machine, hold it awake for the window the job actually needs, connect with whatever the job takes, and let the hold lapse when you are done. Store a connect link against the machine and the dashboard hands you into your own client the moment the machine is up.
The pieces price the same way whatever you connect with: waking is free on every plan, the hold that comes with a Remote AI session rides with the session, and holding a machine awake outside a session — like the rest of the power controls, sleep, restart and shutdown — is on the paid plans.
What it costs, and what you already own
The free plan includes ten Remote AI sessions a calendar month — deliberately enough to prove the whole loop from your phone before any money moves, and the meter resets on the first. The Plus plan at £12 a year runs sessions unmetered, and carries the keep-awake control and the power actions — sleep, restart, shutdown — that make living with a sleeping machine pleasant rather than merely possible.
On hardware, the answer is that most developers already own everything this needs. A wake has to come from something awake on the machine's own network, and the free agent on any box that already stays on — a NAS, a Raspberry Pi, a home server, a second PC — carries it at no cost. The dongle exists for the household with nothing always-on at all: a half-watt emitter, so that nothing bigger has to stay up on the sleeping machine's behalf. And if the machine happens to be awake already, no emitter is involved and the button simply starts the session.
If your machine is a different shape of problem — a gaming rig you stream from, a work desktop, a fleet to patch, a homelab — who uses Wake-on-LAN maps the six common ones and points at the guide for each.
Questions developers ask before wiring this up
How do I keep my computer awake while Claude Code is working?
claude remote-control process and holds the machine awake for as long as it runs, whether you typed the command at the keyboard or pressed Remote AI… on the dashboard, and the row reads in use — Claude Code while it does. When the session ends the machine is held for ten more minutes, then goes back to sleep by itself unless somebody is using it. Nothing to type before you leave and nothing left running afterwards, which is the difference from caffeinate or a keep-awake plugin: those hold the machine up until you remember to stop them, and cannot wake one that has already slept. For a hold with no session behind it — a build, a download — Keep awake… on Plus and Pro holds the machine for a window you choose.Will Claude Code keep running if my Mac goes to sleep?
claude remote-control runs, so the idle timer never gets its chance, and when the session ends the hold lasts ten more minutes before the Mac goes back to sleep by itself unless somebody is using it. Install it from the installer package rather than the bare download: the package carries the helper that lets the Mac say goodbye before it sleeps, so the dashboard reads the sleep the moment it happens. To wake a sleeping Mac from your phone it has to be on Ethernet — a Mac wakes by packet over a cable only, from sleep only, and a MacBook on Wi-Fi cannot be woken by packet at all. Starting the session from the dashboard is on the Windows agent today; on a Mac, start it at the keyboard and the agent does the rest.Can I wake my PC to start a Claude Code session from my phone?
Does this work with claude remote-control started from the terminal?
claude remote-control started from the terminal?claude remote-control at the keyboard is held exactly as one started from the dashboard: the row reads in use — Claude Code, the machine stays awake while the process runs, and the ten-minute grace follows its end. No flag, no wrapper, no change to how you start Claude Code — on every plan, on Windows, macOS and Linux. The one shape it cannot see is remote control switched on from inside a claude you already had open, because the process then looks like any other terminal session; start it as claude remote-control and the hold follows.What happens when the session ends?
Does Rooster Wake see my code or my Claude conversation?
claude by hand, and your credentials are never seen, stored or proxied by anything of ours.Do I need a paid Claude plan, or a paid Rooster Wake plan?
Can I set it up without leaving Claude?
Can it start a session in any folder on the machine?
claude once at the keyboard and accepted its trust prompt. The agent resolves the folder from its own copy of the workspace list and refuses a raw path sent over the wire; the chat route saves the workspace first and then starts by its id. The trust prompt is the guard neither route can pass: a folder nobody trusted at the machine is a folder no session can start in, whoever holds the account.