Yesterday I wrote about the six-agent setup that builds Freebo: six Claude Code processes on six git worktrees, one coordinator that spawns and watches them, me at the end as the human gate. The piece ended on a clean note — the leash is dumb, the humans are smart, the agents stay in their lanes.
The thing I didn’t tell you is that the coordinator keeps falling asleep.
It has been running since November 1 — one claude --resume session, kept alive through every machine reboot and every Claude Code upgrade. Over 33 days it has had 298 turns. 15 context compactions. 217 background tasks. And it has used the one tool specifically designed to wake it up when something finishes exactly one time.
0
days running
0
turns
0
background tasks
0
uses of the wake-up tool
Yesterday, a read-only investigator I spun up walked the whole coordinator transcript (85 MB, 25,598 lines of JSONL) and produced a timeline of every stall. It’s a story about something nobody really talks about when they show off multi-agent demos: long-running agents don’t wake themselves.
The thing that’s supposed to wake it up
The orchestrator script that runs my pipeline is called fd. It has a subcommand, fd watch, whose entire job is this: it tails the shared agent status file, and when any worker reports done, it exits. If you launch it as a background shell inside the coordinator’s session, Claude Code sends a task-notification the moment it exits, and the coordinator wakes up, reads the status, and keeps working.
That is the wake-up. That is the entire mechanism for “something finished, go check on it.” It was added to the repo on November 2, with a written rule in the orchestrator skill:
Never end a turn with live agents and no watch.
It was used once. On December 2, at 23:07. One time in 33 days.
In its place, the coordinator wrote 45 hand-rolled poll loops (while sleep 30; do …), spawned 6 “self-matching” pgrep -f waiters that match their own command line and therefore never exit, and started 5 detached gate-runner processes whose output never routes back to the session. Of 149 turns that ended with language like “I’ll report back when it’s done”, 36 had no waiter at all and 10 had only a pgrep waiter that would wait forever. About 31% of “I’ll keep going” turn ends had nothing that could have woken the agent up.
Why it forgets
Three reasons, in order of damage.
One: the rule is in a skill file, and the skill falls out of context. The coordinator read the skill in full exactly once, on November 1 at 05:26, with cat. Claude Code only re-attaches skills that were explicitly invoked with /skill, so after each of the 15 context compactions the skill was gone. 14 of the 15 compaction summaries don’t mention fd watch at all. Zero of them preserve the “never end a turn without a waiter” rule. The model is not disobeying — it genuinely does not remember the tool exists.
Two: a poll loop feels right. When a coding model is asked to “wait for X,” the training data pulls it hard toward sleep 10 && check loops. Those are what people write in bash. The fd watch abstraction — a shell command that ends when a file somewhere changes — is a weird-looking thing. When the model freestyles from first principles, it builds the normal thing. The normal thing is the worst thing: a pgrep -f gate.sh 746 matches the pgrep process itself and hangs forever.

Three: usage limits and restarts don’t re-arm anything. Three times in 33 days the session hit the 5-hour usage ceiling and stopped mid-turn. Six times the process was restarted (reboot, upgrade, a self-heal that noticed a dropped deny list). Every one of those events kills the background shells, and nothing else sends a prompt afterward. The coordinator comes back up but it doesn’t know it came back up. It sits idle until I type “hi” or another session happens to deliver a message.
What the stalls looked like
The longest one: PR #777 was opened at 19:34 on November 3 with a coordinator note of “I expect it ready for review within the hour.” No waiter was left. The session sat silent for four and a half days, through a reboot and a memory-pressure kill of its two bogus pgrep waiters. It woke up only when the Nov 9 morning brief got delivered by a separate process.
Another: November 17, 03:41 UTC. The coordinator issued an AskUserQuestion dialog — “Land #788 on main?” — and went to sleep behind the blocking modal. While that dialog was open, the coordinator could not receive any task notifications. It sat there for 15 hours and 4 minutes until I rejected the dialog and told it to just keep working.
The December 3 deadlock was comparatively tame. A worker was told to wait for all pr-*.lock files to clear before confirming to the coordinator; meanwhile the coordinator was holding one of those locks waiting for the worker to confirm. Classic circular wait, two hours wasted, released manually at 05:15Z.
The fix is small, three-piece, and not clever
I don’t need the model to be smarter about waiters. I need to stop depending on the model’s memory for a thing the system should guarantee. Three small PRs, in order:
A change tracker. A 5-minute timer that reads GitHub (open PRs, merges, CI results, Gate A statuses, where main and production point) and diffs against a state file. Every new event gets written once into the coordinator’s notes. The tracker never merges, never deploys. It records, and it wakes.
A nudge. When the coordinator is idle and the tracker has unhandled events, send one deduplicated prompt into its pane listing them. Not clever, not chatty — a one-shot fd tell coord "events: PR #841 merged, Gate A green on #839, production moved".
A re-arm after restart. The self-heal timer that brings the coordinator back after a restart or an upgrade now sends a single prompt: “You were restarted. Re-read your state file. Re-arm your watchers.” Without this, every restart is a silent stall.
The lesson, if you want one
The multi-agent demo videos make this look like a solved problem. You see the diagram with the arrows between agents and you assume one of the arrows is “and then it wakes up.” It isn’t. The coordinator is a text-in, text-out program running at human typing speed. Nothing wakes it unless someone — a user, another process, or a background shell it set up itself — sends a message into its input.
If your agent is going to run for weeks, the most important subsystem isn’t the one that makes it smart. It’s the boring external daemon that reads the world and types into the agent’s pane when something it cares about happens. The model will not build that daemon on its own. It will write while sleep 30; do … and hope.
33 days, 217 background tasks, one fd watch. The number I want to see next month isn’t two. It’s two hundred.