Adrafinil keeps MacBook awake during agent runs
Adrafinil is an open-source macOS menu bar utility that keeps a MacBook awake with the lid closed only when AI coding agents are actively running. By monitoring agent activities, it dynamically toggles macOS sleep blocks and allows the laptop to sleep normally once the tasks are completed.
While keeping a laptop awake when closed is a known macOS headache, tying the sleep state directly to active developer processes or AI agent runtimes is a clever, highly modern quality-of-life improvement for agentic workflows.
* **Targeted Prevention:** Automatically blocks sleep only during agent activity, preventing the classic "drained battery in a backpack" issue typical of permanent sleep-blockers.
* **Agent Hooks:** Integration with Claude Code, Cursor, Aider, and MCP commands provides a tailored developer experience.
* **Security Architecture:** Implements a minimal root helper (`setSleepBlocked`) to ensure that high-privilege operations are isolated from unprivileged policy logic.
DISCOVERED
2h ago
2026-06-28
PUBLISHED
6h ago
2026-06-27
RELEVANCE
AUTHOR
kageroumado