Late October. I had Claude Code on long jobs, the kind where you start it and go make lunch.
I kept coming back to a sleeping Mac and a job that had stopped halfway.
So I went through the Mac's own sleep log to see how bad it was. 86 sleeps in one week. Somewhere between 15 and 23 of them landed in the middle of a run.
I run long Claude Code jobs on a MacBook. In one week in October it went to sleep 86 times, and 15 to 23 of those were in the middle of a run.
So I started reading the sleep logs, and found two things I didn't know.
macOS only asks "the lid is closed, should I sleep?" when the lid closes, the charger changes or a display is unplugged. If sleep was blocked at that moment, nothing checks again later. The Mac just waits for normal idle sleep, and any app can block that.
In my case the app was Apple Books, of all things. It kept the Mac awake for three and a half hours with the lid shut.
Night Crew is a Mac menu bar app for people who run coding agents. It keeps your Mac awake only while Claude Code, Codex, Cursor, Gemini CLI or Antigravity is working, and lets it sleep about a minute after the last one stops. New in 1.2: turn on a folder, lock the Mac, close the lid and leave. The Claude app on your phone can start work in that folder, on your Mac, with your files. No relay, no open port, no account. Battery and heat guards are on by default.