Works with the lid closed
A one-time sudoers rule lets it hold sleep off after you shut the lid.
Afterhours keeps your Mac awake while coding agents work, then lets it sleep when the last one finishes.
For macOS 14 or later. Afterhours isn't notarized yet, so the first time you open it, go to System Settings › Privacy & Security and click Open Anyway.
Psst… it’s interactive. Flip the switch, click an agent, or
The everyday details
A one-time sudoers rule lets it hold sleep off after you shut the lid.
Plugged in, it waits until every session closes. On battery, up to an hour.
Sleeps anyway below your cutoff, in Low Power Mode, or when it runs hot.
Two wisps, it’s awake. One, it’s paused. None, your Mac can sleep.
Press ⌥⌘L anywhere to turn Afterhours on or off.
$ afterhours-hook amp
--state workingAnything with hooks can report working, waiting, or idle.
Esc skips Claude Code’s Stop hook, so a silent “working” session times out.
It only talks to your providers to show your limits, and you can turn that off.
For macOS 14 or later. Afterhours isn't notarized yet, so the first time you open it, go to System Settings › Privacy & Security and click Open Anyway.