I kept seeing `caffeinate` suggested under long-running agent threads, so the short version is: it prevents idle sleep. Closing the lid uses a different macOS sleep path, which is why a build or agent can still stop the second you shut the MacBook.
If you only need to lock the screen or walk away with the lid open, `caffeinate -i` is enough. For closed-lid work, you need something that changes the lid behavior and, just as importantly, restores it afterwards. That distinction is what pushed me to build Clamshell.
Curious how other people handle long local agent jobs: leave the lid cracked, use cloud agents, or change the Mac s sleep behavior?
Hi everyone, I'm Matyas, the maker of Clamshell.
When Clamshell launched here in August, it did one thing: keep a MacBook awake with the lid closed, without an external display. In the comments, you asked for a way to let a job finish and then let the Mac sleep, and for Claude Code and Codex support.
Clamshell 2.0 adds both, as part of 30+ optional modules. Some of them:
Agent Status shows what each Claude Code and Codex session is doing, from the menu bar.
Fan Boost spins the fans up when your closed Mac works hard, to help keep it cool with the lid shut.
Finish Work, Then Sleep lets your agents finish, then lets the Mac sleep.
Sleep Until Reset sleeps through a usage limit and wakes the Mac when it resets.
Battery Budget lets a closed session use up to a set share of battery, then sleeps.
The core still needs no external display, sudo or admin password. A few modules use a helper you approve once. It's a 7-day free trial, then $9.99 once, with every module included, and v1 owners get 2.0 for free.
Which module would you want next? And what still makes you keep the lid open?