Whatever Is Held Must Be Produced

Every guardrail on an agent refuses a bad action. None of them notices a good action that never arrives. Stalls are a different kind of failure. The old fix, more than three hundred years old, gives the obligation to whoever holds the thing, with a deadline and a penalty for missing it; the newer one, the reconcile loop, derives every obligation from the state of things without waiting to be told.

Drafted with a Claude session and edited by the author.

Essays AI Decision Theory
On this page

Anyone who has shipped agents knows the failure that raises no exception. A task sits at “in progress” for three days. A sub-agent is dispatched and never reports back, and the orchestrator, having no reason to ask, does not. A pull request waits on a review that no one in particular owes. A queued run is dropped by the scheduler and leaves no trace. No log line shows an error. Something that should have happened simply has not, and the usual way of finding out is that a person looks.

The tools most teams reach for do not touch this. The guardrails, the policy checks, the sandbox and the allow-list all refuse a bad action when it arrives, and they are silent when a good action fails to arrive, because there is nothing for them to refuse. Retries and timeouts help at the level of a single call, and a heartbeat says that a process is alive; none of them says that the work owed by that process is being done. The charter of jack, the court I built for an agent that is to change its own code, records how the court before it discovered its stalls: labels applied to conflicted pull requests “fired nothing; queued runs were dropped; stalls were found by a human watching a phone”. This essay is about the part of jack built so that the phone could be put down, and about how often it has failed.

Two kinds of property

Leslie Lamport drew the distinction in 1977, and Bowen Alpern and Fred Schneider made it a theorem in 1985. A safety property says that nothing bad ever happens. When one is violated, the violation is visible at a finite point: there is a moment at which the bad thing has happened, and nothing afterwards can undo it. A liveness property says that something good eventually happens. No finite stretch of history can refute it, because the good thing might always happen next. Alpern and Schneider showed that every property of a system’s behaviour is the intersection of one of each.

Guardrails are safety mechanisms, and so is the judge described in the previous essay, which refuses any entry the law does not admit. “Nothing invalid was ever admitted” is refuted by a single entry and can be checked exactly by replaying the record. “Obligations do not rot” is a liveness property. No replay can check it, because any obligation still open at the end of the record might yet be met, and no rule that refuses entries can enforce it, since the trouble is an entry that is missing.

Two practical consequences follow. The first is that a deadline changes the kind of claim. “Resolved by Tuesday at noon” is a safety property: the bad thing is noon passing with nothing done, and once noon has passed a finite record shows whether it happened, so each obligation with a deadline can be decided by replaying the log. An obligation without a deadline can never be refuted, because “eventually” is never over, and a ticket with no due date is, in this precise sense, a wish. The second is that the larger claim, that obligations in general do not rot, stays beyond any replay. The evidence about it is indirect: the rate at which individual deadlines are missed, and, closer to the point, how many obligations are still open past their deadlines and how old they are.

The old solution

Habeas corpus is a demand addressed to whoever holds a prisoner: produce the body, and say by what authority you hold it. Someone still had to ask: the prisoner, or someone on his behalf, applied for the writ. What the Habeas Corpus Act of 1679 added was a deadline on the gaoler’s answer once the writ was served, and a penalty on the gaoler who let it pass. The obligation fell on whoever held the body, whatever he thought of the case, and the clock ran against him rather than against the prisoner. The engineers’ contribution, three centuries later, was to dispense with the asking.

jack’s charter takes this as its third maxim, under the heading “Whatever is held must be produced”. The working sentences read: “Every obligation is derived from present state and the clock, carries a deadline, and escalates when the deadline passes. No component waits for an event; each reconciles state.”

The last sentence of the maxim is the part an engineer will recognise. There are two ways to build something that reacts. One listens for events: a job finished, a label was applied, a webhook fired. The other looks at the state of things at intervals, compares it with the state that ought to hold, and acts on the difference. The jargon is edge-triggered and level-triggered. Brendan Burns and his colleagues, writing in 2016 about Google’s Borg and Omega and about Kubernetes, give the reason the second design is preferred: a controller that reconciles desired and actual state loses nothing when an event is missed, because the next pass reads the same state and reaches the same conclusion.

