CHECKED
Use caffeinate for a free, built-in way to keep your Mac awake for a timer or a command. Use Vigil when you want sleep protection to follow a coding agent's working and waiting states.
caffeinate already stops automatically when a command exits. The difference appears when an interactive agent stays open but needs your approval. A process-based hold continues; Vigil gives that wait a grace period.
THE DIFFERENCE AT A GLANCE
| Behavior | caffeinate | Vigil |
|---|---|---|
| Start a hold | Run a command in Terminal. | Install hooks once; supported agent events start protection. |
| End a hold | A timer ends, a watched process exits, or you stop caffeinate. | No tracked agent needs protection after work or waiting grace ends. |
| Agent asks for input | A live watched process keeps its hold. | Starts a configurable 5–30 minute grace period. |
| Other commands | Can wrap builds, scripts, and other commands. | Seven supported coding-agent integrations; no generic command wrapper. |
| Display sleep | Use -d when you also want the display awake. | Optional display protection, off by default. |
| Cost | Included with macOS. | $3.99 once, for two Macs. |
WHEN CAFFEINATE IS ENOUGH
For a build or script that exits when the job finishes, process lifetime is a useful boundary. There is no app to buy or integration to install.
Keep your Mac awake for an hour
caffeinate -i -t 3600
-i prevents idle system sleep. -t sets the duration in seconds. Stop it early with Control-C in that terminal.
Keep your Mac awake until a build exits
caffeinate -i make
The hold lasts while make runs. You can also use -w with a process ID to wait for an existing process. Apple's manual notes that -t is ignored when you supply a utility, and -w is ignored with that utility form.
WHERE AN AGENT CHANGES THE DECISION
Run caffeinate -i claude, and the hold follows the Claude process. If Claude asks for approval and you have left your desk, the process can remain alive without doing work.
Vigil reads lifecycle hooks, the events that supported agents emit as they work. It starts a grace period when an agent waits for input. After grace expires, Vigil releases its hold if no other tracked session needs it. It does not force the Mac to sleep.
Vigil supports Claude Code, Codex, Gemini CLI, Cursor, Copilot CLI, pi, and OpenCode. It is a paid menu bar app for macOS 14 or newer. The menu bar and optional session card at the top of the screen show the tracked sessions.
Protection still has limits. A session that reports nothing for 30 minutes, including its sub-agents, stops holding the Mac awake. A genuinely long, silent command can therefore be better served by a process-based caffeinate hold. Vigil does not override lid-close sleep or explicit Sleep.
COMMON QUESTIONS
Is Vigil just a graphical caffeinate?
Both use macOS sleep-prevention assertions. Vigil adds supported-agent event handling, waiting grace, session status, and sub-agent tracking. It has no manual “stay awake forever” switch.
Can I run both?
Each owns its own hold. Releasing Vigil's assertion does not cancel a separate caffeinate assertion. If you want normal sleep after Vigil's grace period, do not leave another keep-awake hold running.
Is this the Caffeinated app?
No. This page covers Apple's lowercase caffeinate command. For the menu bar app from Yugen, see Vigil vs Caffeinated.
CHOOSE THE BOUNDARY THAT FITS THE JOB
For a command that must stay awake until it exits, use caffeinate. For supported interactive agents that alternate between work and waiting, choose Vigil's event-based policy.
Vigil has no trial. A purchase includes a 30-day refund period.
SOURCES AND RELATED COMPARISONS
Checked against Apple's caffeinate manual and Vigil's implementation. You can read the manual on your Mac with man caffeinate. This comparison makes no battery-life or performance claim.