rx no.006 ・ wakefulness
Adrafinil
Keep agents running with the lid closed.
Keeps your Mac awake only while AI agents work, even with the lid closed. The last session releases the hold so your Mac can sleep.
macOS · free · open source · MIT
01 ・ how it works
Awake while agents work.
An agent acquires a hold when a turn starts and releases it when idle. Sleep is blocked while at least one session holds an assertion.
Install hooks for Claude Code, Codex, Hermes, and other agents in one click. Overlapping sessions are counted; the last release lets the Mac sleep. An idle prompt leaves normal sleep enabled.
Foreground processes run at full speed with the lid closed under a hold, verified on-device.



02 ・ commands
Control session holds.
adrafinil acquire <session-key> --tool claude-codeadrafinil release <session-key>adrafinil hold --for 30m --reason "deploy"Use a timed hold for work that continues after the agent replies.
03 ・ the label
Close the lid. Hear the chime.
- 01Locks the screen when you close the lid.
- 02Plays a chime when the hold engages.
- 03Reports session duration and temperature in a morning summary.
- 04Releases holds when the Mac gets too hot.
- 05Drops assertions from agents that quit or go idle.
- 06Uninstall removes every hook entry it added to every agent.
- 07Counts itself in only if you say so: one anonymous check-in a day, and nothing that names you.
setSleepBlocked(Bool). Policy runs without root. The helper uses pmset disablesleep, which also blocks idle sleep, and resets it when the helper restarts. To restore sleep manually: sudo pmset -a disablesleep 0.Get Adrafinil
macOS · free · open source · rx no.006
Download Adrafinil ↓