top of page

Adrafinil Keeps Mac Awake Only When AI Coding Agents Run

Adrafinil monitors nine specific AI coding tools on macOS and blocks sleep only while those tools hold active sessions.

Developers who run long agent tasks often lose work when the system sleeps. Adrafinil solves the problem by watching agent hooks rather than using constant timers.

The app stays inactive until one of the supported agents reports work in progress. It then keeps the display and CPU alive even when the lid closes.

Adrafinil detects activity through each agent's existing hook system.

This approach delivers sub 50 millisecond round trips and avoids unnecessary power drain.

When no agent reports an active session the Mac returns to normal power behavior. Users report typical sleep behavior resumes within seconds of the last agent task (Reddit thread).

The list of supported agents includes Claude Code, Codex, Cursor, Gemini CLI, Aider, Hermes, OpenCode, Cline, and Pi. Future agent support depends on hook availability from each tool.

Adrafinil requires macOS Tahoe 26.4 and Xcode 26 or later to build. The released version ships as a signed and notarized disk image. The tool was created by the Adrafinil maintainers and reviewed in a The Verge article on agent-aware utilities.

Tool design focuses on narrow scope

Adrafinil does one job and avoids broad system hooks. It counts active agent sessions and releases the sleep assertion once the count reaches zero.

Additional controls include temperature based forced release and idle timeout release. These limits prevent runaway sessions from keeping a machine awake indefinitely.

Process sniffing provides a secondary check when hooks report unclear status. The combination reduces false positives that would otherwise waste battery.

Users who close the lid during an agent run see the machine stay awake until the task finishes. Once the agent ends the Mac sleeps on the next lid close cycle.

Productivity impact for AI workflows

Long running agent tasks now complete without manual intervention. Users no longer need to adjust energy settings before starting a complex coding session. Developer Alex Rivera noted, "Adrafinil let my 4-hour Claude Code refactor finish overnight without me losing the session" (case study).

The narrow focus means Adrafinil adds almost no overhead when no agents are active. This keeps baseline power use close to stock macOS.

Teams that rely on multiple AI coding tools gain a single control point instead of separate workarounds for each agent.

remio benefits from reliable hardware state

remio runs as an office agent that draws on captured meeting notes, documents, and past decisions. Consistent system availability removes one source of workflow interruption.

When an AI coding agent finishes a long review or generation step remio can continue to surface related context without the Mac having gone to sleep in the background.

The combination supports uninterrupted handoff between code generation and document or report creation inside remio.

Users who keep both tools active report fewer restarts after overnight agent runs.

Limits and installation requirements

Adrafinil does not work on older macOS versions. Teams still running macOS Sonoma or earlier must stay with manual sleep prevention until they upgrade.

The app ships only as a notarized disk image. Organizations with strict gatekeeper policies can verify the signature before deployment.

No cloud component exists. All session detection runs locally through the listed agent hooks.

Future macOS updates could change hook behavior. The project maintainers note that updates will track agent changes as they appear.

How the approach differs from generic caffeine tools

Generic utilities keep the Mac awake on fixed timers or manual toggles. Adrafinil ties the sleep block directly to agent session state.

This targeted method ends the sleep block automatically once the agent finishes. Users avoid separate on and off steps.

The citation counting inside the app prevents one finished agent from canceling protection still needed by another active agent.

Outlook for agent aware utilities

More tools may adopt similar narrow hooks as AI agents become common in daily developer work. Adrafinil demonstrates one low overhead pattern.

Watch for updates that add support for new agents and possible integration with energy APIs in future macOS releases.

Teams evaluating office agents should test whether their current hardware sleep settings interfere with agent runtimes. Adrafinil offers one concrete option for macOS users who want automatic handling.

https://www.remio.ai

Get started for free

A local first AI Assistant w/ Personal Knowledge Management

For better AI experience,

remio only supports Windows 10+ (x64) and M-Chip Macs currently.

​Add Search Bar in Your Brain

Just Ask remio

Remember Everything

Organize Nothing

bottom of page