I Built an AI Agent That Works While I Sleep

I woke up last Tuesday to 47 GitHub notifications. Pull requests opened, commits pushed, content drafted. All between 1 AM and 5 AM. I didn't write any of it.

His name is Chris. Yes, I named my AI agent after myself. There's something oddly satisfying about waking up to commits from "Chris" and knowing it was technically you, but also not you at all. My friends think it's narcissistic. I think it's funny.

Chris is an AI agent running on a Mac Mini in my flat, powered by OpenClaw. He runs 24 hours a day, 7 days a week. He writes code, drafts content, monitors my repositories, and files reports. While I sleep.

This isn't a tutorial on how to build one. There are plenty of those. This is about what it's actually like to live with an AI agent that never stops working.

The morning routine now includes code review

My mornings used to start with coffee and email. Now they start with coffee and git log.

I open my laptop and there's a diff waiting. Sometimes it's a blog post. Sometimes it's a PR fixing a dependency update across three repos. Sometimes it's a content draft for one of my apps. The timestamp says 3:17 AM.

The first few times, it felt genuinely strange. Like coming downstairs and finding someone has reorganised your kitchen. Everything is in a reasonable place. But you didn't do it. And you need to check they haven't put the knives in the wrong drawer.

How the system works

Chris runs on macOS using launchd, which is Apple's built-in scheduling system. Every 10 minutes, a heartbeat fires. The agent wakes up, checks for pending tasks, looks at its backlog, and decides what to work on.

There's a watchdog that runs every 30 minutes to make sure the agent is still alive. If the heartbeat stops, the watchdog restarts it. If the watchdog fails, well, I notice in the morning when there are no notifications.

Every night at 10 PM, a daily backup runs. Git commits all workspace changes, writes a snapshot report, consolidates memory from the day's sessions, and syncs the task list. This is non-negotiable. If the backup doesn't run, something is wrong.

The agent keeps a worklog with timestamps. Every task gets a START and DONE entry with duration. I can see exactly what it did, when, and how long it took. It's more disciplined about time tracking than I am.

The 140 blog posts incident

One night I left a task in the backlog to "generate blog post drafts." I didn't specify how many. I woke up to 140 draft files in the content directory.

They weren't bad, exactly. Some were decent. But 140 of anything is useless if you can't review it. I spent an hour skimming titles before giving up. Most got deleted.

This taught me something important about working with an autonomous agent. The bottleneck is never production. It's review. An AI can produce content, code, and research faster than any human can evaluate it. If you don't design constraints into the system, you drown in output.

Now I set explicit limits. Draft three posts, not thirty. Open one PR per repo, not five. The agent works within those boundaries.

Merge conflicts at 3 AM

Here's something I didn't anticipate. When you have multiple sub-agents working in parallel, they can create merge conflicts with each other.

Chris spawns sub-agents for different tasks. One might be updating dependencies across repos while another is writing a new feature. They both touch the same config file. Neither knows about the other's changes. The second one to push gets a conflict.

The agent handles some of these automatically. Simple conflicts get resolved. But complex ones get flagged for me. I've come in to morning messages like "merge conflict in package.json between dependency update and feature branch, needs manual resolution."

It's a problem I never expected to have. My own AI agents fighting each other over git history at 3 in the morning.

What actually works well

Repository monitoring is the clear winner. Chris scans all my GitHub repos for open PRs, failing CI, dependency updates, and security alerts. Every morning I get a summary. Things that would sit unnoticed for weeks get caught the same day.

Repetitive maintenance tasks are another strong area. Updating boilerplate across projects, running lint checks, formatting code, syncing configuration files. The kind of work that's important but tedious. Perfect for an agent.

Research is surprisingly good too. I can drop a question into the task list like "analyse what keywords SYM competitors are ranking for" and wake up to a structured report with data, sources, and recommendations. It's not always perfect, but it's a solid first pass that saves me hours.

What doesn't work yet

Creative content is hit or miss. The agent can draft a blog post, but it needs heavy editing to sound like me. It tends towards a polished, corporate tone that isn't how I write. Every draft goes through review before anything gets published.

Complex coding tasks still need human judgement. The agent can fix a bug or add a small feature, but architectural decisions, API design, anything that requires understanding the broader context of why something exists, that's still on me.

The content pipeline is honestly a mess right now. I have over 100 drafted social media posts sitting in a queue. Zero approved. The agent produces faster than I can review, and I haven't built a good enough system for batch review. The production side is solved. The human side is the bottleneck.

The daily backup ritual

Every night at 10 PM, everything gets committed to git. The workspace state, task progress, memory logs, daily reports. This is the safety net.

If the agent crashes, if the Mac Mini loses power, if something corrupts, I can recover from the last backup. Every session starts by reading the previous day's memory file and picking up where things left off.

It sounds simple but it took a while to get right. The first version would commit dozens of times a day, mostly status updates and log entries. Kenny was seeing 56 auto-commits in a single day. That's noise, not persistence. Now it only commits meaningful work: actual code changes, content drafts, research reports. Status updates stay in memory until the nightly backup.

The real lesson

Building the agent was the easy part. The OpenClaw framework handles most of the heavy lifting. You define skills, set up scheduling, point it at your repos, and it starts working.

The hard part is everything around it. Designing task boundaries so the agent doesn't go rogue on your backlog. Setting up review workflows so you can actually process the output. Building the monitoring to know when something breaks at 2 AM. Creating the memory system so context survives across sessions.

The agent itself is maybe 20% of the work. The system around it is the other 80%.

I think about it like hiring. Finding a capable person is one thing. Building the processes, documentation, and feedback loops so they can do good work autonomously, that's the real challenge. The agent is only as good as the system it operates in.

Would I recommend it?

If you're a solo developer managing multiple projects, yes. The overnight maintenance alone justifies it. Waking up to a clean summary of your repo health, with PRs already opened for routine fixes, is genuinely useful.

But go in with realistic expectations. This isn't a replacement for a co-founder or a team. It's closer to having a very diligent, slightly literal assistant who works unusual hours. You still need to review everything. You still make the decisions. You just spend less time on the tasks that don't require human judgement.

The agent works while I sleep. But I still have to think while I'm awake.