Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work
Engineers stopped closing their MacBooks to keep AI agents running. This open-source app fixes it.

Why it matters
Adrafinil addresses a real operational friction point in agent-native development workflows—keeping compute available for autonomous tasks without manual intervention or battery drain. It's a small but telling indicator of how developer tooling must adapt to agent-first work patterns.
The key facts
13 to knowDetects activity in Claude Code, Codex, and other agent platforms
Uses pmset disablesleep to prevent Mac sleep with lid closed
Automatically re-enables sleep when agent task completes
Includes optional MCP for agent-directed sleep control
Open source (MIT license), fully notarized binaries
Solves real friction: engineers leaving MacBooks half-open to avoid forced sleep during agent execution
Published on Hacker News, early-stage adoption signal
Adrafinil detects active agent work and prevents sleep via pmset disablesleep
Integrates with Claude Code, Codex, and other agent platforms
MIT open source, fully notarized binaries
Solves real developer workflow friction: agents stopping on lid closure
Features menu bar status indicator and optional MCP for manual control
Includes thermal safety—allows sleep if overheating detected
Go to the source
Hacker Newsgithub.com
Publisher excerpt: 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…