Keep Awake
Stop your Mac from sleeping for a while, until a time, while an app runs or while your agents work, even with the lid closed.
Turn it on
Type keep awake and press ↵ on Keep Awake. It stays on until you stop it: press ↵ on the same row again. The row shows what it's doing, for example "On · Until you stop it" or "Off". While Keep Awake is on, the screen stays on too.
⌘K on the row offers set times: Keep Awake For 30 Minutes, 1 Hour, 2 Hours or 4 Hours.
For, until, while
Say how long right in the bar, then press ↵ on the row that appears:
| Type | Row |
|---|---|
keep awake for 45 min | Keep Awake for 45 Minutes, with the time it ends. Also for 2 hours, 1.5h, 90m, 1h30; up to 24 hours. |
keep awake until 5pm | Keep Awake Until 5:00 PM, today or tomorrow. Also until 17:30, until noon, until midnight. |
keep awake while xcode runs | Keep Awake While Xcode Runs. It ends when the app quits. The name is matched against the apps running now. |
stay awake, caffeinate and awake work in place of keep awake. Starting a new one replaces the one that's running.
Keep Agents Awake
Keep Agents Awake keeps the Mac awake only while your AI agents work: Saiki's own chats, and Claude Code and Codex sessions the Agents view sees. An agent waiting for your answer counts for 15 minutes. It turns itself off a minute after the last agent finishes, and after 4 hours at most. The display can still sleep. Press ↵ on the row to turn it on or off. It's there when AI is turned on.
While it's on, the Agents view shows a line like "Awake for 2 agents · lid closed"; click it to stop.
When it stops by itself
Keep Awake ends, with a notification saying why, when:
- the time you set is up, the app you named quits, or your agents finish;
- Keep Agents Awake reaches 4 hours;
- on battery, the charge falls below 10 %;
- the Mac gets critically hot.
On battery below 40 %, or when the Mac is very warm, it switches Low Power Mode on and turns it off again at the end. That needs the closed-lid permission below.
With the lid closed
macOS normally sleeps when you close a laptop's lid, whatever an app asks. To keep running with the lid closed, both Keep Awake and Keep Agents Awake can turn sleep off for as long as they run. This is on by default: Settings → General, Keep Awake card, Keep Awake works with the lid closed (shown only on Macs with a lid). ⌘K → Don't Hold a Closed Lid or Also Hold a Closed Lid (⌥⌘L) switches it too.
When the lid closes while Keep Awake holds it, the display goes to sleep (unless you're using an external display). When Keep Awake ends, sleep comes back on, and if the lid is already closed the Mac goes to sleep. If something else had already turned sleep off, Saiki leaves it that way.
The permission it installs
Turning sleep off needs administrator rights. The first time Keep Awake holds a closed lid, macOS asks for your password once, to install one rule in /etc/sudoers.d. The rule:
- lets your user account, and only yours, run exactly four commands without a password:
pmset disablesleep 1,pmset disablesleep 0,pmset -b lowpowermode 1andpmset -b lowpowermode 0; - is checked with
visudowhen it's written, and removed again if the check fails.
Any program running as you could use those four commands too. The worst it could do is keep your Mac awake or let it sleep. Saiki never widens the rule.
Along with it, Saiki adds a small background check for your account. Before changing anything, Saiki writes down what it changed; if Saiki stops checking in for three minutes (it crashed or was force quit), the check turns sleep and Low Power Mode back to how they were. Saiki also undoes a leftover session the next time it opens.
You can also grant it ahead of time from the Keep Awake with the Lid Closed row in Privacy & Permissions. If you cancel the password prompt, Keep Awake still works, with the lid open only.
Remove it
- Type
keep awakeand press ⌘K on Keep Awake. - Choose Remove Closed-Lid Permission….
- macOS asks for your password. Saiki deletes the rule and the background check.
Turning the setting off only stops Keep Awake from using the rule; removing it is the step above. If you use Keep Awake with the lid closed again later, it asks again.
Also in the menu bar
Saiki's menu in the menu bar has Keep Agents Awake and Keep Awake ▸ with the same times and Turn Off. See Menu bar.