launchd vs Docker for Always-On Claude Code Bots on a Mac
Seventeen bots run as one Python process under launchd on a Mac. No Docker, no cloud. Why, the four traps we hit, and what moving machines taught us.
When people hear “17 bots in production” they picture containers, a cloud box, possibly a small Kubernetes cluster humming in a data centre. Ours is one Python process on a Mac, kept alive by launchd, in a folder called bots. I have been asked, gently, whether that counts as production. It has run every night for a year, so I’ve decided it does. This post is why, the four things that went wrong, and when I’d reach for Docker instead.

Why not Docker
The bots call the Claude Code CLI, which is logged in to a subscription on the machine. That login lives in the user’s keychain and config. Putting the CLI in a container means either baking credentials into an image (no) or mounting the user’s home directory into the container (also no, and at that point the container is isolating you from nothing except your own understanding of what’s running).
Docker also adds a layer the rest of my team can’t see into. If a bot stops, I want “is the process running?” to be answerable by anyone who can open Activity Monitor and squint.
So: one process, launchd, a plain folder. It’s not impressive. It’s visible.
The shape
app.pystarts every bot in one process. One, not seventeen, because they share the Slack connection, the config and the log, and because seventeen processes is seventeen things to forget.- A
launchdplist withKeepAliveset, so if the process dies it comes straight back, slightly embarrassed. - Logs go to one file that the process itself rotates by copy-and-truncate, because
launchdholds the file handle and will happily keep writing to a file you’ve renamed. - A single config file tells every bot which machine it’s on.


This is the other half of “always-on on a Mac”: the Mac stays at the office, plugged in, lid closed, and I talk to it from the living-room floor. Not a glamorous ops centre. It doesn’t need to be.
The four traps
1. launchd doesn’t have your PATH. A bot that worked from the terminal failed as a service because it couldn’t find claude. Every external command is now called by full path, and the plist sets PATH explicitly. Never, ever call the bare name from code. Tattoo it somewhere.
2. The machine must not sleep. Obvious, and still the cause of a week of missing reports. Sleep is off on power. When a bot goes quiet, the first thing I check is the power log, not the bot, because the bot is usually fine and the Mac is usually napping.
3. Log flooding hides real errors. An intermittent DNS failure once produced a stack trace on every poll until most of the log was one error. Resolver failures now back off and log one line; how we untangled that morning is in the error watcher post.
4. Token renewal is a job, not a memory. The CLI’s login expires. A renewal script runs on a schedule and alerts if it fails, because “every bot stopped at the same moment” is exactly what an expired login looks like and exactly the kind of thing I’d otherwise discover on a Monday.
Moving it to another Mac
The plain-folder setup paid off in October, when the whole thing moved to a shared office Mac in an afternoon. The one rule worth repeating here: take the old machine down first, because two copies polling the same chat API and writing the same sheet is a fight, not redundancy. The full checklist, the timings and the time we installed onto the wrong Mac are in migrating bots to a new Mac.

When Docker would be right
If the bots called an API with a key instead of a logged-in CLI, or if more than one person deployed them, a container would earn its keep. For one operator, one machine and a subscription login, it’s a layer that only hides things, and I have enough of those.
One line from me
One process, one Mac, full paths everywhere. Not glamorous, and that’s the point.
What it costs to keep all seventeen running, model calls included, is in what the bots cost.
More on this topic: the Claude Code in business guide, with every post in reading order.