Guide · October 2026

Keep your Mac awake while Claude Code runs

Hand off a long task and walk away without it stalling — and let the Mac sleep when it's done.

Why the work stops

When the Mac sleeps, Claude Code in your terminal stops too. The network drops, API requests fail, and you come back to find it stalled a few minutes in. Closing the lid or stepping away long enough for idle sleep both cause it.

What Lidnight does

Turn on Claude Code in Settings › Agents and Lidnight adds Claude Code hooks for when a task starts and ends, so it knows exactly — not by guessing — when it's working. Your settings file is backed up first, and turning it off removes only Lidnight's entries.

AI Auto mode: the Mac stays awake while work runs — lid closed or not — and sleeps once every session is quiet. With Pro it also turns itself on when work starts. Codex works the same way; other AI tools are detected from process and GPU activity.

Each AI gets a bunny in the menu bar. It runs faster as tokens flow, and sits up with an orange dot by its ear when it's waiting for approval.

Also included

Claude and Codex 5-hour and weekly limits with reset times, plus tokens and estimated API-price cost by model and project — read from local logs. No sign-in, and your code and conversations never leave the Mac.

Questions

Can't I just wrap Claude Code in caffeinate? It prevents idle sleep, but closing the lid usually still sleeps the Mac — and you have to remember to wrap every run. Details

Multiple sessions at once? Yes. Each one is tracked, and the Mac sleeps only after the last one finishes.

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 $4.99 · 3 Macs $9.99) with a 14-day refund.

Homebrew: brew install --cask whereisdw/tap/lidnight