Smart NoSleep keeps your Mac awake — even lid closed — while Claude Code, Codex, or any AI agent works, then lets it sleep when they finish. Free and open-source.
Replies
Best
Maker
📌
Hi PH
My laptop hasn't fully closed in three months. I walk around holding it like a waiter holds a tray — elevators, toilet, everywhere — because closing the lid kills my AI agent mid-task, and I wasn't going to lose a 20-minute run to gravity.
So I built NoSleep. Tiny menu-bar app: toggle on, shut the lid, the agent keeps going.
Then it bit me. Left it on overnight and it held my Mac awake on battery until it died at 0%. Turns out pmset disablesleep — the only thing that survives a closed lid — also switches off macOS's own low-battery sleep. So v1.1.11 added a Smart mode: it watches whether agents are actually doing anything, lets the Mac sleep when they're done, and backs off before the battery's gone.
Free, open source (MIT), no account, no telemetry. Universal binary (Apple Silicon + Intel). It's unsigned — I'm not paying Apple $99/yr for a hobby project — so there's a one-line xattr step on first open; the site walks you through it.
Would love to hear what breaks. Happy to answer anything about how it works under the hood.
Replies