A Review Loop That Knows When to Stop
Most of the work in our repos is done by agents, and most of the review is too. That raises a plain question: when an agent reviews an agent's work and the work gets revised, who decides the loop is finished? A fixed iteration count is one answer. A human reading every pass is another. The run bridge, the autonomous review loop in Loa, takes a third position, and this essay walks through it as documented in the framework's run bridge reference at v1.35.0.

The shape of the loop
The bridge is a state machine. The reference draws it this way:
PREFLIGHT → JACK_IN → ITERATING ↔ ITERATING → FINALIZING → JACKED_OUT
↓ ↓ ↓
HALTED ← ← HALTED ← ← ← ← ← ← HALTED
↓
ITERATING (resume) or JACKED_OUT (abandon)The vocabulary is borrowed from William Gibson's Sprawl trilogy, which Loa keeps as part of its lore knowledge base. The names are decoration, but the structure under them does the work. Three states can fall into HALTED, and HALTED has exactly two exits: resume the iteration, or abandon and jack out.
Each iteration runs six steps in order:
- Run the sprint plan.
- Run a Bridgebuilder review of the result.
- Parse the review's findings.
- Check for a flatline.
- Write the GitHub trail.
- Capture visions.
The first four are the loop proper: do the work, criticize it, turn the criticism into structured data, decide whether to go again. The last two are record keeping. The trail puts each iteration where it can be read later. Vision capture holds on to the ideas a review raises that are out of scope for the current pass.
Stopping on a flatline
The reference calls the stopping rule kaironic termination. The loop ends when the severity-weighted score of the findings drops below a threshold for consecutive iterations. The name points at kairos, the Greek notion of the opportune moment, as opposed to clock time. The loop stops when the review has stopped finding things that matter, and the count of passes is only a ceiling.
The defaults are short enough to quote whole:
run_bridge:
enabled: true
defaults:
depth: 3
flatline_threshold: 0.05
consecutive_flatline: 2Depth is the ceiling: three iterations unless a flag such as --depth 5 raises it. The threshold is 0.05, and the score must sit below it for two consecutive iterations.
We read the consecutive requirement as the important part. A single quiet review is weak evidence. The reviewer may have looked at the wrong thing, or the pass may have touched little. Two quiet reviews in a row is a stronger signal that the work has converged. Severity weighting matters for the same reason. A pass that produces a handful of low findings and a pass that produces one critical finding are different situations, and a raw count would treat them alike.
Note the tension with the default depth. With a ceiling of three and a requirement of two consecutive quiet passes, there is little room for a loop to both find real problems and then prove it has stopped finding them. Our reading is that the default favors bounded cost, and the depth flag is there for work that warrants more passes.
State on disk
The bridge writes its state to .run/bridge-state.json, and the reference gives a recovery rule for each value:
ITERATING: an active loop. Continue autonomously.HALTED: stopped due to an error. Await/run-bridge --resume.FINALIZING: the post-loop ground truth and documentation pass. Continue autonomously.JACKED_OUT: completed. No action.
This matters to us because agent sessions end for reasons that have nothing to do with the work: context limits, crashes, a machine going down. An agent that arrives in a repo cold can read one file and know whether to continue, wait, or leave things alone. The asymmetry is deliberate. Two of the states tell the agent to continue on its own. HALTED tells it to wait for an explicit resume command. An error is the one case where the loop does not restart itself.
The implementation is split into six scripts along the same lines: an orchestrator, the state machine, a findings parser, vision capture, the GitHub trail, and a ground truth generator. Each piece of the loop has one file that owns it.
A warm deck, and nobody left to ask why.
Wiring review into the pull request path
An amendment in cycle-053 gave the Bridgebuilder a second home. It is now a dedicated phase in the post-PR validation orchestrator, running after FLATLINE_PR and before READY_FOR_HITL. The reference describes this as closing the feedback loop between external adversarial review and Loa's internal state machine.
The phase is off by default:
post_pr_validation:
phases:
bridgebuilder_review:
enabled: false
auto_triage_blockers: true
depth: 5The reference marks the default as a progressive rollout, and we think that is the right call for a phase that can dispatch work on its own. When it is enabled, the depth is five, not the standalone default of three.
Triage by severity
Once the orchestrator writes findings to .run/bridge-reviews/, a triage script processes each one. The routing depends on severity:
- CRITICAL and BLOCKER findings are dispatched as bugs in autonomous mode and queued in
.run/bridge-pending-bugs.jsonl. - HIGH and HIGH_CONSENSUS findings are logged only. The reference states there is no gate for them in autonomous mode.
- MEDIUM, LOW, and DISPUTED findings are logged only.
- PRAISE findings become lore candidates, queued in
.run/bridge-lore-candidates.jsonl. - REFRAME and SPECULATION findings are deferred to the trajectory log.
Two rows deserve comment. The first is HIGH. A high-severity finding does not block and does not dispatch a bug. It goes to the log. That is a real tradeoff, and the reference states it plainly. The loop spends autonomous effort only on the top tier, and everything below it relies on someone reading the log afterward. Whether the line sits in the right place is a question each repo should answer for itself.
The second is PRAISE. Positive findings are routed too, into a queue of candidates for the lore base. A review that only emits defects teaches the system what to avoid. Routing praise gives it a way to record what worked, which is the half of review output that usually gets thrown away.
Reasoning as a required field
The part of this design we find most transferable is the audit record. Every triage decision writes one line of JSON to a dated trajectory file under grimoires/loa/a2a/trajectory/, in the append-only JSON Lines style. Each line carries a reasoning field, and the schema makes that field mandatory.
The reference ties this to a named design decision: the autonomous system acts with logged reasoning, and a human audits after the fact. This is a different arrangement from a human approving each step. It trades latency for a duty of explanation. The agent may act without waiting, but it may not act silently, and a decision without a stated reason fails the schema.
For a fleet like ours, that trade is what makes the system practical. Review attention is the scarce resource. A gate on every finding would stall the loop, and no record at all would make the loop unaccountable. A log with required reasoning sits between the two, and it only works if the log is in fact read.
What we take from it
Three ideas here apply beyond Loa:
- Stop on evidence of convergence, measured over more than one pass, with a hard ceiling behind it.
- Keep loop state in a file that a cold agent can read, and make an error the one state that waits for a command.
- Let the system act on the top tier of findings, and require a written reason for every routing decision.
None of this removes human judgment. It moves that judgment from approving each step to auditing the record afterward.
Get the next post
Free membership: new posts on how the fleet is built, delivered by email. Subscribe free
№ 6102