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 November 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.
  • Of the five, only Hold My Lid and AgentAwake track whether an agent is actually working, through hooks where the agent has them.
  • As of November 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 on the default profile, and every fan at full speed if a sensor reaches 95 °C.
  • 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 are made to keep a MacBook running with the lid closed and no external display, 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.

All five are for work that has to run on your Mac. If a Claude Code task needs only the repository, a cloud session runs on Anthropic's infrastructure and keeps going after you close the laptop, with no keep-awake tool at all.

Facts on this page come from each tool's own site, its App Store page, its release notes or Apple's documentation, checked on 24 November 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 November 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 per its site, with no external displayYes, on battery or power
How it blocks sleepA power assertionA system-wide settingPower assertions; an optional helper sets pmset disablesleep on Apple siliconPower assertions, per its sitepmset disablesleep, read back from macOS
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 and others; process detection for the restYes: 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, all at full speed at 95 °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
  • Tell you when the agents have finished

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: connecting or disconnecting power during a closed-display session could cause unexpected behaviour, which its Power Protect helper addresses. The helper is a separate download and sets the same pmset disablesleep switch. The App Store page does not describe heat or fan handling, and lists version 5.3.2, from November 2023, as the current one.

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 its agent list adds Gemini, Pi, Copilot CLI and Hermes. Tools without hooks, such as Cursor and Cline, are covered by process detection, which holds the Mac awake while the process is alive.

It works differently underneath. Its site says it holds macOS wake assertions, the same documented ones as Amphetamine, where AgentAwake switches the pmset disablesleep setting, and that it tells you when it cannot guarantee staying awake. 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 November 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 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 hold at least 40% while the lid is closed and agents work, and follow the average CPU temperature: as of version 1.0.6 they start at 50 °C and reach full speed at 75 °C on Apple silicon, 65 and 90 °C on Intel. If any sensor reaches 95 °C, every fan runs at full speed, whichever curve is set. It also pauses whenever macOS reports serious heat. You can leave the fans to macOS and keep only the keep-awake part, and on MacBooks without fans it shows the temperature only.

It does not assume 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%
CPU average for full fan speed, Balanced profile on Apple silicon (90 °C on Intel)
75 °C
Any sensor: every fan at full speed, on every curve
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 November 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 work has to run, then where the Mac will be while the agent works, then how much you want the tool to look after.

Pick by situation
  1. Task needs only the repositoryA Claude Code cloud session; the Mac can sleep
  2. Lid stays opencaffeinate -i <command> is enough, and free
  3. At a desk with a monitorClamshell mode: power, external display, keyboard and mouse
  4. One job, you will be backpmset disablesleep 1, then 0, or a script that undoes it
  5. General keep-awake needsAmphetamine, free, with many triggers
  6. Close the lid and walk away oftenHold My Lid or AgentAwake; AgentAwake if you want 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 November 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 connecting or disconnecting power during a closed-display session could cause unexpected behaviour, and offer a separate helper, Power Protect, to address it.

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.