Keep the Machine Awake

  • Desktop app
  • All plans

What it does

While an agent is thinking, a dev command is running or a database export or import is in flight, AgentsRoom asks the operating system not to suspend the machine. Without it, locking the screen or leaving the machine idle puts it to sleep a minute or so after the display turns off, which freezes builds, dev servers, database transfers and agents mid-run until you come back. The screen is still free to turn off; only system sleep is held, and it is released as soon as nothing is working anymore.

A cup icon in the bottom status bar shows the state at a glance, and lets you keep the machine awake on demand even when nothing is running, like Caffeine or Amphetamine.

Video (1 min 11 s): Keep awake, shown in the real app. The cup in the status bar is grey with nothing running, lights up as soon as an agent starts a long task, says "The machine will not go to sleep." and "An agent is working" when clicked, keeps the machine awake for 4 hours on demand, goes grey again on Turn off, and shows Started by an agent when an agent is asked to keep the computer awake.

Where to find it

  • Settings > Terminal > Keep the machine awake, with two states: Stay awake while something is running (default) and Disabled.
  • The Keep awake chip (cup icon) in the bottom status bar. The cup turns to the accent colour while AgentsRoom holds the machine awake, and to orange when the system refused. Click it to see why (an agent is working, a dev command is running, a database transfer is in progress, or the manual hold) and to keep the machine awake on demand. Hovering it shows the same state in a tooltip ("Sleep is allowed. Click to keep the machine awake on demand." when nothing holds it). The chip can be hidden from the footer like any other (right-click the status bar, or Settings > Interface elements); the Simple interface mode hides it.

How to use it

Nothing to do: start a build or send a task to an agent, lock the machine or walk away, and the work continues with the screen off. When the agent finishes and no command is running, the machine returns to its normal sleep behaviour.

A dev terminal that is merely open does not hold the machine awake: only one whose foreground job is still running does (npm run dev holds, a finished build releases). Database transfers hold it for their whole duration, even after the modal that started them is closed.

Keep awake on demand: click the cup chip, then pick 1 h, 4 h, 8 h or Until I turn it off. The machine stays up even with nothing running, and even when the automatic setting is disabled. The chip shows Keep awake in full while the manual hold is on, and its tooltip says until when. Click Turn off in the same panel to stop it early (the button only appears while a manual hold runs). The panel then lists the remaining reasons: once an agent finishes, "An agent is working" disappears and only the timed hold ("Kept awake until HH:MM") stays. Picking another duration replaces the current one. By default the manual hold is not kept when AgentsRoom quits; turn on Resume "Until I turn it off" after a restart (Settings > Terminal) to have Until I turn it off taken again at the next launch, on this computer. The chip then shows Resumed after a restart under the hold.

Keep the screen on too: a switch in the same panel. Off, only system sleep is held and the screen turns off as usual. On, the display stays on for the manual hold (it can be switched while a hold runs). It is on by default on Windows, because many Windows laptops (Modern Standby) enter standby as soon as the screen turns off; elsewhere it is off by default. The choice is remembered on this computer.

From an agent: ask an agent to keep the computer awake ("keep the PC awake for 2 hours") and it uses the MCP tools below. The hold appears in the chip with Started by an agent, and you stop it from there like any other.

Settings

  • keepAwakeWhileWorking (global, Settings > Terminal): hold a system power assertion while an agent is thinking, a dev command is running or a database transfer is in flight. On by default.

  • wakeForTriggers (global, Settings > Terminal): the complementary setting that wakes a sleeping machine for a scheduled trigger, then keeps it awake while the run works. Off by default.

  • uiElements.footer.keepAwake (global, Settings > Interface elements > Footer): show or hide the status-bar chip. Visible by default, folded by the Simple interface mode.

  • keepAwakeResumeIndefinite (global, Settings > Terminal > Keep the machine awake > Resume "Until I turn it off" after a restart): off by default. When on, a manual hold set to Until I turn it off that is still running when AgentsRoom quits is taken again at the next launch. Only that mode: timed holds (1 h, 4 h, 8 h, or the minutes an agent asked for) always end when AgentsRoom quits. Kept on this computer only (a laptop is not kept awake because a desktop was); turning the hold off, or the setting off, means nothing is resumed.

  • The manual hold itself is not a setting: it lives while AgentsRoom runs, on this machine.

