Agentwake knows when your unattended work is done.
It watches your AI coding agents, Claude Code, Cursor, Codex, Gemini and more, and keeps your Mac awake, lid closed if you want, only while they are working. The moment the last one finishes it can notify you, run your Shortcut, and put the Mac to sleep. And it locks your keyboard so you can clean it. That part is free.
- v1.16.1 · macOS 14+, notarized
- Pay once — €4.99
- 14-day refund
- No subscription
The three-hour run that died at minute four
You kick off a three-hour agent run, close the lid, and the Mac goes to sleep at minute four. So you prop the lid open with a book and leave the machine running warm all night for a job that finished at 1 AM. Keep-awake apps hold the Mac awake; none of them knows when the work is done.
How it knows: hooks, a process fallback, and a fail-safe
Agentwake installs a tiny activity hook into each coding tool with one click (nine tools built in, custom agents supported), and falls back to process detection for tools without hooks. Every session reports a heartbeat; when the last one goes quiet, the work is done. The design is fail-safe: a missed signal lets the Mac sleep. It never gets stuck awake.

Prefer to wire it yourself? This is the whole hook, ready to paste into Claude Code’s ~/.claude/settings.json. After an app update the installed hook refreshes itself, so it always matches the current version:
{
"hooks": {
"PostToolUse": [{ "matcher": ".*", "hooks": [{ "type": "command", "command": "mkdir -p ~/.agentwake && touch ~/.agentwake/heartbeat", "async": true, "timeout": 1 }] }],
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "mkdir -p ~/.agentwake && touch ~/.agentwake/heartbeat", "async": true, "timeout": 1 }] }],
"SessionEnd": [{ "hooks": [{ "type": "command", "command": "rm -f ~/.agentwake/heartbeat", "async": true, "timeout": 1 }] }]
}
}Everything in Free, everything in Pro
The signal is free. The reaction is paid.
Free
- System-wide keyboard and trackpad lock, 5 seconds to 10 minutes on a two-zone slider
- Full-screen dark overlay on every display with a live countdown; timing survives sleep and wake
- Compact HUD-corner mode, and a keyboard-only mode that leaves the cursor visible
- Triple-Escape emergency unlock, always available
- Quick-pick durations, recordable global hotkey, sound feedback, last duration remembered
- Self-healing watchdog restores input automatically if the tap or the permission is lost
- Live per-tool agent status in the menu: working or idle and for how long, across concurrent sessions
- One-click hook install; nine tools built in (Claude Code, Codex, Cursor, Gemini, Aider, OpenCode, Cline, Hermes, Pi) plus custom agents
- Hook-free process detection fallback against a verified allowlist, with CPU-idle release
- Live view of the session dashboard
Pro
- Display-only or full-system sleep prevention, with an auto-off cap and re-enable on launch
- Battery guards: only-while-charging, and a battery cutoff (default 30%) with a re-enable-anyway banner
- Thermal guard: pauses on overheat and resumes on cooldown, trigger level configurable
- Clamshell keep-awake (lid closed, no external display) via a lease-bound privileged helper: a crashed app can never leave the Mac stuck awake
- Lid-close confirmation chime, plus four distinct pre-sleep motifs
- Lid-open summary notification: what ran, for how long, peak thermal pressure, guards fired
- One-shot and true weekly recurring schedules
- AI Coding mode: awake only while at least one agent works, released the instant the last goes idle
- Fail-safe throughout: a missed signal lets the Mac sleep, never the reverse
- Agent notifications, each toggleable: all idle, unexpected end, long-running session, session started
- End-of-session automations: Notify, Run Shortcut, Lock, Sleep behind a cancellable countdown
- In-app Alerts log of every automatic state change, surfaced by a menu-bar badge
- Dashboard History, Metrics, and Billing panes; per-project billable time with rounding rules and CSV export
- Consent-gated token-cost estimation for Claude Code sessions: usage and model fields only, never conversation content
- Retention controls: row cap and time window
- agentwake CLI (hold, release, acquire, status), file-based and SSH-reachable, works with the app closed
- MCP server: hold, release, and status as agent-callable tools, one-click install into Claude Code
- Menu-bar quick holds from 15 minutes to until-stopped, with live remaining time
The finish line: what happens when the work ends
Keep-awake gets your run to the end. End-of-session automations decide what happens the moment it stops: pick a trigger, pick the actions, and Agentwake runs them while you are away from the desk.
The flagship case: your agent goes idle for twenty minutes, Agentwake sends a notification, runs your cleanup Shortcut, and puts the Mac to sleep. You come back to finished work and a cool, sleeping machine.
Triggers
- Your AI agent goes idle. The heartbeat goes stale past the timeout, so Agentwake treats the run as finished.
- The keep-awake cap expires. The maximum-duration timer you set runs out.
- A schedule window closes. A weekly or one-shot keep-awake window ends on its own.
Actions, in order
Notify
Post a notification so you know the session ended, even from another room.
Run Shortcut
Run any macOS Shortcut by name. Commit, push, post to Slack, anything Shortcuts can do, with no extra permissions and no change to how Agentwake is signed.
Lock
Lock the keyboard and trackpad with Agentwake’s own lock, so nothing disturbs the Mac after the run.
Sleep
Put the Mac to sleep once the rest of the sequence has finished.
Every sequence opens with a countdown you can cancel, from ten seconds to five minutes. Move the mouse, press a key, or click Cancel and nothing runs. If your agent picks the work back up, the countdown cancels itself. A failed step never blocks the others, only one sequence runs at a time, and the Alerts log records every run.

