CARLOS LASTRES CONTACT

What to Decide Before Your Team Runs Coding Agents Overnight

Hand an agent a task before you leave, check the result in the morning. The approach is right, but sometimes nothing moved overnight. The cause is rarely the model. Usually the Mac went to sleep. Four things an unattended run needs, and what makes a tool easy to approve internally.

More companies are starting to use coding agents like Claude Code and Codex in their development teams. Once people get comfortable, the next question is always the same: can we leave them running overnight?

Hand over a long task before you leave, check the result in the morning. I think that is the right way to work. The value of an agent is that the work moves while people are doing something else.

In practice, though, sometimes nothing moved by morning. The log shows the run stopped halfway. The cause is not the model. In most cases the Mac simply went to sleep.

Here is what to settle before running agents unattended, in order.

First: the machine has to stay awake

macOS sleeps after a period without input. An agent in the middle of a run stops with it.

The usual fix is to turn sleep off. I do not recommend it. The laptop then stays awake all night, long after the work has ended, which is bad for the battery and for heat, and hard to justify to whoever owns information security.

What you need is a machine that stays awake while work is happening and goes back to normal when it ends. A timer is one option, but agent run times are unpredictable. Some finish in minutes. Some take an hour.

Second: it has to stop safely

If nobody is watching, decide in advance how it stops.

With a laptop, the worst case is one held awake inside a bag. When the battery falls below a set level, or the machine gets too hot, it should stop the work and rest. That decision should belong to the tool, not to a person who is asleep.

Third: you can see it from outside

Not knowing anything until morning is more stressful than people expect. Sometimes the run was waiting on a question the whole night.

Being able to check from your phone which sessions are working and which have stopped changes how comfortable unattended runs feel.

Fourth: it has to pass internal approval

For Japanese companies, I think this is where most of the time goes.

Tools around an agent run right next to the code. That makes the conditions for easy approval quite clear.

No network. It sends nothing to an outside server. No account. No analytics.

It does not read content. No access to file contents or prompts.

It does one thing. Fewer features means less to review.

A clear distribution channel. If it comes through the Mac App Store and runs inside the sandbox, the IT department's review gets much easier.

The tool I built

I built Nightwatch to solve this for myself. It is free on the Mac App Store.

When Claude Code, Codex or Kimi starts working, it keeps the Mac awake on its own, and lets go after they have been quiet for a few minutes. The only thing it looks at is when each tool's session journal was last written. It never opens them. The screen still goes dark as usual, and only the work continues.

It has limits on battery level and temperature. If either is hit, it ends the session and tells you why. There is no network code, and the App Store privacy label reads Data Not Collected in every category.

The App Store version runs in the sandbox, so it cannot keep the Mac awake with the lid closed. For that there is a direct download on the website. It uses a small helper you approve once with an admin password, so on a company Mac, check your IT policy first. My view is that company issued Macs should start with the App Store version.

To check on things from outside, I use Ground Control from the same family. Every Claude Code session on the Mac shows up as a small character in the iPhone app. Nightwatch works perfectly well on its own.

The setup matters more than the model

What separates teams that get value from agents is less which model they pick and more how they design the operation around it. The machine stays awake, it stops safely, it is visible from outside, and it can be approved internally. With those four in place, the night becomes development time.

If your team is about to start running agents, three things let me be concrete in the first conversation. Which agents you use or are considering. Whether your development Macs are company issued or personal. And which step takes longest when a new tool needs internal approval.

If you do not know all three, that is fine. Sorting that out is where we start.

READ NEXT

← All insights