Limits
What awake does not do, and where its hold can end before the work does.
Where the hold can end early
- In clients other than Claude Code only the hook's events count. A background job that runs
longer than the window after the agent answered can see the computer fall asleep there; raise
AWAKE_SECONDSfor that kind of work (settings). - A closed lid on battery puts a Mac to sleep whatever holds it. awake changes no system setting, so it does not prevent that.
Where it holds longer than you might expect
A server the agent started in the background and left running counts as background work in Claude
Code, so it keeps the computer awake; the status line says waiting: 1 task while it runs.
Systems
macOS and Linux. Windows is not supported yet: the hook is a POSIX shell script.