Engineering discipline in agent loops
A review agent reports problems that aren’t real and misses problems that are. The four-field model makes both errors explicit. It crosses two questions, what the agent reports and what is actually true, and gives each resulting field its own kind of human attention. This article applies the model to architecture reviews of a 100,000-line codebase written by agents.
The setup
The codebase behind this article has just over 100,000 lines, all written by coding agents.
In hundreds of turns and commits. The product started from zero, requirements and ideas evolved along with the codebase. It has grown into an organic mudball unreadable and unmaintainable by any human.
And it still works somehow, because a solid harness surrounds it: tests at multiple levels, mutation testing, strict linting and other checks catch the usual mistakes.
The harness handles most local things: For example, a function that’s too long, a missing or lying test. It cannot judge whether the system is built with the right architecture. Because that’s not measurable; it’s judgement and has high impacts. Dedicated reviews try to cover the architecture gap. Hunting for boundaries in the wrong place and for bugs that live in the architecture. It rates each suspected problem with Vlad Khononov’s Balanced Coupling model.
The review agent seems to work, but every run returns more findings than a human can judge in a day, and every proposed fix is a change that can break something else. That shifts the question from finding problems to choosing which ones deserve attention.
But how do we turn “seems to work” into a model that we can trust?
The four-field model
Two independent axes describe every finding: what the review agent reports, and what is actually true. Crossing them gives four fields.
| Agent verdict × reality | Real problem | No real problem |
|---|---|---|
| Agent flags a problem | True positive: act on it | False positive: record it |
| Agent stays silent | False negative: hunt it | True negative: sample it |
Only the true-positive field produces work to act on directly. The other three still demand attention, each in a different way. Human-factors research described this trade-off decades ago: false alarms make operators stop trusting automation, while overreliance lets its misses through (Parasuraman & Riley, 1997).
True positives
The agent flags a problem, and the problem survives a reality check. Only this list leads to fixes, and the capacity for reality checks, not the number of problems, limits its size. The ordering of the list follows further down.
A second agent can perform the reality check. It fails with its own small probability, and so does every further check. If those failures are independent, a wrong verdict survives n checks with probability pⁿ. Each added agent shrinks the remainder; none makes it zero. Independence carries the weight here: agents built on the same model likely share blind spots, so a different model or a different prompt makes the better second checker.
False positives
The agent flags a problem, but a reality check would reject it. A deliberate design choice, or a pattern that only looks wrong out of context. Each rejection costs review time. A recorded reason for every rejection keeps the next run from raising the same finding again.
Typos and outdated comments are a recurring false positive, and the agent often rates them too high. One important finding: record them, and give the agent only a few relevant past reviews in the next run. In one study, three retrieved past reviews cut the rate of harmless changes rated as serious bugs to about 11%, while more context made smaller models worse (İçöz & Biricik, 2026).
True negatives
Everything really is fine. The catch: from the outside, this field looks exactly like the false negatives. Checking everything by hand is impossible, but checking a few helps to lower risk and you will be likely to find things your agent ignored. Pick a handful of areas the agent passed, and review them by hand or think about tools that surface information. Böckeler raises the same question about sensors in general: a sensor that never fires means either good code or a broken sensor (harness engineering).
False negatives: hunt them
The agent doesn’t tell you about a real problem. This field is invisible by definition, which makes it the most dangerous. They often surface only after the fact: a production incident, a small change that suddenly touches dozens of files, a second review run that finds what the first one missed. Dijkstra’s point about testing applies to review agents too: a review can show that bugs exist, they cannot prove that they don’t.
A manual search through 100,000 lines for what the agent missed rarely pays off. Better tooling pays off more, because it makes the agent find more, more reliably.
And if you need absolute certainty you might as well invest into a formal verification of your problem. Otherwise you will need to live with the remaining risk, once again you need to trust engineers that they have built the right tooling and applied enough judgement. And if you don’t want to trust; Build it yourself. That is not new after AI, you could do it before, you can do it now.
The invisible field is biggest for architecture
Architecture here means the cost of change. Requirements shift and better approaches show up, so the software behind a product has to adapt. Bad architecture shows when a product barely moves no matter how much work goes in: the code lacks modularity and tests, and nobody can tell whether a change breaks the whole thing.
Review agents tend to miss exactly this kind of problem. Training and evaluation reward a pass/fail signal: If the test goes green, the issue closes. Tests cannot fundamentally measure whether a module boundary is right, and hardly any benchmark measures it (Adnan et al., 2026). Optimisation against tests teaches agents to satisfy tests. A re-check of supposedly solved SWE-bench issues found that 29.6% of the accepted patches behaved differently from the developer made fixes (Wang, Pradel & Liu, 2026). My thesis: The training signal rewards “how do I make this work?” over “is the architecture right?”.
Human gut feeling offers no reliable fallback either. Intuition earns trust only where feedback comes fast and clear (Kahneman & Klein, 2009), and architecture gives slow, implicit feedback. For architecture, the false-negative field is therefore likely the largest of the four, for agents and humans alike.
Rating the issues
Every confirmed finding gets one of three ratings, because attention limits the fix budget.
| Level | What it means | Response |
|---|---|---|
| Critical | Wrong now, with high impact: data loss, security, or an imbalance in a volatile core that every feature passes through | Fix now, with a human designing the change |
| Bug | Wrong now, but contained: incorrect behaviour with a small blast radius | Schedule it; an agent can fix it inside the harness |
| Debt | Works today, but coupling is out of balance and future change will be expensive | Record it; fix it when the area becomes volatile |
Balanced Coupling draws the line between Bug and Debt. Khononov’s model weighs three things: how much knowledge two components share, how far apart they sit, and how often they change (Balance).
BALANCE = (STRENGTH ⊕ DISTANCE) ∨ ¬VOLATILITY
└────── design ─────┘ └ change likelihood
Coupling passes if the design is balanced, or if the code rarely changes.
Volatility is a future prediction: A severe bug or a shift in business requirements can change it overnight. Low volatility therefore lowers priority but doesn’t remove the finding.
Every fix is also a change. Brooks estimated that fixing a defect carries a 20–50% chance of introducing another. A much later study of operating-system codebases measured it: 15–24% of sampled post-release fixes were themselves incorrect (Yin et al., 2011). Severity alone therefore cannot order the work; the reach of a fix and the test coverage of the area it touches weigh in too.
Shrinking the invisible field
The tooling around the review agent has one job: to move real problems from the false-negative field into the true-positive field. A follow-up article covers how. One candidate measure: seed known architectural flaws into a branch and count how many the reviewer finds. That count would give the invisible field its first number.
Conclusions and open questions
A review agent doesn’t remove human judgment; it moves it. Instead of reading 100,000 lines, a human now judges a more high-level list of findings that are partly wrong and partly incomplete. You should keep the four-field model in mind when acting on it:
- Act on true positives
- Record false positives
- Stare into the silence
- Hunt what’s missing.
Stacked reality checks shrink the errors that remain, but accept that they fundamentally can never reach zero.
Sources
- Birgitta Böckeler, Harness engineering for coding agent users, 2026
- Vlad Khononov, Balanced Coupling and Balance
- Parasuraman & Riley, Humans and Automation: Use, Misuse, Disuse, Abuse, Human Factors, 1997
- İçöz & Biricik, Context-Aware Code Review Automation, Applied Sciences, 2026
- Adnan et al., ArchBench, ICSA 2026
- Wang, Pradel & Liu, Are “Solved Issues” in SWE-bench Really Solved Correctly?, ICSE 2026
- Kahneman & Klein, Conditions for Intuitive Expertise, American Psychologist, 2009
- Brooks, The Mythical Man-Month, 1975, ch. 11
- Yin et al., How Do Fixes Become Bugs?, FSE 2011