
A prompt gets me one answer, and only while I am there to ask. A loop is the same instruction on a schedule, with a place to report and a rule about what it must read before it acts. Most of what I used to type into agents by hand now runs as loops, and the machines no longer depend on my attention.
From one paragraph to a schedule
I used to run agents the slow way. I sat in a terminal, typed a prompt into one pane, waited, and typed into the next. I was the scheduler. Recently I spoke to someone who was running many agents and prompting each one by hand, and I recognized the habit.
There is an idea going around called nested loops: loops, and loops inside loops, so the machines maintain themselves and the agents do the boring work on a schedule. I took it literally. The first version was one typed paragraph, not a design document, listing what I was tired of doing by hand. Before anything was built, I had the agents research how other operators automate a machine end to end, to check that the idea was not a known bad one. The first batch shipped as nine skills in one pass and reached every machine the same day. This is what runs now.
- Every morning, a loop checks and updates the packages we depend on.
- Every 30 minutes, a loop searches the security feeds for supply-chain attacks.
- Every 15 minutes, a loop finds stale processes overloading the server and kills or fixes them.
- Every 15 minutes, another loop finds dead terminal sessions and recreates them.
- A credential-leak scan, a cost report and a disk sweep run as loops too.
The dead-session loop exists because of one afternoon. I asked an agent to redo a couple of terminal sessions, and it killed more than I meant. What came back was one line: you killed them all. The repair took three attempts. A plain instruction left sessions dead. A skill made of ad hoc steps had to be written fresh every time. The third version is a real command-line tool that restores sessions from a snapshot the same way every time. Its first real test brought back 21 sessions in one pass.
Why does the protective loop run first?
Two details matter more than the list. The first is order. The loop that updates dependencies runs after the loop that watches for supply-chain attacks, never before. An update that does not first check for active attacks is how the attack gets installed, on schedule, looking exactly like routine maintenance. We learned this from an incident of our own, when a package we depend on was hijacked at the registry. It cost an afternoon. With an unguarded update loop already running it would have cost more, because a compromised package does not announce itself. It waits for the next automated bump.
The loop that protects you must gate the loop that changes you.
Where the messages live enforces the rule. The three security loops, a supply-chain watch, a credential scan and a dependency audit, post every run into a shared space. The update agents must read it before they touch a lockfile.
The second detail is judgment. The watch loop’s instructions tell it that it is a security analyst, not a script. It escalates only when two facts line up: we install the package, and it is being actively exploited. Everything else is noted, because a security channel that forwards every headline teaches everyone downstream to stop reading it. None of the loops is a rigid script; the instruction was that the agent does the actual work itself. The schedule is fixed. The judgment inside it is not.
Why does a quiet loop look like a dead one?
Every loop posts one digest per run, including when there was nothing to do. A healthy run posts a digest and a failed run posts nothing, so a loop that speaks only when it has news looks exactly like a dead one. For roughly twenty hours, every scheduled maintenance loop for one product died before doing any work, and it looked like a quiet day. I tell that story in Agent self-reports are not evidence.
So silence is not a valid status. A loop that ran and posted nothing is a bug. Under that sits a cheaper check: canary loops, whose only job is to fire at an exact minute and reply with an exact string. They exist because of a schedule that looked healthy in every visible way, ticking on time, while every run it fired failed underneath, seven times in about half an hour. If the canary is late, the automation layer is broken, and everything above it is reporting on faith.
Loops also catch the loops nobody meant to write. One of our background services restarted more than 85,000 times before anyone noticed. It failed the moment it started, and the process manager quietly tried again. A restart is not an error until you count them. The fix was to make it fail loudly.
Loops inside loops
Loops are also how I manage. An agent left alone for an hour drifts. The cure is not a smarter agent but a duller, more persistent reminder. I set a one-minute loop whose whole prompt is the standing instruction: keep testing, keep fixing, never cheat, never take shortcuts. It became a skill of its own. Given a piece of work, it writes the tasks and starts that loop, which does not accept done until the work is tested, in a browser if it is a frontend change.
The harness my agents run in carries a related line. The easiest way for an agent to look finished is to narrow the goal until whatever got done counts. So the harness says it plainly: do not redefine success around a smaller or easier task.
Put together, the loops check each other. The watch loop gates the update loop. The canary sits under the scheduler. A daily job reads its predecessor’s log before it starts. Once it found only a header, concluded the earlier run had died, fell back two days to the last good baseline and processed the backlog in one pass. One agent per machine owns loop oversight as a standing duty: which loops exist, when each last ran, what looks stale, posted as exactly one digest. My follow-up to that agent was whether the message had been posted, and what its id was.
None of this lives only in a schedule file. The loop system is a project in our task tracker, and each skill writes to the memory store after it runs. Its tools that change anything are off by default behind an exact confirmation string, one of the limits I describe in Hard limits are governance. Most loops run on cheap models, as in Model routing in practice, and the expensive one is called only when a cheap one escalates. A loop bill should read like a utility bill.
Packages now update themselves, behind the attack watch. Dead sessions come back on their own. I read digests over coffee instead of typing the same prompt forty times a day.


