Comparison

AgentAwake vs caffeinate, pmset, Amphetamine and Hold My Lid

Five ways to keep a MacBook running while an AI agent works, compared on what matters with the lid closed: whether it works on battery, whether it knows the agent is busy, and what protects the battery and the hardware. Facts as of October 2026, from each tool's own site or documentation.

Short answer

Of the five, Hold My Lid and AgentAwake are built for AI agents: both keep a closed MacBook running only while an agent works. AgentAwake also runs the fans and confirms the setting by reading it back from macOS. Amphetamine is free, with many triggers but none for agents; caffeinate does not cover lid close; pmset disablesleep stays on until undone.

Key points

  • Lid closed: pmset disablesleep, Amphetamine, Hold My Lid and AgentAwake all offer it; caffeinate is not documented to.
  • Only Hold My Lid and AgentAwake track whether an agent is actually working, through hooks or process detection.
  • As of October 2026: caffeinate, pmset and Amphetamine are free; Hold My Lid is $9.99 once (early-bird, normally $14.99); AgentAwake is $9.99 a year. Both paid apps cover 3 Macs.
  • AgentAwake is the only one of the five that describes fan control: at least 40% with the lid closed, full speed at 90 °C by default.
  • For one long job now and then, the free pmset commands in a script that undoes them may be all you need.

Which keep-awake tool is best for AI agents?

To close the lid and walk away, choose one of the two tools built for agents: Hold My Lid or AgentAwake. Both keep a MacBook running with the lid closed, on battery or power, and only while an agent is working. Choose AgentAwake if you want heat handled too, since it pauses on serious heat and runs the fans. Choose Hold My Lid if you prefer a one-time price, lifecycle hooks for Claude Code, or turning the display off while agents run.

Amphetamine is the broadest general keep-awake app of the five, and free, but it has no way to tell a working agent from an idle one. caffeinate is built into macOS and is all you need while the lid stays open. pmset disablesleep is the system switch that AgentAwake and Amphetamine's Power Protect helper set; used by hand, it stays on until you turn it off.

Facts on this page come from each tool's own site, its App Store page or Apple's documentation, checked on 20 October 2026. Prices and features change, so check the linked pages before you buy.

How do the five compare side by side?

The table compares what decides whether a tool is safe to leave running in a closed MacBook. Where a tool's own site or documentation does not state something, the cell says so instead of guessing.

Keep-awake options for AI agents on a MacBook, as of October 2026
caffeinatepmset disablesleep 1AmphetamineHold My LidAgentAwake
Keeps running with the lid closedNot documented toYes, on battery or powerYes, "while its display/lid is closed"Yes, on battery or power, no external displayYes, on battery or power
Only while an agent worksOnly while the command it wraps runsNo, on until you undo itNo agent detection; triggers include a running app or CPU useYes: hooks for Claude Code, Codex, OpenCode; process detection for othersYes: hooks for Codex and opencode, Claude Code's caffeinate, or CPU activity
Battery floorNoNoCan end a session when the battery is low; level not statedConfigurable cut-off, plugged-in-only mode10, 15, 20 or 25%
Heat and fansNoNoNot statedNot stated on its sitePauses on serious heat; runs the fans, full speed at 90 °C
If the tool stopsAssertion ends with the processSetting stays onNot statedNot stated on its siteWatchdog restores lid sleep within 60 s
PriceFree, built inFree, built inFree, no in-app purchases$9.99 once, early-bird (normally $14.99), 3 MacsFree for 14 days, then $9.99 a year, 3 Macs
RequiresmacOSmacOS and an admin passwordmacOS 10.13 or latermacOS 14 or later, Apple silicon or IntelmacOS 14 or later, Apple silicon or Intel

Why aren't caffeinate and pmset enough on their own?

Because one does not cover the lid and the other does not know when to stop. caffeinate creates power assertions against idle, display or disk sleep, and with -s against system sleep on AC power only. Apple's documentation for the idle-sleep assertion says the system may still sleep on lid close.

sudo pmset -a disablesleep 1 does keep a closed MacBook running, on battery too, but it is a system-wide switch with no timer. It stays on after the agent finishes, runs the battery down if nobody undoes it, and takes no notice of heat. Both are free and worth knowing; the how-to guide below has the exact commands and a script that undoes the switch for you.

Built-in commands vs agent-aware apps

caffeinate and pmset

  • caffeinate is not documented to cover lid close
  • pmset disablesleep stays on until undone
  • Neither stops at a battery level
  • Neither knows when the agent is done

Hold My Lid and AgentAwake

  • Keep running with the lid closed on battery
  • Let the Mac sleep when agents go idle
  • Stop at a battery level you set
  • Free trial before you pay

Amphetamine: free and flexible, not built for agents

Amphetamine, by William Gustafson, is free on the Mac App Store with no in-app purchases. It can keep a MacBook awake while its lid is closed, and it starts sessions on a long list of triggers: for a set time, while a file downloads, while a specific app is running, while the CPU is above a threshold, when an external display is connected, and more. It can end a session when the battery is low.

It does not tell a working agent from an idle one. A terminal running Claude Code is a running app whether the agent is busy or waiting for your reply, so an app trigger keeps the Mac awake in both cases.

Its App Store notes carry a caveat for Apple silicon: closed-display sessions can fail when the Mac is connected to or disconnected from power, unless you install its helper script, which sets the same pmset disablesleep switch. The App Store page does not describe heat or fan handling.

Hold My Lid: the closest alternative

