Nightwatch Keeps Your Mac Awake Only While Your Agents Work

The longest part of my working day now happens when I am not at the desk.

I give Claude Code a task that will take a while, or I start a Codex run on a refactor, and I go make dinner. That is the whole point of an agent. It works while you do something else.

And then the Mac decides nobody is around and goes to sleep. The agent stops mid turn. When I come back, nothing moved. The work I thought was happening for the last hour never happened.

So I built Nightwatch. It is a small menu bar app that keeps your Mac awake while your agents are working, and lets go once they stop. It is free on the Mac App Store.

The old answer was always on

Keep awake apps are not new. There are plenty of them, and most work the same way: you flip a switch and the Mac stays up until you flip it back.

That was fine when the thing keeping you busy was a download or a presentation. It is a bad fit for agents. You do not know how long a run will take. Sometimes it finishes in four minutes, sometimes it keeps going for an hour because it found three more things to fix. If you set a timer, you guess wrong. If you leave it on indefinitely, your laptop stays awake all night long after the work ended.

What I wanted was simple to say: stay awake while something is working, and go back to normal when it is done, without me having to remember any of it.

It watches the fleet

Nightwatch has a fleet trigger. Turn it on and it starts a session by itself the moment Claude Code, Codex or Kimi begins a turn. When they have been quiet for a few minutes, it ends the session and the Mac is free to sleep again.

The way it knows is deliberately boring. Every one of those tools writes a session journal as it works. Nightwatch checks only when each journal was last written. It never opens them and never reads what is inside. Your code and your prompts are none of its business.

You can also run it by hand. A session for fifteen minutes, a few hours, until nine in the morning, or indefinitely. The countdown sits in the menu bar next to a small pixel creature, so you always know what is holding your machine up.

There are other triggers too: while the Mac is on power, while the CPU is busy, or between two times of day. You can combine them, or leave them all off.

The screen can go dark

This is the part people assume wrong. Keeping the Mac awake does not mean keeping the display on.

Nightwatch holds the machine up, not the screen. The display dims and turns off like it always would. The agent keeps working behind it. You save the battery and the panel, and you do not come back to a glowing laptop at two in the morning.

A watch with limits

I thought hard about the one way an app like this can ruin your day. You start a session, close the laptop into a bag, forget, and pull out something hot and empty hours later.

So Nightwatch has two guards. If the battery falls below a level you choose, it ends the session. If macOS reports that the Mac is critically hot, it ends the session. Either way it tells you which guard stepped in, so you are never left guessing why it stopped.

I would rather have a keep awake app that gives up too early than one that never gives up.

Nothing leaves your Mac

There is no account, no sign in, no server and no analytics. The App Store version has no network code at all. The privacy label says Data Not Collected in every category, and that is literally true because there is nothing in the app that could collect it.

I care about this for a practical reason. The people running agents overnight are usually running them on real codebases, often at work. A tool that sits next to that work should be easy to trust, and the simplest way to earn that is to have no way of sending anything anywhere.

Two ways to get it

The Mac App Store version is sandboxed. It does everything above with the lid open.

If you want the Mac to keep working with the lid closed, on battery, with nothing plugged in, there is a direct download on the website. macOS treats a closing lid as an order to sleep, and an ordinary app cannot argue with that. The direct download installs a small helper that you approve once with your admin password, and it hands the setting back when the session ends. It is signed and notarized by Apple. Same app, same price, which is free.

Both need macOS 14 Sonoma or later.

Part of Ground Control

Nightwatch started as a spin off of Ground Control, the app that puts every Claude Code session on your Mac onto your phone as a little pixel pilot. I wrote about how I built Ground Control earlier.

The two fit together well. You start a long run, walk away, and check on it from your phone with Ground Control Chat. Nightwatch is the reason there is still something to check on. But it works perfectly well on its own, and you do not need one to use the other.

Small on purpose

The whole app is about 1.3 MB. It does one thing. I think that is exactly the right size for a tool you want to forget about.

Agents changed what a working day looks like. More of the work happens while you are somewhere else, and the machine has to be there for it. Nightwatch is the smallest thing I could build that makes that reliable.

Get it on the Mac App Store, or grab the closed lid version from groundcontrol.chat/nightwatch.

← All posts