Agent tools (MCP)

  • keep_awake_status: whether the machine is held awake and why (running work, manual hold with its end time, screen, who started it, automatic setting on or off).
  • keep_awake_start: hold the machine awake with nothing running, minutes 1 to 1440 or omitted for until stopped, keepScreenOn optional. Replaces the current manual hold. Agents use it only when asked: their own work already holds the machine automatically.
  • keep_awake_stop: end the manual hold (the automatic hold is not affected).

The automatic setting and the resume option are read and changed through settings_get / settings_set (keepAwakeWhileWorking, keepAwakeResumeIndefinite). A resumed hold reports startedBy: "resumed after an app restart".

Providers

All providers, no difference: the signal is the agent's working status, whatever CLI runs it.

Mobile

Not available, by decision. The phone runs no agent; the desktop holds its own assertion, and the manual hold is only offered on the computer's status bar (or to agents through MCP).

Limits

  • A closed laptop lid still sleeps, on macOS, Windows and Linux: no application can prevent that. Leave the lid open with the screen off, or use the machine plugged in with an external display.
  • Linux: AgentsRoom asks both the desktop session (D-Bus) and systemd-logind (systemd-inhibit --what=sleep), so it also holds on window managers without a power manager (sway, i3, Hyprland). Without systemd (some sandboxed installs, non-systemd distributions) it depends on the desktop session alone. The lock is released by itself if AgentsRoom crashes.
  • Windows laptops with Modern Standby enter standby when the screen turns off: the automatic hold (which leaves the screen free) may not keep them working with the screen off. Use a manual hold with Keep the screen on too, on by default on Windows.
  • On Windows, whether a dev terminal is still running is only known for terminals with the finish-alert bell watched; otherwise an open command tab is treated as running and holds the machine, which costs battery. Disable the setting if that matters more than an interrupted build.
  • The assertion expires by itself if the app window stops reporting, so a crashed or reloaded window cannot pin the machine awake for good.

Common questions

  • My Mac went to sleep in the middle of a 13-minute build; why? Apple Silicon defaults put the system to sleep one minute after the display turns off, and nothing was asking it to stay up. This setting is that request.
  • Will my screen stay on? No. Only system sleep is held; the display sleeps and the lock screen works as usual.
  • Can AgentsRoom replace Caffeine or Amphetamine? Yes, for system sleep: click the cup chip in the status bar and pick a duration or Until I turn it off. The screen still turns off, and a closed laptop lid still sleeps.
  • My Windows laptop still sleeps when the screen turns off. Why? Many Windows laptops enter standby as soon as the display turns off (Modern Standby). Start a manual hold from the cup with Keep the screen on too enabled.
  • How do I keep my computer awake with nothing running? Click the cup in the bottom status bar, then pick 1 h, 4 h, 8 h or Until I turn it off under Keep awake on demand; Turn off in the same panel ends it. Video: https://youtu.be/q2k5qOxTl9A
  • Can "Until I turn it off" survive a restart of AgentsRoom? Yes, if you turn on Resume "Until I turn it off" after a restart in Settings > Terminal. It is off by default, like Caffeine, so a forgotten hold cannot keep your machine awake for good. Timed holds are never resumed.
  • Can an agent keep my computer awake? Yes, when you ask it: it uses keep_awake_start, and the cup shows the hold as started by an agent.
  • How do I know if my machine is being kept awake? Look at the cup in the status bar: accent colour means AgentsRoom is holding the machine awake; hover or click it to see why.
  • Does it wake the machine for a scheduled task? No, that is Wake the machine for scheduled triggers, a separate setting on the same page.
  • Is there a video that shows it? Yes, a one-minute demo in the real app: the cup lights up while an agent works, explains why, keeps the machine awake for 4 hours on demand, and shows a hold started by an agent: https://youtu.be/q2k5qOxTl9A. The play icon in the header of the cup's panel ("Watch the video tutorial on YouTube") opens it too.