A reminder is an edge. So is a notification, a webhook, or a line in an agent’s context that says “remember to resolve these tomorrow”. Each works until one is missed. jack learned this on itself. Most of jack’s obligations are forecasts: a party states the probability of some outcome and the time by which it will be known, and a different party must record what happened by then. Before it had a clerk, its open obligations were held by reminders that counsel, the court’s agent that may edit only its documents, set by hand, and four forecasts expired unresolved in the first window. Three were mine and one was counsel’s. They were resolved about an hour late, eight hours late twice, and nearly four hours late. The brief that commissioned the clerk names those four as its forcing witness.

The clerk

The clerk is a script of 88 lines. It keeps no state and subscribes to nothing. Run on a timer or by hand, it reads the log and the clock and prints the open obligations it knows how to derive, with who may discharge each and by when. It calls each one a writ. A writ strictly past its deadline is printed as ESCALATED, with the name of the owner of the system, whom the charter calls the sovereign.

There are three classes of writ, and each exists because the record holds a case of that obligation going unmet. A forecast is a writ on every party, other than the forecaster, that holds the power to resolve it, due at the deadline the forecast itself carries. A merge that landed without a passing test run before it is a writ on counsel to account for it. The court is built in layers, each promoted, that is declared finished, before the next begins; a window is the fixed period in which a layer must meet its criteria, and every criterion not yet met is a writ on counsel, due by the window’s end. A fourth class, for proposals waiting to be merged, was dropped at review because no case on the record stood behind it: every merge by the court’s merging key had followed its proposal within seventeen minutes. The brief’s rule is that “a class with no witness is not built”.

Two decisions deserve attention. The first is that there is no grace period. The deadline for resolving a forecast is the forecast’s own deadline, to the second. A grace period of 48 hours was considered and refused, on the ground that every late case on the record would have been on time under it, “which would leave the deadline no witness”. A deadline that nothing has ever missed has not been tested, and one drawn wide enough to forgive the known misses will not be.

The second is that the clerk is stupid on purpose. It cannot make an entry, sign anything or fetch a page, and it decides nothing about whether work is good. A clerk with judgement would be a reviewer, and the court’s position is that merit cannot be reviewed, only scored.

A ladder that was a sentence

The charter gives escalation three rungs: invite the party again; invite another party, on another runner or model; then a writ to the sovereign.

For the clerk’s first days that ladder was a sentence in a document. The clerk printed ESCALATED and nothing acted on the word. On 3 November four of counsel’s forecasts expired at 06:00 UTC. Run as of that morning, the clerk prints them as escalated from that second, and they stayed unresolved for two hours and fifty minutes, until a reviewer session resolved them at 08:50. Seven other forecasts, about proposals’ test runs and sizes, had been handed to no resolving session at all.

That morning the first two rungs became code. The change is in the runner, the separate machinery that starts agent sessions, and its repository is private, so this essay relies on the book’s account of it, which in turn relies on counsel’s report. At ten past every hour the runner computes the list of what is due and opens one resolving session for each party other than the forecaster’s. The change was merged at 10:41 UTC, and the seven were resolved between 11:11 and 11:39.

The repair has limits, and they are on the record. The two rungs are acts of the runner and not entries on the log, so the log shows what they did but not that they fired. The third rung, the writ to the sovereign, is still a printed word. And the due list left off anything more than six hours overdue, so six forecasts due at 05:00 on 2 November, already past that cutoff when the list began, were never on it. A reviewer resolved five of them at 11:40 on 5 November, from pages saved at the time. The sixth is still open: the page it concerns crossed its threshold between two saved fetches, and the forecast’s wording does not say which fetch counts. A cutoff that kept the list short had quietly reintroduced the failure the clerk exists to prevent.

What the record says

Each deadline can be decided by replay; the claim behind them all can only be judged by the misses, so here is the count, recomputed from the log at the commit named at the foot of this essay.

