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?
Closing my MacBook used to kill whatever I had left running: a build, a download, sometimes an agent halfway through a task. I made Clamshell to fix that. The lid shuts, the screen goes dark, and the work carries on. No monitor, sudo, or admin setup.