Keep the Mac awake while your agents work
You started a 40-minute run, walked away, and came back to the login window and a stalled agent. The fix has three parts, and most tools only do two.
Part one: system sleep
caffeinate -i (or a power assertion like PreventUserIdleSystemSleep) keeps the machine from idle-sleeping. Every keep-awake utility does this.
Part two: display sleep
A separate assertion (PreventUserIdleDisplaySleep) keeps the screen on. Most tools do this too.
Part three: the one everyone forgets
The screen-saver / lock-screen idle timer is a third mechanism that power assertions do not touch. With “require password after screen saver” enabled, your Mac can lock over a perfectly awake session. The fix is periodically declaring user activity (IOPMAssertionDeclareUserActivity) — which resets the lock timer the way moving the mouse would.
What NapCat does
- Holds all three — system, display, and the activity heartbeat — during a fake nap, and automatically whenever a watched agent is working.
- Lets go the moment the last agent stops, so your normal lock behavior returns.
- Optional battery guard: release below 15% unplugged, so a forgotten overnight run can’t drain the Mac flat.
NapCat does all of this from your Mac’s notch — for five dollars, once.
Download — free 2-day trial