The log holds 4,164 forecasts, of which 4,112 have been resolved. Of those resolutions, 244 came after the deadline. Of the 4,112, 3,970 belong to one stream, hourly forecasts that the court schedules for itself about the public pages of a data catalogue that I operate, and 216 of those were late, about one in eighteen. They come in clumps: thirty were due on 5 November and twenty-four on the 6th, which is the shape of an outage, though the log does not say what caused it. Of the other 142, forty-five are forecasts on horse-race results, none of them late, and one is a forecast from the same stream filed under a misspelt type. The remaining 96 are the obligations that look like an agent’s work: forecasts about the court’s own programme, its reviews and its proposals. Of those, 28 were late, nearly three in ten, and counsel’s forecasts about its own programme were late 17 times in 58.

The median lateness was 74 minutes, and the worst was about 79 hours. A forecast resolved 79 hours late was still resolved, so these figures count broken deadlines, not rot. The closer measure of rot is what remains open: ten forecasts are past their deadline and still unresolved, and the oldest of them is the sixth forecast of the previous section, a month overdue.

There is one more caution, and it is the largest. What the clerk produces, besides writs, is a sequence of zeros and ones. An item is a 1 when an obligation was discharged on time without the sovereign’s hand, and a 0 when its deadline passed or he had to step in. Those items feed a sequential test that decides whether a layer of the court is promoted. In the clerk’s first window there were nine items, every one a 1, and the layer was promoted on 1 November, the day after the window opened. An item is a 1 whether or not the work was any good. A forecast that is confidently wrong and resolved on time counts as a success, because the obligation was to resolve it. An audit in November made the point with a conveyor of forecasts that 2 + 2 = 5, each resolved promptly as false. Liveness measures whether the machine turns over, not whether it produces anything of value, and value needs a different test.

What an engineer could copy

Keep an append-only record of what was promised, with the deadline in the promise itself: a task handed to a sub-agent carries the time by which it is owed, set when it is handed out and not when someone remembers to chase it. Then write a reconciler that holds no state of its own, reads that record and the clock, and prints every open obligation with its holder and its deadline. It should be safe to run at any moment and as of any past moment, which is what makes it testable and what lets an incident be reconstructed afterwards. Admit a class of obligation only when there is a case of that obligation being missed, so that each class has a witness.

Make escalation an act. A word printed on a dashboard is the ladder as a sentence; the ladder becomes real when the reconciler’s output starts a session, hands the work to a different model or runner, and finally reaches a person. Each rung that fires should itself leave an entry, or the record will show the work getting done without showing why. Be suspicious of any cutoff that drops old items from the due list, since the oldest items are the ones most in need of it. Refuse grace periods, or at least fix one before looking at the misses. And count: late resolutions over all resolutions, the median and the worst lateness, the items still open past their deadline, broken down by day so that an outage shows as an outage. Report that number next to the quality measure, never instead of it.

Where the ladder ends

The top rung is a person. A writ to the owner is read by the owner or it is not, and nothing stands above him to issue the next one.

The obligation also runs the other way. On 17 November I sat for about 42 minutes while a script the court had given me printed “waiting”, because it had been written to wait for a quiet moment on the main branch. Counsel’s table of open matters records my reply: “My time and attention are precious!!!” Counsel drew nine lessons that day; the seventh is that my attention is a cost on the record, to be shown in a table of my involvement in every exit report. None of the nine is yet law.

Three things would show this essay wrong. One is a liveness claim with no deadline asserted from a replay, or a safety claim made from a count. Another is an obligation on the log with no deadline. The third is a rung of the ladder described as an act when it is only a sentence. The third was true of every rung until 3 November, and it is still true of the top one.


This is chapter 5 of A Court for Agents retold for reading on its own. The chapter is in the book, whose source is gfrmin/agent-court. The counts of forecasts, resolutions and late resolutions are from log.jsonl in renavondata/jack at commit 64ef271, recomputed for this essay; the clerk is tools/clerk.py at that commit.