Edition spec Version 5.0 · beta Grok Build only

Relay
beta

A ratchet loop where the run outlives the session. The Ratchet Loop, run under a supervisor that lives outside the model: one fresh Grok Build session per round, the record checked at every boundary by a script, your caps applied from the harness’s own spend report. Nothing inside a round changes. Who keeps the run alive does.

Two shapes of a run Above: the ordinary method as one long session covering rounds 0 to 6, ending in a break at hour nine, followed by a shorter resume that spends its start re-reading. Below: Relay as seven short sessions, one per round, each handed to the next by the supervisor, which checks the boundary and applies the caps between them. 4.3 · one session R0000R0001R0002 R0003R0004R0005R0006 × hour nine: session dies resume: re-read Relay · one session per round R0000 R0001 R0002 R0003 R0004 R0005 R0006 between every two: the supervisor checks the boundary from disk, applies your caps, starts the next

File a brief — Relay is the box under 03 · What is a Ratchet Loop · RELAY.md, the full spec

In plain terms

The Ratchet Loop is a build loop that keeps the best round rather than the last one, judged blind. It runs for days. Its record shows that the thing that dies is never the round — it is the session: the model’s window fills or the harness ends it, somewhere around hour nine, and the next session starts by re-reading everything. The method wrote a handover block to make that re-read short. It could not make the session longer, because no prompt can.

Relay turns the relationship round. Instead of one long session hoping to reach the next boundary, the run is a sequence of short sessions, each started at a boundary by a small script, each told to reach the next one and end. The script — the supervisor — is not an agent. It has no context window, reads no artifact, holds no opinion and cannot be argued with. It reads files, starts sessions, waits by process id, and does arithmetic.

The champion is still frozen by commit. The judges are still blind. The critic is still harsh. What changes is who keeps the run alive — and that it is no longer the thing being kept alive.

The hole it closes

The method page ends with a list of what the Ratchet Loop does not fix, and one entry on it is different from the others: a session shorter than the run. Seven real multi-day runs died the same way. Measured sessions ran 8h41m, 8h00m and 8h42m; the resumes after them ran 2h00m and 24m32s, each shorter because a fresh context spends its first stretch re-reading. The handover block made that re-read a page. The spec says the rest in as many words: closing this needs external automation — a supervisor that starts a fresh session per round and hands it the block. Relay is that supervisor.

What it does, round after round

One session one round

  1. Read the ledgers and the handover
  2. Start a fresh headless session
  3. Wait by PID, with a deadline
  4. Check the boundary from disk
  5. Apply your caps
  6. again
  1. A fault in the record
  2. stop — deliver the last champion that still matches
  1. Three sessions that appended nothing
  2. stop — the hang wearing a loop

You get the same champion, by round and commit — and a run built to reach your cap rather than die at hour nine. Whether it does is the first thing a real run will measure

The session is the round

Each session is handed four facts in front of the brief — which session it is, when it started, when its deadline is, how many ledger lines existed when it began — and one instruction the ordinary method never gives: run exactly one round, and at its boundary end the turn. The context is fresh every round by construction, so the part of the method that survives compaction becomes a part that rarely runs. The handover block stops being a fallback for a dead session and becomes the one document every session starts from.

Every session is started with the harness’s cross-session memory off. Grok Build can inject prior sessions into a new one on its first turn; for a critic or a judge that is supposed to be fresh, that is a hole in the blindness, and the supervisor closes it on every session it launches rather than trusting a setting in your own window.

The boundary is checked by a script

The method already says what a resuming context checks: the champion’s snapshot still matches, a half-finished promotion is rolled forward or cleared, the ledger only ever grew, the fields that may never move did not. Every one of those is a comparison between files. Until now a model performed them on itself, in a context that had just been asked to keep going. Now check-round.mjs performs them after every session, and a fault stops the run — a champion whose bytes changed, a criterion list that changed, a ledger that shrank or was rewritten — while everything that is merely a state the next session knows how to handle is written down and the run carries on.

A script cannot be persuaded that an orphan is the champion.

Ending a turn mid-round is refused

Three real runs ended by writing a tidy paragraph and going quiet, with the job half done, and from outside that is indistinguishable from a crash. The method’s answer was a sentence: ending a turn is ending the run. Relay makes it a control. A Stop hook reads the record before a session is allowed to finish its turn: no ledger line since the session began, a promotion left half-written, a child still running — each is refused, and the refusal tells the model which and what to do about it. It gates nothing in a session the supervisor did not start, so your own work in the same folder never meets it.

The brake reads the harness, not the model

Every headless session ends by reporting its own spend — tokens always, dollars when the server stamped a complete figure. The supervisor sums them on a ledger of its own and stops before the session that would cross your cap, or one the median session so far could not finish inside it. Then it checks the champion out for you, when the tree is clean. Your cap is no longer a number the run remembers to compare against a screen; it is arithmetic on figures the harness wrote down.

Setup is checked before anything is spent

Twenty-one checks with no model in them, a few seconds, before round 0: the kit was generated for this CLI and not the other; both hooks are registered and their scripts exist; the folder is trusted, because an untrusted project hook is skipped in silence; the boundary hook, fired with a real payload, actually denies; the three .gitignore lines that keep sealed checks out of builder worktrees are there; Playwright and Chromium are installed, or every sealed entry answers “unrunnable”, which fails nothing; the clean-checkout two-step actually works on this machine. The supervisor refuses to start on any failure and each failure says what to do.