Hold My Lid does the same job as AgentAwake and is the closest match. Its site says it keeps a MacBook awake with the lid closed and no external display, only while a watched agent is working. Lifecycle hooks report working or idle for Claude Code, Codex and OpenCode, and process detection covers Cursor, Gemini CLI, Aider and Windsurf.

It has a configurable battery cut-off, a mode that works only when plugged in, and respect for macOS Low Power Mode. It can turn the display off while agents run, and it notifies you when agents finish. It needs macOS 14 or later on Apple silicon or Intel.

It offers a free trial. As of October 2026 it is then a one-time purchase of $9.99 at its early-bird price, normally $14.99, and a lifetime licence covers up to 3 Macs. Its site does not describe fan control or what happens to the sleep setting if the app stops unexpectedly; try it during the trial if those matter to you.

What does AgentAwake do differently?

Its main difference is how it protects a closed Mac. AgentAwake runs the fans through a small root service: on the default Balanced profile they start at 65 °C, hold at least 40% while the lid is closed and agents work, and reach full speed at 90 °C. At 95 °C on any chip sensor every fan runs at full speed, whatever the profile. It also pauses whenever macOS reports serious heat. On MacBooks without fans it shows the temperature only.

It never assumes the setting worked. The panel says "Lid sleep blocked ✓" only after reading the value back from the system, and "Can't keep the Mac awake" with the reason when it could not. A watchdog checks every 60 seconds and turns lid sleep back on if the app has stopped. The sudo rule it installs allows exactly three pmset commands and nothing else.

It detects work three ways, so agents without hooks still count: hooks from Codex and opencode, the caffeinate Claude Code runs while it replies, or the agent's own processor use. It is free for 14 days with no card, then $9.99 a year for up to 3 Macs. If you would rather pay once, Hold My Lid's pricing fits that better.

AgentAwake's safety numbers
Minimum fan speed with the lid closed, Balanced profile
40%
Fans at full speed, Balanced profile
90 °C
Any sensor: every fan at full speed, any profile
95 °C
Watchdog restores lid sleep if the app stops
60 s

What does each one cost?

Three of the five cost nothing: caffeinate and pmset ship with macOS, and Amphetamine is free with no in-app purchases. The two agent-aware apps each cover up to 3 Macs and offer a free trial, but price differently. Hold My Lid is a one-time purchase; AgentAwake is a yearly subscription, bought inside the app through Stripe.

Price as of October 2026
caffeinate, pmset and Amphetamine
$0
Hold My Lid, early-bird price (normally $14.99), 3 Macs
$9.99 once
AgentAwake, free for the first 14 days, 3 Macs
$9.99 a year

How do you choose?

Start from where the Mac will be while the agent works, then from how much you want the tool to look after.

Pick by situation
  1. Lid stays opencaffeinate -i <command> is enough, and free
  2. At a desk with a monitorClamshell mode: power, external display, keyboard and mouse
  3. One job, you will be backpmset disablesleep 1, then 0, or a script that undoes it
  4. General keep-awake needsAmphetamine, free, with many triggers
  5. Close the lid and walk away oftenAn agent-aware app: Hold My Lid or AgentAwake
  6. Long runs in a bagAgentAwake, for the heat pause, fan control and watchdog

Questions to ask any keep-awake tool

  • Does it keep the Mac running with the lid closed on battery, or only on power?
  • Does it detect the agents you actually run, and does it know when they are idle?
  • What makes the Mac sleep at low battery, and at what level?
  • What happens with heat when the Mac is closed in a bag?
  • What turns lid sleep back on if the tool crashes or quits?
  • Is a yearly subscription or a one-time price better for you?

Frequently asked questions

What is the best Amphetamine alternative for AI coding agents?

One that knows when the agent is working. Hold My Lid and AgentAwake both keep a MacBook running with the lid closed only while an agent works and let it sleep afterwards. AgentAwake also runs the fans and pauses on serious heat; Hold My Lid is a one-time purchase. Amphetamine itself is free and suits general keep-awake use.

Is Hold My Lid or AgentAwake better?

They do the same core job. AgentAwake adds fan control, a heat pause, a read-back of the sleep setting and a 60-second watchdog, at $9.99 a year. Hold My Lid has a one-time price ($9.99 early-bird, normally $14.99, as of October 2026), hooks for Claude Code and display control. Both cover 3 Macs and offer a free trial.

Can Amphetamine keep a MacBook awake with the lid closed?

Yes. Its App Store page lists keeping a MacBook awake while its display or lid is closed. On Apple silicon, its notes say a closed-display session can fail when the Mac is connected to or disconnected from power, unless you install its helper script.

Does caffeinate work with the lid closed?

It is not documented to. Its flags prevent idle, display or disk sleep, and -s prevents system sleep on AC power only. Apple's documentation for the idle-sleep assertion says the system may still sleep on lid close. For lid-closed work on battery, use pmset disablesleep or a tool that sets it.

Is it safe to give a keep-awake app sudo access?

It depends on what the rule allows. AgentAwake's rule permits exactly three commands, pmset -a disablesleep 1, pmset -a disablesleep 0 and pmset sleepnow, and nothing else. After setup you can read it in /etc/sudoers.d/agentawake.

Start with the problem

Try AgentAwake for 14 days

Download it, choose Set up once, start your agents and close the lid. The trial needs no card; after it, $9.99 a year covers up to 3 Macs. macOS 14 or later, Apple silicon or Intel.

Your business,in professional hands.