Adrafinil Keeps Mac Awake for AI Agents, Prevents Sleep
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.
Who benefits
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.
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
AI-Powered Development Workflow Integrates Multiple Models
A new development workflow leverages various AI models like Grok 4.3, GPT-5.5, and Opus 4.8 for distinct stages including research, planning, coding, testing, and debugging. This structured approach aims to optimize the software development lifecycle.

Proposing AI Usage Transparency for Credible Commentary
The author suggests a requirement for individuals and organizations to publish their percentage of frontier AI usage at work and personal usage. This transparency would establish credibility before commenting on AI's utility.
MCP and A2A Protocols Standardize Agentic Internet Development
The Model Context Protocol (MCP) and Agent-to-Agent (A2A) Protocol are standardizing how AI agents discover tools, call services, and coordinate across systems. Understanding these protocols is crucial for developers building agent-compatible infrastructure.