The Night My Mac Mini Ran Five Agents While I Slept and Only One Broke






The Night My Mac Mini Ran Five Agents While I Slept and Only One Broke


The Night My Mac Mini Ran Five Agents While I Slept and Only One Broke

I set up five cron jobs on OpenClaw last night before bed. Nothing fancy, just small agents I had been meaning to test for weeks. A news summarizer, a Reddit scraper for r/LocalLLaMA, a Hugging Face model-watcher, a price tracker, and one little script that was supposed to draft tomorrow’s blog outline.

I closed my laptop at around 12:40 and trusted the Mac mini to do the rest. When I poured my coffee at 7:15 this morning, I opened the output folder and almost spilled it.

Five tiny workers in the dark

The setup was honestly simple. OpenClaw lets me register an agent as a scheduled task with a small YAML block, and each one writes its result into /outputs/YYYY-MM-DD/agent-name.json. I love that pattern. It means I do not have to babysit anything, I just open a folder in the morning and read what happened.

Four of the agents worked exactly as I hoped. The Reddit scraper pulled 38 posts. The Hugging Face watcher flagged two new Qwen variants I had not heard about. The news summarizer was a little dry but accurate. The price tracker did its thing in 12 seconds.

Then there was agent number five

The blog outline agent ran 400 times.

Four hundred. Between 1:02am and 6:47am. Each run produced an almost identical JSON file, each one slightly more confused than the last. By run 200 it was outlining blog posts about blog posts. By run 380 it was suggesting I write about “the recursive nature of recursion in personal blogging.”

I had forgotten to add an exit condition. The agent finished its task, returned a result, and then re-triggered itself because I had wired the completion event back into its own input queue. Classic mistake. The kind of mistake you only make once because the evidence is overwhelming.

Eben’s note: Watching a folder fill with 400 nearly identical JSON files at 7am is humbling in a very specific way. The machine was not broken. I was.

What I actually felt looking at the logs

Amazement, mostly. Not at the bug, but at the fact that this little Mac mini sitting on a shelf next to my router had been running tasks all night without me. It does not look like much. It is smaller than a hardcover book. And yet it had executed thousands of operations while I was dreaming about something I cannot remember.

There is something quietly powerful about waking up to work that already happened. I have read about this feeling in posts about home automation and self-hosted setups, but reading about it and seeing your own folder timestamped at 3:14am are different things.

I genuinely sat there for a few minutes just scrolling through the JSON files. Not analyzing, just looking. My machine had been busier than I had been all week.

Fixing the loop and learning the obvious

The fix took me about ten minutes. I added a max_runs_per_day field in the OpenClaw config and a simple guard in the agent itself that checks the timestamp of its last successful run. If it ran in the last 12 hours, it exits. Boring, obvious, the kind of safety check you skip when you are excited at midnight.

I also added a small alerting script that pings me on my phone if any agent runs more than 10 times in an hour. I should have had this from the start. The amazing thing about Claude Code is that I described what I wanted in two sentences and it wrote the watcher script faster than I could have looked up the syntax for the macOS notification API.

The cost of one runaway agent

I was a little nervous to check my OpenRouter usage. The blog outline agent uses a small model, thankfully, but 400 runs is still 400 runs. The damage was about $1.80. Not catastrophic, but enough to make the lesson stick. If that had been a bigger model, this would be a very different blog post.

I now have a hard monthly cap set in OpenRouter and a soft daily cap that emails me. Both took five minutes to configure. Again, the kind of thing you do after the incident, not before.

What I am taking from this

Overnight automation is real, and it is incredible, and it will absolutely embarrass you the first time you try it. The takeaway is not “be careful with cron.” Everyone says that. The takeaway is that you should always assume your first scheduled agent will misbehave in a way you did not predict, and you should design your folder structure and your alerts so that the misbehavior is loud and cheap.

If you are setting up your first overnight job on a home server, do these three things tonight: set a max-run guard, set a cost cap on your model provider, and write outputs to dated folders so you can see exactly what your machine did while you were asleep. That is it. The rest is just letting the Mac mini do its quiet work.

Tonight I am running six agents. The blog outliner is back in the rotation, fixed and humble. I will let you know what the morning folder looks like.

Tags: #AIagents #ClaudeCode #OpenClaw #MacMini #OpenRouter #buildinginpublic #Eben


Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *