Guide · October 2026

An Amphetamine alternative for AI agents

Amphetamine is a great free keep-awake app. Here's what long, open-ended runs like Claude Code or Codex need on top of that.

When Amphetamine is enough

If a timer, or “while this app is open”, is good enough — especially at a desk with power and an external display — Amphetamine (free) or caffeinate does the job.

What changes with AI agent runs

It has to know when the work is done. The terminal stays open after the task ends, so “while the app is running” keeps the Mac up all night. Lidnight uses Claude Code and Codex hooks to know exactly when work starts and ends, and sleeps 10 minutes after everything goes quiet.

Lid closed, on battery. Without an external display, closing the lid sleeps the Mac. Lidnight keeps the run going, warns if the battery stays above 42°C for over a minute, and sleeps at 45°C or at a battery floor you set.

Don't stall on a permission prompt. Keeping the Mac awake doesn't help if the agent is stuck on “Can I run this?”. Lidnight lets you allow or deny it from a Mac notification, a bunny by the notch, or your phone (Pro).

Side by side

AmphetamineLidnight
PriceFreeFree + one-time Pro
Timers & app triggers✓Timer & Until modes
Sleeps when AI work ends—✓
Lid closed on batteryWith conditions✓
Battery & heat protectionSome✓
Claude Code approvals & limits—✓

Amphetamine's options vary by version and settings — check its own documentation for details.

In short

Fixed amounts of time: Amphetamine. Hand an agent a task, close the lid and let it sleep when it's done: Lidnight. Compare more options

Try Lidnight free

Apple Silicon Macs · macOS 13 or later. Every download includes a 7-day trial of everything in Pro, no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99, 50% off through Oct 31) with a 14-day refund.

Homebrew: brew install whereisdw/tap/lidnight