Keep Mac awake
Off by default — with one exception: the first time BlackFlare runs with an active license, the toggle switches on by itself, so long sessions are protected without a trip to Settings. Your own choice always wins: once you set the toggle — on or off — it stays where you left it.
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, and while sleep is being held off a small green coffee cup joins the model and mode chips at the top of the menu — it disappears the moment normal sleep is restored.
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.
Keep working while the lid is closed
Normally, closing the lid sleeps the Mac — clamshell mode wins over a power assertion. Keep working while the lid is closed is an opt-in option under Keep Mac Awake that changes this: while a Claude or Codex session is running, your Mac keeps working after you close the lid, no external display required.
Setup is a one-time approval of a small helper in System Settings → Login Items — BlackFlare takes you there and picks up the moment you allow it. A Remove Helper… button uninstalls it cleanly whenever you want.
You choose when it applies — while plugged in, on battery, or both (both on by default). On battery, a configurable floor (default 10%, anywhere from 5% to 50%) pauses the hold and notifies you before the charge runs low; it resumes when you plug in or the battery recovers a few points past the floor.
Two things to expect:
- The screen still goes dark the instant the lid shuts — only the machine keeps working, exactly as if the display had slept on its own. This applies even with “Also keep the display awake” on: that toggle keeps the screen lit while the lid is open, where you can actually see it.
- Normal sleep always comes back. The hold releases the moment your sessions finish, and every exit path — quitting, a crash, removing the app, even a forced shutdown — restores normal sleep on its own.
How it’s implemented
ProcessInfo.beginActivityonly. No IOKit, nocaffeinatesubprocess. The assertion shows up inpmset -g assertionswith a BlackFlare reason string.- The lid-closed option is the one exception: it uses a single-purpose helper
daemon (installed through the System Settings approval above) that flips the
same flag as
pmset disablesleepwhile engaged. While the option is actively holding, BlackFlare owns that flag; what it never does is clear a flag you set yourself — if a restart or crash recovery findsdisablesleepalready on from your ownpmsetconfig, it leaves it alone. - The toggle is UserDefaults only — it never writes
settings.jsonand 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.