The Amphetamine alternative for AI agents, compared honestly
Amphetamine is excellent and free, and it deserves its reputation. But like every mainstream keep-awake app it has no idea what your agents are doing. Two newer tools do: Adrafinil (free, macOS 26.4+ only) and Agent Caffeine ($9). A third, Vigil (free, macOS 13+), does not detect agents either, but it goes further than Amphetamine on scheduling, profiles, and session history. Here is the honest picture, feature by feature, sources checked July 2026. If you're looking at Agentwake as an Adrafinil alternative, an Agent Caffeine alternative, or a Vigil alternative, the table below has the facts, not the pitch.
| Feature | Agentwake | Amphetamine | Adrafinil | Agent Caffeine | Vigil |
|---|---|---|---|---|---|
| Price | Free + Pro €4.99 one-time (list €7.99) | Free | Free (MIT) | $9 one-time | Free |
| macOS required | 14+ | 10.13+ | 26.4+ | 13+ | 13+ |
| Detects AI coding agents | Yes(hooks + process fallback) | No | Yes(hooks + process fallback) | Yes(process polling, 5 s) | No |
| Agent tools covered | 9 built-in + custom UI | n/a | 9 hooks + custom via CLI | 40+ allowlist, editable | n/a |
| Awake only while agents work | Yes | No | Yes | Yes | No |
| End-of-session action chain (notify, Shortcut, lock, sleep) | Yes(cancellable countdown) | No(AppleScript for external automation) | No | No | Partial (lock on end only) |
| Agent notifications (idle / unexpected end / long-run) | Yes | No | No | No | No |
| Clamshell: lid closed, no external display | Yes(built-in helper) | Partial (separate Enhancer app) | Yes | Partial (one-time sudo setup on battery) | Partial (AC power only) |
| Lid-close chime + pre-sleep sounds | Yes(chime + 4 motifs) | No | Partial (chime) | No | Partial (session start/end sound) |
| Lid-open summary | Yes | No | Yes | No | No |
| Thermal guard | Yes(pause + auto-resume, configurable) | No | Partial (force-release) | No | No |
| Battery guards (cutoff %, only-while-charging) | Yes(both) | Partial (low-battery auto-end) | No | No | Partial (fixed 20% cutoff) |
| Native scheduling (one-shot + weekly) | Yes | Partial (clock-time triggers) | No | No | Yes(schedule + profiles) |
| SSH-reachable CLI | Yes | No | Yes | No | Yes(Terminal, Shortcuts, CI) |
| MCP tool for agents | Yes | No | Yes | No | No |
| Timed holds from the menu | Yes(presets + readout) | Yes(durations) | Yes(time-boxed) | No | Yes(5 min to 4h + custom, countdown) |
| Session history, metrics, billing, token cost | Yes | No | No | Partial (reads Claude session files) | Partial (last 100 sessions, weekly total) |
| In-app alerts log | Yes | No | No | No | No |
| Keyboard/trackpad cleaning lock | Yes(free) | No | No | No | No |
The mainstream field, briefly: KeepingYouAwake (free, MIT), Caffeinated ($3.99), and Lungo ($4) are manual on/off tools. None of the three detects agents, schedules natively, runs end-of-session actions, or supports a closed lid without an external display.
Where Agentwake stands alone in this table: end-of-session action chains, the agent notifications suite, the dashboard with billing and token cost, an alerts log tied to AI-agent events, a thermal guard that pauses and resumes, configurable battery guards (cutoff percentage and only-while-charging, not a fixed threshold), and the free cleaning lock.
From overnight Claude Code runs to a clean keyboard
Agents overnight
Start Claude Code or Codex before bed and close the lid. Agentwake holds the Mac awake exactly as long as the run lasts, then notifies you, runs your Shortcut, and lets it sleep.
Renders and backups
Long exports, builds, and backup jobs get a timed or scheduled hold with battery and thermal guards, and the lid-open summary tells you how it went.
Presentations
A quick menu-bar hold keeps the display awake through a talk or a screen share, then expires on its own. No trip to System Settings.
Cleaning the keyboard
Lock the keyboard and trackpad for a set time, wipe everything down, and triple-press Escape if you need out early. That part is free.
Get Agentwake
Free
€0
The whole lock, the live agent status, the hook installer, process detection, and the dashboard’s live view.
Pro
€4.99, list price €7.99
Everything that reacts: keep-awake and its guards, schedules, automations, notifications, history and billing, the CLI and the MCP tool.
Launch price €4.99. It rises to €5.99 two weeks after launch and settles at €7.99 six weeks in. One-time purchase, lifetime updates.
Pay once, no subscription. 14-day refund, and the lock stays free either way.
Frequently asked questions
Does it really keep the Mac awake with the lid closed?
Yes, with no external display, through a privileged helper you approve on first use. The helper holds a lease that the app renews every few seconds; if Agentwake ever crashes, the lease expires and the Mac sleeps normally. It cannot get stuck awake.
Why does Agentwake need the Accessibility permission?
The keyboard lock swallows input events system-wide, which macOS only allows to apps you trust in System Settings, Privacy & Security, Accessibility. The keep-awake side does not use it.
Does Agentwake read my code or my conversations?
No. The agent hooks report only 'this session is alive' heartbeats. The optional token-cost estimate reads usage and model fields from local Claude Code session files, only after you opt in, and never the conversation content. There is no telemetry.
What happens if an agent hangs or a hook misses?
The Mac sleeps. Every detection path fails toward sleep, never toward stuck-awake. Battery cutoff and thermal pause add two more layers of protection.
How is this different from Amphetamine?
Amphetamine starts and stops awake sessions on triggers like time, app, or battery. It cannot tell whether your agents are working, and it cannot run actions when the work ends. Agentwake does both.
Adrafinil is free. Why pay for Agentwake?
Adrafinil covers keep-awake for agents and requires macOS 26.4. Agentwake runs on macOS 14+, adds weekly schedules, battery guards, agent notifications, end-of-session action chains, a session dashboard with billable time and token costs, and the keyboard-cleaning lock. If Adrafinil covers your need, use it; it is good software.
How does Agentwake compare to Agent Caffeine or Vigil?
Agent Caffeine ($9) detects agents by polling the process list every five seconds; Vigil (free) doesn't detect agents at all, its triggers are generic process, CPU, and network activity you configure by hand. Agentwake's hooks report a real per-session heartbeat, so it knows precisely when an agent is working, not just when some process is running.
Why is Agentwake not on the Mac App Store?
The App Store sandbox forbids the two things Agentwake exists to do: suppressing input events and installing the lid-closed helper. The DMG is signed and notarized by Apple's process, and Sparkle keeps it updated.
What exactly is free?
The whole lock, the live agent status, the hook installer, process detection, and the dashboard's live view. Pro adds everything that reacts: keep-awake and its guards, schedules, automations, notifications, history and billing, the CLI and the MCP tool.
How do updates work?
Through Sparkle, built in: the app checks, downloads, verifies the signature, installs, and relaunches. Updates are included for life.
Is it a subscription?
No. One payment through Polar, the license key is yours, and every update is included.
Can I get a refund?
Yes. If Pro is not for you, write within 14 days of purchase and you get a full refund.
How do I get help?
Email stefferri@icloud.com and I will get back to you.
Links
No telemetry. The only network calls Agentwake makes are Sparkle update checks, license validation, and the pricing-table refresh you trigger yourself. Agentwake was formerly known as CleanKey.