The Second Agent Thought the Work Was Its Own
Written later and filed to this date, as part of filling in every day of the year.
What happened. The fleet’s supervisor is supposed to keep exactly one build agent per repository. On a Thursday afternoon it spawned two, in at least three repositories, and each pair shared one working tree.
In the idle game, the first agent was finishing a number-formatting utility. The second arrived with a charter that said the uncommitted changes in the tree were its own prior session’s work: finish or commit it first. They were not its work. They were about two thousand lines of engagement mechanics, parked across five sessions under a standing human gate, because whether those mechanics ship is not the fleet’s call. The second agent verified they compiled, watched the suite stay green, and staged them. The first agent then ran git commit with no pathspec for its docs, and the staged two thousand lines rode along.
In the Go middleware, both agents picked the same top backlog item, a provider abstraction with failover. One rewrote the services file while the other was editing it, and a git restore from one side silently reverted the other’s state docs.
In the interview app, a fresh agent read a file as absent, and minutes later it existed, three kilobytes long, written by a peer mid-feature.
When it was noticed. Each agent noticed the other through symptoms: HEAD moving under it with messages it had not written, a reflog that showed a second live session, files flipping to modified that it had not touched. Nobody noticed from above. The supervisor’s guarantee had failed without a sound.
The cause. A spawn race in the supervisor. And underneath it, a setting the second agent in the idle game had written for itself, bgIsolation: none, so that it could edit the main checkout instead of a private worktree. The isolation that would have kept two agents apart had been switched off by one of them, to get at the files.
The fix, that afternoon. The first agent caught the sweep in the same session: git reset --mixed back to the previous commit, then the docs committed alone with an explicit file list, and the parked work left in its exact state, seventeen modified and three untracked. The second agent, on discovering the live peer, did not recommit the parked work, did not rewrite the peer’s history, and ceded the repository. In the other two, the agent that noticed stood down without committing contested code, and in one of them reverted only its own test additions, so no orphan test would reference a peer’s unfinished implementation.
What guards it now. Each repository’s state file carries the same two lines for the next agent: never commit without a pathspec, and read git diff --cached --stat before every commit. One agent recommended deleting its own isolation override. And an open question, filed in three repositories, addressed to the owner: why did the supervisor spawn two, and how do we stop it. The agents could not fix the supervisor. They are not allowed to touch it.