Keep your Mac awake
while your agents work.
Start Claude Code or Codex on a long task, close the lid, and walk away. Keep Awake holds off sleep for as long as an agent is running, then lets your Mac sleep as usual.

Turn on While Agents Run
OneMacApp watches for Claude Code, Codex, Gemini CLI, Cursor Agent, Aider and other agents. While one is open, your Mac stays awake. Add your own commands too, like rsync or a long build.
Allow the closed lid, once
macOS sleeps a closed MacBook whatever apps ask. Allow OneMacApp once with your password and it can turn sleep off while Keep Awake is on, and back on after.
Close the lid and go
Your agents, downloads and builds carry on with the lid shut and no external display. When they finish, or the time you picked runs out, your Mac sleeps again.
Questions, answered.
Something else? Write to [email protected] and a real person will answer.
Open Keep Awake and turn on While Agents Run. Your Mac stays awake whenever Claude Code, Codex, Gemini CLI or another agent is running, and sleeps as usual once they all quit.
Yes. Click Allow… under With the Lid Closed and enter your password once. From then on, closing the lid doesn’t stop your agents while Keep Awake is on, with no external display needed.
macOS always sleeps a closed MacBook unless sleep is turned off for the whole system, which needs an administrator. OneMacApp adds one rule that lets it run exactly two commands, sleep off and sleep on, and nothing else. You can remove it any time from the options.
Only while it’s on. On battery it stops at 20% by default so your Mac can sleep safely. With the lid closed, keep your Mac somewhere it can breathe, not in a bag.
It does the same job, and also follows your agents: it stays awake while they run and stops when they finish, with closed-lid support built in.