The same run, side by side
PropertyRatchet Loop 4.3Relay
A session isas long as it survives — measured, about nine hoursone round, then it ends on purpose
Who starts the next oneyou, by pasting the line againthe supervisor, from the last ledger line
Ending a turn mid-rounda sentence says not toa Stop hook refuses, with the reason
The boundary is checked bythe model, on itselfa script, from disk; a fault stops the run
The brake reads/goal status, by the modelthe harness’s own JSON spend report
Cross-session memorywhatever your window has setoff, on every session it starts
Setup is proved bythe model, at SETUPtwenty-one checks with no model, before round 0
You pasteone /goal linenothing — two commands at a shell
You watch/goal status, workbench.mdgauntlet/relay/STATUS.md, workbench.md
Inside a roundthe methodthe method, unchanged
Measured on a paid runseven multi-day runsnot yet — see below

What it deliberately does not add

While this was being designed we read Ruflo (formerly Claude Flow), the largest agent meta-harness for Claude Code: swarm topologies, consensus algorithms, a hundred agent types, a self-learning memory fed back into prompts. It is an excellent answer to a question this method does not ask, and the Ratchet Loop’s own measurements point the other way on most of it: the three-of-four blind panel is the consensus rule, and it is tuned to a bias Raft has never heard of; blindness depends on judges that remember nothing, and every wrong stop this project measured came out of vocabulary a run had learned. What that reading confirmed is that the one ingredient the Ratchet Loop lacked was the cheapest one on Ruflo’s list: a process outside the model that starts the next session. Three ideas were taken — do the things that need no judgement with no model, launch headless sessions from a script and read spend off their JSON, audit the setup deterministically — and the rest was left where it was, with reasons, in RELAY.md §2.

How you run it

Tick Relay under Where it runs on the generator, with Grok Build and the Duel or the Ratchet chosen. The kit you download gains a run-kit/relay/ folder and its START-HERE.md ends with two commands instead of a line to paste:

node run-kit/relay/bin/relay.mjs doctor
node run-kit/relay/bin/relay.mjs run

From a shell at the repo root, not from inside Grok Build — the supervisor opens Grok Build for you, headless, once per round, and closes it at the boundary. Your window into the run is gauntlet/relay/STATUS.md, rewritten at every boundary, beside the workbench.md and progress.html the run keeps as always. Ctrl+C is the pause: it stops the live session by PID, releases the lock and says so; the same run command picks the run up from its last ledger line, never from round 0. There is no /goal status and no /goal pause in a Relay run, because there is no /goal.

The round and token caps from your brief are written into run-kit/relay/relay.json and can be overridden on the command line. --once runs a single session and stops, which is the cheapest way to see whether a round fits inside the defaults before committing to a run. --dry-run prints the exact spawn and starts nothing.

What the supervisor writes down

relay.jsonl
One line per session, append-only: when it ran, its process id and session id, how many turns and tokens the harness reported, whether it was killed and why, which round it started at and ended at, every fault and warning the boundary check raised, and the verdict — continue, or stop and the reason.
STATUS.md
The window. State, champion by round and commit, sessions run, spend against your caps, the last five sessions, the last warnings. Rewritten at every boundary.
ownership.md
Every process the supervisor launched, by id. It terminates only what is on that list, only by id, never by name.
sessions/
For each session: the exact prompt it was started with, the full JSON result, the boundary check in full, the last of its stderr. When a harness fact turns out to matter, the evidence is already on disk.

What has been measured

Nothing, on a paid run, yet. This is a beta and this paragraph is the reason it says so. The supervisor, the boundary check, the stop gate and the doctor are tested against synthetic runs — a hundred and forty-six cases, forty-five of them written by an adversarial verifier trying to break it — in which a stand-in for the harness appends honest ledger lines, appends nothing, hangs until it is killed by PID, or tampers with a champion and is caught. That proves the mechanisms do what they say when the files look like that. It does not prove a real round fits inside the turn cap, that the ledger-derived deadline is sane, or that a session ends at the boundary of its own accord rather than only when the gate holds it. Those are the first things a real run will tell you, and the supervisor’s own ledger is laid out so that they are the first things you can read off it.

The first measurement is the one the method has been waiting for. Its cost section says the honest experiment is a long, coupled run — twenty or more rounds, three or more pieces — and nobody has run one because sessions died first. Relay is the precondition for that experiment, not a substitute for it.

What the first ten sessions will tell you, in the order you will learn it: whether the doctor’s checks were the right ones; whether a session ends at the boundary of its own accord or only when the gate holds it (the gate field); whether a round fits inside the turn cap (hit_max_turns); whether the deadline is sane (wall_ms against the deadline in each session’s hand-off); and whether re-reading the brief every session is a cost worth its size — which is a question about the prompt, not about Relay.

What this does not fix

A vague bar

Still the number one failure, and a supervisor makes it cheaper to run for longer against one.

The round itself

Every death inside a round — a judge that never returns, a slate that cannot show the change — is unchanged. Relay makes the round’s ending cheap. It does not make the round good.

The re-read

A fresh context reads the whole prompt every round, and the prompt is large. Relay pays that once a round rather than once a death, and writes down what it cost.

An adversary

The boundary check detects accidents. A run that wanted to hide a change from the snapshot would rewrite the snapshot too; the hook that denies that is the same hook as before, with the same open questions.