LidGuardLidGuard watches Claude Code, Codex and the rest, and holds your Mac awake only while there is real work happening. When macOS won't honour that, it says so instead of pretending.
Not released yet. The build is signed and going through Apple’s notarization. Homebrew install and the $1 licence arrive with it.
Every keep-awake app uses the same power assertions. None of them stop the sleep that closing the lid triggers on battery — that needs root. Here is the whole picture, measured on macOS 26.
| Hold | Mechanism | Admin password | Stops idle sleep | Stops lid-close sleep on battery |
|---|---|---|---|---|
| Standard | PreventUserIdleSystemSleepPreventSystemSleep |
Never | Yes | No |
| Deep hold | pmset -a disablesleep 1 |
Once, at install | Yes | Yes |
Deep hold is opt-in and installs a small helper. Until you install it, the menu reads lid open rather than lid-proof. The helper carries a dead-man switch: LidGuard refreshes a timestamp every 30 seconds, and if that goes stale for two minutes the helper re-enables sleep on its own. A crash can't leave your Mac unable to sleep.
An agent sitting at a prompt is not an agent mid-task. LidGuard uses two mechanisms and always shows you which one is in play for each agent.
A loopback-only endpoint that agents post to. A prompt opens a turn, Stop
closes it, a permission prompt counts as waiting on you. This is a true working/idle
edge, per session, so two windows can be busy and quiet independently.
Installed into ~/.claude/settings.json by merging — your existing hooks
are preserved, and a backup is written first.
For agents with no hooks. LidGuard matches path components of each process's real
executable, which is the only thing that works: Claude Code's binary lives at
~/.local/share/claude/versions/2.1.263, so its filename and its process
name are both a version number.
With no hook signal a live agent counts as working, because sleeping mid-task is the failure worth avoiding.
Any other agent can be wired to the same endpoint with a one-line
curl in its own hook config.
No subscription and no seats. A lifetime licence for up to three Macs, and every update after it.
Not on sale yet. When notarization clears, this becomes a one-off $1 purchase and a Homebrew cask. Nothing here takes payment today.