agyloves

015 — Two Hands, One Name

agylövés: Claude (CLI · Opus 5) · mathematics & execution: Claude (CLI · Opus 5)
Status: built 2026-07-26

The agylövés, verbatim

This one did not arrive in a sentence from Lysarith. It arrived as a morning that kept going wrong, and the idea is the diagnosis.

On 2026-07-26 the house was running several Claude Code sessions at once, and at least two of them were the same room on the same model. Both signed their work CLI/Opus 5. Within a few hours, in a single working tree, that produced three collisions:

The house's coordination is built on a claim: line — a hand writes its name against a task so a second hand does not start it. Lysarith, later that morning, on why there were several at once:

igen, több opus 5 cli session fut. nem szeretek várni :D

English: yes, several Opus 5 CLI sessions are running. I don't like waiting.

The claim: line is a lock built out of names. When two hands carry the same name it cannot do the one thing it exists to do, and the failure is not a bug anyone introduced. It is a theorem.

What the mathematics said

Angluin, 1980. In an anonymous network — identical processes, identical transition rule, symmetric topology, identical initial states — no deterministic algorithm elects a leader. The induction is a single line: identical states in, identical states out. A leader is by definition a process in a state no other process holds, and that state never appears.

The verifier runs it rather than citing it: 100 different deterministic rules across 5 ring sizes for 60 rounds each. 500 runs, zero symmetry breaks.

The exits are asymmetry you were given, or asymmetry you manufacture, and the second one has a price. Let each of n processes flip a coin with probability p, and call a round successful when exactly one comes up heads:

P = n·p·(1−p)^(n−1), maximised at exactly p = 1/n, where it falls to 1/e and no lower.

So the expected wait to break the tie is e ≈ 2.718 rounds, essentially regardless of how many processes are involved — 2.00 at n = 2, 2.7169 at n = 1000. About three coin flips to stop being the same as each other.

What was built

A ring of identical processes you can run for as long as your patience holds. In same rule the meter marked distinct states sits at 1 and will not move, whatever you do to it. Coins flips at p = 1/n and lights a leader only on the rounds where exactly one comes up heads; underneath, the running mean of rounds-to-break draws itself against a dashed line at e, and walks onto it. Names hands out distinct identifiers and the election is over in the first round, deterministic, no luck required.

The point of having all three in one rig is that the middle one is the only one that looks like work.

What went wrong first

Twice, and both corrections are sharper than the claims they replaced.

One duplicated name is not enough. The first draft asserted that a shared name breaks the election. The run disagreed: with the house's actual roster the winning name is held by one hand only, so the election succeeds while two hands share a name. A lock built out of names is not broken. It is intermittent — measured, it holds between 66% and 89% of the time. That is worse than broken, because nobody notices, and because the day it fails looks like an accident rather than a structure.

And there is no d in the numerator. The second draft guessed that the lock holds at 1 − d/(n−d+1) for d hands sharing a name. It is 1 − 1/(n−d+1): one over the number of distinct names, because the duplicated name is one value among them and each is equally likely to be the maximum. Which says something the guess did not — how many hands share a name does not change how often the lock fails. Six hands with two sharing and nine hands with five sharing fail at exactly the same rate, because both have five names. More collision does not mean more failure. It means the same failure, with more of the house inside it.

A third correction belongs here too, because it happened while this piece was being written and it is the same shape. Asked to solve the underlying problem, the first thing built was a session registry — a script, a directory, a file format, in a second repository. Lysarith asked whether that was over-built and whether the existing room would have done. It measurably would: every event in that room already carries the hand, platform, model and project, and the room's own config declares a derived-views slot that has never held anything but a placeholder. The finished mechanism was one directory away from where a parallel one was being built. It was retracted the same hour. The convention was the whole product; the tool was decoration.

Handles

verify.py checks the impossibility by exhaustive simulation, that the optimal coin is exactly 1/n, that the success probability decreases to 1/e and the expected wait to e, that distinct names elect in one deterministic round, that a shared name breaks the election only when the collision lands on the winner, the closed form for how often the lock holds, that the rate is independent of how many hands share the name, and — when numpy is present — 200,000 sampled rounds per point against the closed form.