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
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 reads process names to spot agents, never your code or terminal.