Engineers have been propping MacBooks half-open to keep AI agents running without manual intervention. Adrafinil automates this by detecting agent activity and preventing sleep only when needed, then letting the laptop rest once work completes—solving the battery drain problem that made existing solutions impractical.
Analysis
The half-open MacBook became a meme for a reason
A month ago, a pattern emerged: engineers walking through cafes with MacBooks propped at awkward angles, lids deliberately not fully closed. The reason was simple and revealing—closing the lid triggers macOS sleep mode, which halts any running AI agents. For teams deploying Claude Code, Codex, or similar autonomous tools, this became a real operational friction point.
The existing workarounds were all compromises. tmux requires terminal discipline and doesn't solve the underlying sleep issue. Amphetamine and similar apps prevent sleep entirely, but users reported finding dead batteries in their bags after forgetting to disable them. The half-open lid was the path of least resistance: it works, it's visible, and it's reversible. But it's also a signal that the tooling wasn't designed for this workflow.
Adrafinil inverts the problem: sleep by default, wake for work
The tool takes a different architectural approach. Instead of forcing the laptop to stay awake (the Amphetamine model), it keeps sleep enabled by default and only blocks it when an agent is actively executing. The detection happens through hooks into Claude Code and other agent platforms, meaning the app knows the difference between idle time and active work.
The implementation details matter here. Adrafinil uses pmset disablesleep to prevent sleep with the lid closed and no external power—a more aggressive intervention than standard caffeinate. But it's paired with smart detection: once the agent finishes its task, the app re-enables sleep automatically. It also includes thermal safeguards, letting the laptop sleep if it overheats, and an optional MCP integration that lets agents request specific wake durations.
The security model is worth noting. The app splits logic between a privileged root helper (which only exposes a single setSleepBlocked call) and unprivileged code that handles all policy decisions. All binaries are notarized, and the entire codebase is open source under MIT license. For founders evaluating tools that touch system-level functionality, this transparency reduces adoption friction.
Why this matters now: AI agents are moving from experiments to production
Six months ago, autonomous agents were mostly research projects and weekend hacks. Now they're embedded in real workflows—code generation, data processing, customer support automation. As usage scales, the operational details that seemed like edge cases become real costs.
The half-open MacBook phenomenon revealed something important: the default macOS behavior wasn't designed for always-on agent work. Founders building on top of agent platforms (or integrating them into their own products) are discovering these friction points in real time. Each workaround—manual wake locks, terminal sessions, awkward hardware positioning—is a tax on productivity and a signal that the ecosystem is still catching up.
Adrafinil doesn't solve a problem that didn't exist three months ago. It solves a problem that became visible because the underlying technology (capable AI agents) moved faster than the supporting infrastructure.
What this signals about the agent market
The existence and adoption of a tool like this is a leading indicator. It means:
- Agent workflows are moving beyond single-task experiments. People are running them long enough that battery life and sleep behavior matter.
- The friction is real enough to justify custom tooling. This isn't a theoretical problem—engineers are building solutions.
- Open source is the distribution model for infrastructure that touches system-level APIs. Founders won't adopt closed-source tools that control their laptop's sleep state without full visibility.
Watch for these signals
Adoption patterns: If Adrafinil gains traction among founders running agent-heavy workflows, expect similar tools to emerge for other platforms (Windows, Linux) and other agent frameworks beyond Claude and Codex.
Platform responses: Claude, OpenAI, and other agent platforms may eventually build this functionality natively—either as a system integration or as part of their client SDKs. If they do, standalone tools like Adrafinil become obsolete.
Broader infrastructure gaps: This is one visible friction point. Look for others: agent logging and observability, cost tracking for long-running tasks, resource management for parallel agents. Each gap is a potential tool or feature.
Source Claims
- →Engineers were propping MacBooks half-open to prevent sleep while AI agents run
- →Adrafinil detects agent activity through hooks into Claude Code, Codex, and similar platforms
- →The app uses pmset disablesleep to prevent sleep with lid closed and no external power
- →Adrafinil automatically re-enables sleep once agent work completes and includes thermal safeguards
- →All binaries are notarized and the codebase is open source under MIT license
