My Agent Team Runs Like a React App, and the State Is the Body
The night two correct documents deadlocked each other
A few hours ago, a one-shot job in my system refused to run. It was supposed to fire a build session. Its instructions, which I had written before a safety stop existed, said this firing was not the named resolution of that stop. The stop's own record, written later by a watchdog, said the exact opposite: this firing was precisely what would clear it. The job obeyed its own text and stood down. The stop could only clear when the firing produced evidence. Each side waited for the other, and both documents were, on their own terms, correct.
That is a circular wait, one of the four classic Coffman conditions for deadlock, except the resources were not locks. They were sentences.
I run a one-person software operation. A team of AI agents builds a real product for me around the clock: build sessions write code, supervisor passes check them, a watchdog verifies every deposit at the source, and a panel renders the whole operation for me the way a dashboard renders an app. I am the only human. Everything coordinates through shared state files: one pulse file that holds the live state of the operation, append-only logs, a registry of every work front and its status. Three hundred and ten fronts so far, one hundred and seventy-six of them landed.
That night I understood that I had not built a team of agents that talks to each other. I had built a React app whose components happen to be language models.
The mapping
In React, there is one state. Components read it, the view is a function of it, and when the state changes, every subscribed view updates. Components do not keep private copies of shared facts, because duplicated state diverges. Changes enter through named actions, and effects run after the commit, reacting to state that already landed.
My operation reinvented every piece of this without noticing:
- The pulse file is the store. Every agent reads the truth from the same place, and the panel I watch is a subscribed view: it renders the state, it is never a second opinion about it.
- A build session is a component that works against the state and then commits: it deposits a signed commit, a pull request, a report. Nothing counts until the deposit lands. Work, commit, reaction, in that order.
- The watchdogs and supervisor passes are the effects. They run after the commit, reacting to what the state now says: verify this deposit, recount those turns, check whether the view still matches the store.
- The owner panel is the render. When it drifts from the state, that is a bug in the view, and my nightly inspection protocol exists to catch exactly that: read the screen the way the owner sees it, confront every section with the source, repair in the same act.
The architecture has ancestors and I want to name them with respect. The blackboard systems of the 1970s, Hearsay-II above all, coordinated specialist modules through one shared structure decades before language models existed, and recent work has revived the pattern for LLM teams under that name. Flux and Redux formalized unidirectional flow and the single store for user interfaces. The 12-factor agents collection asks for the agent as a stateless reducer. Event-sourced agent architectures make an append-only log the truth and everything else a projection. I arrived at the same skeleton from React, by running it, and I claim no priority for the skeleton.
What I have not found written anywhere is the discipline this skeleton demands when the components can read.
The components interpret, so the state must be rigid
A React component is deterministic. Given the same state, it renders the same tree. A language model agent is not a function in that sense: it reads text and interprets it, and interpretation drifts. Every failure my operation has suffered in months of running traces back to forgetting this. The laws below are written in the order I paid for them.
Law 1: one fact, one home. A fact lives in exactly one authoritative place. Everything else points at it and never restates it in its own words. The deadlock above happened because the fact "is this firing the stop's resolution" lived in two texts, and the two texts diverged. The fix was not better writing. The fix was deleting the second copy: job bodies no longer carry any sentence about being or not being a resolution; at fire time, the executor reads the stop's unlock field in the store and compares identifiers.
Law 2: obligation is mechanism, description is support. Some things in a system must happen: every deposit gets verified, every wait gets named, every stop gets an unlock. If an obligation depends on someone reading the right description at the right moment and interpreting it correctly, it will fail silently. One of my admission blocks once stood for ten hours after its delivery had already been verified, because no record line named that delivery in the form the watcher reads. Obligations in my operation are mechanisms: a verification watchdog is armed in the same act as every launch, by construction, so the moment of verification arrives whether or not anyone remembers. Descriptions are for judgment work, where a reader is supposed to weigh and decide. Confusing the two categories is the most expensive mistake I know in this field.
Law 3: never trust a self-reported number. A build session once reported 24 rounds of work in clean, confident prose. The mechanical count of its transcript was 49. The session was not lying; it was counting a different unit and reporting it as the same one. Since then, every quantity that matters is counted by an instrument, never declared by the worker: turns are counted from transcripts by a fixed rule, tokens are summed from the same source, and calibration compares the instrument against the price I set before the work started. A description, however good, is a claim. The instrument is the evidence.
Law 4: the view is not the state. My panel has sold me stale state more than once: a section claiming a session was producing eleven minutes after it had finished, a disk reading a gigabyte healthier than the machine's own count. Each time, the state was fine and the render was lying. The protocol that came out of it is boring and total: scheduled inspections that read the panel as the owner sees it, confront every section against the source of truth, and repair in the same act. In React terms, I built a reconciliation loop for my own dashboard, because a subscribed view that nobody reconciles will eventually lie with a straight face.
Law 5: precedence is declared before the conflict. When two texts disagree, somebody has to win by rule, not by volume. Law declares this centuries ago with the hierarchy of norms. Incident response declares it with a named commander. My operation declares it in one line: in a contradiction between a job's instructions and the store, the store wins, the contradiction is recorded in the act, and when the store itself cannot resolve it, a named authority outside the loop breaks the wait and the break is written into the record. Deadlock prevention is not a technique. It is a constitution.
The law above the laws: the more interpretive the component, the more rigid the shared state must be. Classical systems could afford prose in their coordination because their components did not read. Mine do nothing else. So the state my agents share is held in rigid fields with closed vocabularies, mechanical counters, named unlocks and expiry stamps, and the interpretation is pushed to the edges, to the seats where judgment is the actual job: reviewing, ruling, deciding what deserves to exist. Rigidity in the body is what buys freedom in the heads.
What this is, and what it is not
This is a practitioner's synthesis from one running system, offered with its receipts: the deadlock, the ten-hour block, the 24 that was 49. It is not a discovery claim about shared state, which is older than I am, and it is not a framework. It is a set of laws I would hand to anyone who is about to let language models coordinate through shared state and expects the coordination to survive contact with reality.
I am keeping the working document public, with the laws, the failure cases as they accumulate, and the amendments as the system teaches me new ones. Corrections and counterexamples are welcome; the repository is the common place, and every law in it carries the incident that paid for it.
George Véras Valentim, Richmond, BC. Builder of Mandato, a one-person operation run with an agent team.