Adrafinil Keeps Mac Awake for AI Agents, Prevents Sleep
Key takeaways
- Adrafinil is an open-source macOS tool preventing sleep only when AI agents are active.
- It solves the problem of MacBooks sleeping with the lid closed, interrupting AI tasks.
- The tool intelligently detects agent activity and re-enables sleep when tasks are complete or overheating occurs.
- It offers a more efficient alternative to general sleep-prevention utilities for AI development.
Who benefits
Summary
Adrafinil is a new open-source macOS tool that prevents a MacBook from sleeping, even with the lid closed, but only when AI agents like Claude Code or Codex are actively running. It automatically allows the laptop to sleep once agent activity ceases, addressing a common issue for engineers using local AI.
Why it matters
This tool directly addresses a productivity bottleneck for AI engineers who need to run local agents without constant supervision, ensuring tasks complete efficiently without manual intervention or excessive battery drain.
How to implement this in your domain
- 1Download and install Adrafinil on your macOS development machine.
- 2Configure the tool to monitor your specific AI agents (e.g., Claude Code, Codex) by ensuring the necessary hooks are installed.
- 3Test the functionality by initiating an AI agent task and closing your MacBook lid to verify it remains awake.
- 4Monitor the menu bar status and listen for the chime to confirm active sleep prevention.
- 5Integrate the optional MCP if you require manual control or time-specific wakefulness for agents.
Original post by kageroumado
"A month ago there was a wave of posts and tweets about engineers walking around cafes and parks with their MacBooks propped half-open, as fully closing the lid forces sleep that stops their AI agents. Some people made snarky comments about using tmux or Amphetamine, and some defe…"
View on XOriginally posted by kageroumado on X · view source
Want to go deeper?
Turn these trends into skills with Learnijoy's hands-on AI & tech courses.
Explore coursesMore in AI Engineering & DevTools
Zapier vs. Tray: Enterprise Automation Platform Comparison for 2026
This post compares Zapier and Tray.io, evaluating which platform is better suited for enterprise automation needs by balancing power and ease of use. It argues that the best tools scale for complex requirements while remaining intuitive for all users.
OlmoEarth Studio Offers Custom Embedding Exports for Analysis
OlmoEarth Studio now allows users to export custom embeddings, enabling more detailed downstream analysis of geospatial data. This feature enhances the utility of their platform for specialized applications.
Grok AI Model Updates to Version 4.6
The Grok AI model has been updated to version 4.6, indicating ongoing development and potential enhancements to its capabilities. This release suggests iterative improvements to the underlying AI architecture.