Keep Mac awake

Off by default. While a Claude or Codex session is actively running, BlackFlare can hold a macOS power assertion so your Mac doesn’t idle-sleep mid-turn. This matters for long silent tool calls — a build, a test suite, a sleep 120 — where nothing is streaming to the transcript to keep the machine interested.

Turn it on in Settings… → General → Keep Mac awake, or from the menu’s “Keep Mac awake” checkbox. A live status row in the menu shows how many sessions are currently holding the Mac awake.

By default only the system stays awake — the display may still sleep, the same behaviour as caffeinate -i. Turn on Also keep the display awake to keep the screen on too.

When a session counts as running

It is fully automatic. A session starts counting the moment you submit a prompt — so a long “thinking” stretch before the first output is covered, and long silent tool calls stay latched. It stops counting the moment the session:

  • finishes a turn,
  • asks you a question or waits for your input, or
  • is cancelled or interrupted (ESC).

The hold releases about 10 seconds after every tracked session goes idle.

A session sitting on an unanswered question does not keep your Mac awake, no matter what background writes land in its transcript. If it is waiting on you, it isn’t working.

Background subagents (Task-tool agents) hold the Mac awake while they work and release when they finish.

How it’s implemented

  • ProcessInfo.beginActivity only. No IOKit, no caffeinate subprocess. The assertion shows up in pmset -g assertions with a BlackFlare reason string.
  • The toggle is UserDefaults only — it never writes settings.json and never installs a hook.
  • Terminal and IDE sessions both release straight from the transcript: turn end, pending question, and interrupt are all detected there. No hook and no notification toggle is required for keep-awake to work.

Honest limitations

  • A Codex session paused on an approval prompt stays held until its next task_complete — the rollout carries no waiting signal to release on.
  • Closing the lid still sleeps. Clamshell mode wins; a power assertion does not override it.
  • Launching BlackFlare mid-session latches onto that session at its next assistant output, not retroactively.
  • A session killed without emitting any terminal event releases via a 15-minute staleness safety net.