The runner can take an idea to merged code in the product. So why not in itself? For a while we let it run stories that changed the runner. It went wrong in the most instructive way, and it ended with the decision that has shaped the most of the architecture since: the runner never changes itself.
At the time, the runner started with dotnet run on every call. That is convenient, because you always run the code that is in the source. It is also the problem.
The runner's loop, process A, runs from the runner's build folder. It starts a session, process B. When the session has finished its phase, it calls the runner to hand over: process C, another dotnet run of the same project against the same build folder. If the story has changed the runner's code, MSBuild wants to build again. But the DLL is locked, because A is running from it. A waits for B, B waits for C, and C waits for a file A holds.
It showed up as the error MSB3027, copy attempts that were retried, MSBuild processes that hung, and finally deadlock. The locks on stories made it worse. They were tied to process ids, so a run started inside another saw "locked by A" while A was waiting for its own session. One task hung for over 40 minutes.
The hangs could be seen. The other problem was invisible.
Because dotnet run always builds the current source, the next phase's validation ran with the code the previous phase had just written. The code was not reviewed, not tested and not merged, but it decided whether the next phase could go on. The log format could change between two phases in the same story. The state machine that validates the change was the change.
That is not a fault you fix with a better lock. It is a fault in who judges whom.
The first answer, in a decision paper from June, was to make it safe. A story that changes the runner should be able to be run by the runner itself, without hangs and without the running runner ever running code that had not been reviewed.
The first step was built in September and still holds. The runner no longer runs from the source, but from a frozen snapshot: a published copy of the runner and the tools in a folder outside the repo. Sessions get the snapshot's path, so a call from a session hits exactly the version that started it, and never triggers a build.
On 25 September I sat in a grill interview about the next step. The plan was locks that understood that one run could sit inside another, isolated tests and a versioned contract between the phases. Along the way it became clear that every mechanism was an attempt to keep judge and defendant apart inside the same process. So I turned the question around. The goal was no longer that the runner can change itself safely. The goal became that it never does.
On 6 October the runner got its own repo. It started without history, and the first commit points to the commit in the product repo the code was taken from. The runner's code no longer exists in the repo it works in, so there is nothing to rebuild in the middle of a story.
New runner code becomes active through a publish between runs. It is built next to the running version, has to pass a self-test, and the switch happens in one place. If the snapshot's commit is not the same as the tip of the source's branch, the runner refuses to start the story loop. The previous version is ready, so it can be rolled back.
So who changes the runner? Planned changes are made in a Claude session I start myself, on a work branch. The session builds and tests, I merge. Since 6 October 280 changes have been merged to the runner's main. 273 came from work branches. Six came from the supervisor's heal, and the last one is the rollback of one of them 20 minutes later (#7). None came from the runner itself. Not because it has behaved well, but because it cannot: its code does not exist where it works.
That has a price. Every change to the runner is a session I start and a pull request I merge. That pace is also my time. My time is the most expensive item in the calculation and the only one that does not scale.
The same morning the runner got its own repo, the boundary with the product repo got a version number. The runner required a specific version of the process files the sessions read, and refused to start a phase if the product repo's was older. A change the runner depended on had to raise both sides at the same time.
That held for three weeks. On 27 October the version number was deleted, and today there is nothing to version. The contracts the runner drives are in the runner itself as a kernel. On every call the kernel is written out into the target repo with the repo's own values inserted and with the repo's own sections where the kernel has made room for them. What is written out is outside git. For the product repo the result was byte for byte the same as the old files. When the contract travels with the binary, the two sides cannot get out of step, and a version number has nothing to measure.
The decision from September was right when it was taken. It held until a better structure made it superfluous, and then it was deleted instead of being left lying alongside.
The runner was built in and for one product repo, and it bore traces of it: the id prefix on stories, the name of the command, ports, product names, the name of the main branch and commands for exactly our stack. That is now in a profile that every repo has: ids, branches, stack and commands, 22 validation rules, conventions, what is generated, and how the system is started for browser testing. The runner has no default values. If a field is missing, it is an error.
A test counts how many places the runner's code still mentions something from the product repo. In September it was 971 places. Today it is 81, and most of them expire next week. The mechanism is #10's story.
On 28 October the runner ran in one of our other projects for the first time: an ASP.NET Core product with an AngularJS frontend and no unit tests. A story went from ready to done and was merged up without a human. And the first real lesson came the same day.
The runner machine lacked the .NET version that repo uses. The first gate was red before a single test had run. The review round "fixed" it by changing the product's test project so it ran on the version the machine had. In other words, it changed the product to fit the machine. The answer was a gate that checks the machine before the loop picks work, and says which runtime is missing.
The pilot found more: runner/main had never been pushed, so merge-up failed without saying so. The runner's output wrote the product repo's name in a repo that was called something else. Both have been fixed and are held in place by a test.
Since then a third repo has got its profile, and today the runner works on all three at once from the same machine. That does not take three machines, but it does take that none of the three thinks it is alone. A supervisor keeps one loop running per repo, each with its own backlog, its own state repo and its own cap on parallel sessions: eight in the product repo and two in each of the others. What the machine has only one of is not split up in advance but shared through a register: browser slots, ports and the pool of Claude accounts. A crash in one repo does not roll the runner back for the others. It was built and tested with two instances running side by side on 27 October, the day before the pilot.
The runner never changes itself. Not better locks, but separation: its own repo, a frozen snapshot and a kernel that travels with the binary, so there is nothing to keep in step.
An agent may well build tools. Not the tool it stands on itself.
The last part is about the rule that ties it all together (#10).
Numbers as of 19 November 2026.
—
The code is written by AI. So is the text. The decisions are mine.