I keep my MacBook docked a lot, but I don’t always want to sit at the desk to keep coding. When I’m away from home, I use my phone to work with ChatGPT, Claude Code, and desktop AI apps on the Mac. I also use my agentic browser, BrowserAI DUO, to handle browser work and tasks. The MacBook at home is still the machine doing the work.
The problem was sleep. If the Mac sat idle long enough, it would go to sleep and interrupt what I was doing remotely. Claude Code would time out, and I’d lose the session. Being away from the keyboard didn’t mean I was done working, but the machine treated it that way.
That’s why I built Vibesomnia, an open-source native macOS keep-awake utility built with Swift and SwiftUI. I wanted to close the lid, work from my phone while doing other things, and keep my AI tools coding and controlling the computer. The same need comes up at night: start a task before bed, shut the lid, and keep idle sleep from cutting the run short.
You can sleep. Your AI doesn’t have to.
A session with an end
The alpha supports manual, timed, indefinite, and selected-GUI-app sessions. I can set a duration or have a session end when a chosen app closes. The dashboard and menu bar expose the controls, and battery protection can refuse or end a session at a configurable threshold.
Display sleep is independent of keeping the machine awake. I want the workspace available from my phone with the screen off and the lid closed, whether I’m out of the house or leaving a task running before bed.
App awareness has a useful boundary. Detecting Claude Desktop, ChatGPT, or Codex tells the utility that an application exists or is running. It does not tell it whether a model is authenticated, an agent is making progress, or a task has finished.
Closing the lid changes the problem
Ordinary keep-awake sessions use native IOKit power assertions. Closed-lid mode additionally starts a small administrator-authorized helper called VibesomniaPowerGuard. It records ownership of a system sleep override and watches the app’s identity and heartbeat lease so it can restore sleep when the session ends or the app disappears.
This is the part of the project where cleanup matters as much as activation. The guard has a fixed purpose, separate from user scripts, with an explicit recovery path if its own process fails. While closed-lid mode is active, system sleep—including manual sleep requests—is disabled. Ending the session restores normal behavior. An awake Mac also needs ventilation; it belongs on a suitable surface, not in a bag.
My phone is the control surface
ChatGPT, Claude Code, the desktop apps, and BrowserAI DUO are the tools I want to keep using remotely. Vibesomnia keeps the Mac awake underneath that workflow. My existing remote-access tools provide the connection from my phone; Vibesomnia doesn’t supply screen sharing or guarantee that an agent or network connection will never fail. It addresses the interruption that prompted the project: the host going to sleep.
The bundled CLI can start, stop, and inspect sessions through an existing same-user SSH connection. It keeps the host reachable; screen sharing and terminal access remain the job of existing remote tools. Starting closed-lid mode still requires administrator interaction on the Mac.
For personal workflow steps, there is an add-on editor with version-specific approval and optional session hooks. Scripts run as the user, with time and output limits. They are trusted local code, so importing a script and approving it are separate actions.
Public alpha, with the checklist visible
The repository includes source, tests, setup documentation, and an experimental universal DMG. The app is ad-hoc signed, and the installer is unsigned and not notarized. Documented local checks cover activation, stopping, and restoration after simulated app exit; physical lid cycles, power transitions, remote reconnection, and clean-Mac installation still need acceptance testing.
I’m sharing the implementation while that work continues. The project page gives an overview, and the hardware checklist shows what remains to verify.