← Back to Product Feed

Hacker News Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

A context-aware solution to prevent MacBooks from sleeping during AI agent activity, differentiating from generic sleep-preventing apps by activating only when needed and addressing battery drain concerns.

100
Traction Score
61
Discussions
Jun 28, 2026
Launch Date
View Origin Link

Product Positioning & Context

AI Executive Synthesis
A context-aware solution to prevent MacBooks from sleeping during AI agent activity, differentiating from generic sleep-preventing apps by activating only when needed and addressing battery drain concerns.
This product addresses a specific, emerging pain point for developers utilizing local AI agents on MacBooks. The market implication is a growing need for intelligent power management solutions that adapt to compute-intensive, background tasks, particularly those involving AI. Current solutions like `caffeinate` or generic keep-awake apps are insufficient due to battery drain and manual management overhead. Adrafinil's context-aware activation, tied to specific AI agent activity, highlights a trend towards more granular, automated system resource management. The open-source nature and focus on security (notarized, minimal privilege root helper) are critical for developer adoption. This product targets a niche but expanding segment of AI developers, indicating a market for specialized utility software that optimizes hardware utilization for AI workloads.
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 defended their choice with “but I only need it sometimes, and forgetting to disable Amphetamine and finding my laptop discharged in my bag is worse.”This is a solution to this problem. Unlike caffeinate, it will prevent your MacBook from sleeping even with the lid closed, with no external power or display, using pmset disablesleep 1. Unlike other sleep-preventing apps, Adrafinil only activates when there’s an agent actively doing something. It detects agent activity through hooks it installs into Claude Code, Codex, and others. To reassure you it’s working, the app shows the active status in the menu bar, and it plays a chime when you close the lid.Once the agent is done, Adrafinil detects it and lets the laptop go to sleep by setting pmset disablesleep back to 0. It will also let it sleep in case of overheating. And if you want to manually toggle it, you can install an optional MCP and tell your agent to keep the MacBook awake for a specific time.It has four binaries, one of which is a root helper exposing a single setSleepBlocked call. All the logic and policy live in the unprivileged parts. They’re all notarized, and the app is fully open source (MIT).
pmset disablesleep 1 pmset disablesleep back to 0 Claude Code Codex root helper setSleepBlocked call unprivileged parts notarized

Related Ecosystem & Alternatives

Discover adjacent products, open-source repositories, and developer tools sharing similar technical architecture.

Deep-Dive FAQs

What is Adrafinil – keep a lid-closed Mac awake only while agents work?
Adrafinil – keep a lid-closed Mac awake only while agents work is analyzed by our AI as: A context-aware solution to prevent MacBooks from sleeping during AI agent activity, differentiating from generic sleep-preventing apps by activating only when needed and addressing battery drain concerns.. It focuses on This product addresses a specific, emerging pain point for developers utilizing local AI agents on MacBooks. The market implication is a growing ne...
Where did Adrafinil – keep a lid-closed Mac awake only while agents work originate?
Data for Adrafinil – keep a lid-closed Mac awake only while agents work was aggregated directly from the Hacker News community ecosystem, representing raw developer and early-adopter sentiment.
When was Adrafinil – keep a lid-closed Mac awake only while agents work publicly launched?
The initial public indexing or launch date for Adrafinil – keep a lid-closed Mac awake only while agents work within our tracked developer communities was recorded on June 28, 2026.
How popular is Adrafinil – keep a lid-closed Mac awake only while agents work?
Adrafinil – keep a lid-closed Mac awake only while agents work has achieved measurable traction, logging over 100 traction score and facilitating 61 recorded discussions or engagements.
Which technical categories define Adrafinil – keep a lid-closed Mac awake only while agents work?
Based on metadata extraction, Adrafinil – keep a lid-closed Mac awake only while agents work is categorized under topics such as: pmset disablesleep 1, pmset disablesleep back to 0, Claude Code, Codex.
What are some commercial alternatives to Adrafinil – keep a lid-closed Mac awake only while agents work?
Our semantic intelligence engine identifies potential commercial alternatives in the SaaS space, such as Velo 3.0, which offers overlapping value propositions.
How does the creator describe Adrafinil – keep a lid-closed Mac awake only while agents work?
The original author or development team describes the product as follows: "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 agen..."

Community Voice & Feedback

kylehotchkiss • Jun 28, 2026
`sudo pmset -a sleep 0`
AussieWog93 • Jun 28, 2026
How does this differ from https://github.com/samber/cc-caffeine?
exabrial • Jun 28, 2026
Amphetamine is what I use. It has a robust set of triggers, like if you ip address changes to a certain subnet (like private IPs on a work network)https://apps.apple.com/us/app/amphetamine/id937984704?mt=12
47 • Jun 28, 2026
I have been using the builtin macOS `caffeinate` command for this.For example:caffeinate -dimsuThat keeps the Mac awake so I can use Claude remotely from phone.You can also wrap your command as well, but I rarely use it.caffeinate -dimsu your-agent-command
lellow • Jun 27, 2026
Interesting. Kind of similar in purpose, but I created a simple app to schedule and type the "continue" word in my terminal after X time has passed, since I have to wait for my usage to be restored. =)
mr_toad • Jun 27, 2026
I’ve often wondered about the thermal performance or running a MacBook with the lid closed. One argument is that the reduced surface area from a closed lid increases temperature. Others argue that not running & rendering the display (and thus GPU) generates less heat. I’m not sure who to believe.
rancar2 • Jun 27, 2026
For MacOS, keep awake with:sudo pmset -a disablesleep 1Reset back:sudo pmset -a disablesleep 0
aqme28 • Jun 27, 2026
Thank goodness. I can’t leave my laptop for a second unattended because my cat loves nothing more than to dance on the keyboard. I’ve need something like this.
chopete3 • Jun 27, 2026
This is great. Will check it.Recently I bought a usb-c empty external monitor card to prevent mac from going to sleep. There are many of these external monitor simulators on Amazon.I still see the laptop go to sleep many times with the external monitor simulator.This is the one I bought.4K 60Hz USB-C Type-C Virtual Display Adapter DDC EDID Dummy Plug Headless Ghost Display Emulator 2K 60hz1080P@120Hz
processunknown • Jun 27, 2026
Does it also make my Mac irritable?

Discovery Source

Hacker News Hacker News

Aggregated via automated community intelligence tracking.

Tech Stack Dependencies

No direct open-source NPM package mentions detected in the product documentation.

Media Tractions & Mentions

No mainstream media stories specifically mentioning this product name have been intercepted yet.

Deep Research & Science

No direct peer-reviewed scientific literature matched with this product's architecture.