Six fixes — most of them from two exceptional community reports — and a new capability for agents that look at the screen.
Fixed
- The app no longer quits itself two seconds after closing Settings — macOS automatic termination treated the window-less menu-bar app as disposable and took the daemon's wake-blocking down with it. Diagnosed down to the AppKit log records by @Conte777. (#18)
/clearand plan approvals no longer strand a phantom "1 agent working" — Claude Code retires its session id inside the same process on/clear,/resume, and clear-context plan approvals, so the old session's hold lingered until the idle sweep (64 minutes in the report) and counted against the per-process cap. Adrafinil now releases exactly at that boundary via theSessionEndhook — and holds the post-clear plan run, which previously ran entirely unprotected (its first message fires noUserPromptSubmit). Existing installs migrate automatically on first launch. Traced to the exact session handover by @Conte777. (#19)- The menu bar can no longer claim "No agents active" while a hold is live — a stale status reply racing a fresh push could clobber the UI until the next state change. Status payloads now carry an ordering generation and stale ones are dropped. Captured live, daemon and widget disagreeing, by @t-choudhury. (#22)
- The popover survives a fleet — with dozens of active holds the list grew past the screen and pushed the footer off entirely; it now caps its height and scrolls internally. (#23)
- Homebrew installs of OpenCode are tracked again — the real binary Homebrew links to is named
opencode.exe(yes, on macOS), so holds bound to the wrong process and the sniffer never saw OpenCode at all. (#24) releaseaccepts every key formstatusprints, and fails loud — releasing thetool:sessionform no longer silently succeeds while releasing nothing, and a no-match release exits 1 at a TTY (hooks stay fail-soft). (#25)
#23–#25 were reported, root-caused across the process table, and offered as fixes by @t-choudhury — thank you both.
New
-
Display-class holds —
adrafinil hold --display(alsoacquire --display, andkeep_display_awakeon the MCP tool) keeps the display awake too, and wakes it if it is already dark. For agents that read the screen: when the display sleeps, every app's accessibility tree collapses to a stub, so a normal hold keeps the machine running while blinding the agent. Nothing changes for headless agents — the panel still sleeps by default — and pause, idle release, and the thermal/battery cutouts all outrank a display hold.A display hold deliberately stops at the lock screen (locked-but-awake is fully readable). If you also want the lock itself held off while you're on your own network, that is exactly what Dantrolene does — and it auto-holds an Adrafinil assertion while it works, so the pair covers the whole story.
Still on macOS 15 Sequoia? @valentine maintains a backport fork.