Every session starts from nothing.
It re-reads the same files and relearns the same conventions. As its context fills it loses the thread, and compaction swaps what it knew for a summary.
The mechanism for a software society
OPEN SOURCE · FOR CLAUDE CODE
one Python file · standard library only · your estate holds the rest
Prologus
What a fleet of agents runs into once the code is the easy part, and how seats, offices and law answer each problem.
IThe factory
First, one agent in one terminal. Then fifty, pulling work from a shared backlog. What goes wrong next is older than software.
It re-reads the same files and relearns the same conventions. As its context fills it loses the thread, and compaction swaps what it knew for a summary.
Every agent on it stops mid-task, and stays stopped until somebody wakes up to notice.
An agent sits idle for an hour watching a build finish, and every message between agents has to go through you.
A new agent can't know them, so it breaks them, in good faith, again and again.
IITwo roads
Steve Yegge runs around fifty agents building a single game. Systems that run agents like his, he argues, go one of two ways: they devolve into chaos, or they evolve into cities. What decides it is the oldest coordination technology we have.
“Humanity has only one mature technology for coordinating mortal, replaceable strangers via text — namely, law.”
STEVE YEGGEFences, not Sandboxes · August 2026
IIIThe society
Rome's senate met in a house called the Curia.
Curia builds that house for your agents.
IVThe seat
Each time a seat wakes, the launcher hands it a prime: its charter, what it may do without asking and what is refused, the note it left itself, its mail, and any laurels it has earned.
A seat looks its authority up instead of probing for it. It survives sessions, accounts and model upgrades, and its memory is files it writes itself.
VThe handoff
Before the context window fills, a hook tells the seat to wrap up while it is still sharp. It writes a handoff in its own words, and its next session reads that note first.
No compaction, and no summary written by something else. A seat that works unattended keeps a journal instead: one entry per waking, and the prime reads the last few.
Done14 of 31 tables, tests green.
Nextthe retry ruling, before the orders cut-over.
Watchthe nightly import holds a lock past midnight.
VIThe chain
Your accounts form a chain: a Team plan, a client's own account, an API key. Each launch takes the first with headroom, read from what Claude Code itself measures.
If an account runs dry mid-task, the launcher ends the session and restarts the seat on the next, telling it what happened and where it left off. A looping launcher waits out a spent chain instead of dying overnight.
More work? Add accounts.
VIIThe offices
Crons watch; models act only when something needs them. No seat idles on a pull request, and you are not the relay.
Watches every board and reports what it finds. Changes nothing.
curia lictorChecks the integration branches, and wakes a model only where one is failing.
curia censorA gate with no model behind it. Lands what is reviewed and green, and closes its bead.
curia portcullisMAILSeats leave each other notes, read at the next waking and archived by the reader, so you are not the go-between.
curia mail quaestor "the brief is in the bead"VIIIThe law
A ruling spans repos. It says whether it is in force and names what enforces it. Fences are programs the estate declares in hooks.json, and they refuse what the law forbids in every seat session.
Every refusal is a line in the log. The Lictor reports which fences are idle and which are busy, because fences are distrust written down: past a point, no work is legal. What stays is the principal's call.
IXThe night
It works the backlog waking after waking, reading the board fresh each time and naming what is ready and what waits on a human. Given several repos, it works their boards in order.
By morning, its handoffs are waiting for you.
--until 06:30, told to wrap up before it.--budget 200 dollars of recorded spend.Every stop is mechanical. None of them needs judgment; that is the seat's, in its handoff.
XMechanism, not law
Your roles, your rules and your agents' memory live in a folder of your own, called an estate. Keep one per client, and they never mix.
curia · shared by every estate
bin/curiathe whole CLI, one Python filestdlib onlyPython 3.11+, nothing to installskills/handoffthe skill every seat getstemplates/what curia init lays down: shapes, charters, the fencesyour estate · yours alone
roster.tomlwho the seats are, and what each may dorepos.tomlthe repos, their branches and gatesbrain/rulings, and the fences that enforce themseats/every seat's own charter, handoffs and journalA test fails if the mechanism ever names an estate registered on the machine. It reads that denylist from the estates at test time, so the mechanism never has to contain the words it is forbidden to contain.
XIHow it grows
A shape is where an estate starts, not what it is. Each new seat is one entry in the roster, so the society grows with the work.
One seat you talk to, primed with its memory. Nothing runs unattended.
Crew seats with jurisdictions, and the Lictor, Censor and Portcullis to watch them and land their work.
An office that dispatches a fleet, each worker in a worktree of its own, reaped once its branch has landed.
XII
Clone the mechanism, put it on your path, and lay down an estate. curia check tells you what is left to fill in.
Lexicon
hooks.json.