Adrafinil – Keep a Lid-Closed Mac Awake Only While AI Agents Work
Adrafinil is a macOS menu bar app that prevents the system from sleeping while an AI coding agent is active. It only intervenes when an agent is mid-task and gets out of the way when the work finishes.
Intelligence analysis by Llama 3.3 70B
Adrafinil is a unique solution that keeps your Mac awake only when needed, making it an efficient tool for developers working with AI coding agents.
Adrafinil is like a guardian for your Mac. It keeps your Mac awake when AI coding agents are working, and it lets your Mac sleep when they're not. This helps your Mac work more efficiently and prevents it from getting too hot.
Analysis
Introduction to Adrafinil
Adrafinil is an innovative macOS menu bar app designed to keep your Mac awake only while AI coding agents are working. This app is specifically tailored for developers who work with AI coding agents, providing a unique solution to prevent unnecessary sleep modes.
How Adrafinil Works
Adrafinil works by intervening only when an AI coding agent is mid-task, and it gets out of the way the moment the work finishes. This approach ensures that the Mac stays awake only when necessary, making it an efficient tool for developers. The app uses a privileged helper to override clamshell sleep, which requires root access, but it isolates this functionality in a tiny, audited helper that only exposes setSleepBlocked(Bool).
Features and Benefits
Adrafinil offers several features that make it an attractive solution for developers. It is agent-aware, not always-on, meaning that sleep is blocked only while at least one agent session holds an assertion. The app also has hook integration for nine agents, including Claude Code, Codex, and Cursor, making it easy to use with a variety of AI coding agents. Additionally, Adrafinil has a sub-50ms CLI, which ensures that it never stalls an agent's workflow. The app also includes thermal cutout and idle release features, which help prevent overheating and ensure that the Mac sleeps normally when no agents are working.
Key points
- Adrafinil keeps your Mac awake only while AI coding agents are working
- It uses a privileged helper to override clamshell sleep
- The app has hook integration for nine agents
- It includes thermal cutout and idle release features
Adrafinil has the potential to significantly improve the productivity of developers working with AI coding agents. By preventing unnecessary sleep modes, Adrafinil can help reduce errors and ensure that tasks are completed efficiently.
However, Adrafinil may have some limitations, such as requiring admin rights for installation and potentially causing conflicts with other apps that control sleep modes. Additionally, the app's reliance on privileged helpers may raise security concerns.