Writing archive

When Should You Stop Auditing Your AI Agents?

A frozen acceptance gate and an 8-million-token review ledger from one work package across three versions

On October 8, 2026, I typed a message into my terminal to the coding agent running at the time:

"No rush on this task. Do a self-check: how much of the report is actually done? Are we just going in circles?"

The agent returned the actual state of the project: zero chapters of the research report had a first draft; 47 of the 48 planned charts had not been started, leaving one rough draft; all 145 Base-case forecast cells in the valuation model were empty. Our internal draft deadline was 22 days away.

That same day, the two coding agents I was using for the project, Claude Code and Codex, were deep into a third round of gate hardening and review. That round passed all 54 existing regression tests, yet 4 newly constructed adversarial test cases still slipped through.

I am a senior majoring in financial engineering, with no formal computer science training. I started this project wanting AI to help with equity research: reading hundreds of pages of filings, extracting financial data, and building valuation models. Financial modeling has a frustrating property: a single wrong number upstream can propagate through every formula without breaking anything. The balance sheet still balances, and Excel never throws an error. To keep the models from hallucinating or misreading figures, I kept adding layers until I had built a multi-agent audit pipeline: Claude Code and Codex handled independent implementation and cross-verification, Qwen and DeepSeek ran full reviews via API against structured fact tables and source evidence, and a SHA-256 file-fingerprint acceptance gate was designed to prevent unverified outputs from moving downstream.

With 22 days left, both agents were trapped in local optimization, polishing an audit subsystem while the core research remained far behind schedule. That day, I froze the gate at Patch 9b. In its handoff note to Codex, Claude wrote plainly: "So please do not do any more gate reviews."

Vacuous Truth and the Missing Threat Model

The three rounds of gate hardening started with a workflow breach on October 8. Before Codex had finished auditing the review infrastructure, Claude prematurely marked a work package as accepted. Rules written in CLAUDE.md and constraints enforced by code turned out to be two different things.

I put Claude on patching the gate and Codex on breaking it. The three regression suites contained 23, 13, and 18 tests, respectively. Once all 54 regression tests were green, Codex tried a simple exploit in an isolated test copy: it deleted original_source_pages and input_source_pages from the review request while leaving the fact data and derived inputs intact. Neither the coverage check nor the source-text depth check raised an error. The formal registration entry point allowed the review status to be marked passed.

Abstracted into simplified, anonymized pseudocode (not the actual project source), the logic looked like this:

def verify_evidence(request):
    for page in request.get("original_source_pages", []):
        if not matches_original(page):
            return False
    return True

When all source pages are removed, the loop never executes and the function returns True. Logically, this is vacuous truth; in engineering terms, it is a missing evidence-completeness check.

Experienced engineers will immediately point to JSON Schema, Pydantic, or property-based testing tools like Hypothesis. Required fields and non-empty lists take one line in a schema validator, and automated fuzzing beats having Codex craft counterexamples by hand. Even so, a non-empty check alone would not have solved the underlying problem. Even if one source page remained in the list, the gate still needed to know which pages were required for a given fact and its recursive dependencies. My code checked whether the submitted evidence was valid, without first deriving the expected evidence set from the dependency graph.

All four adversarial cases were synthetic tests run in an isolated environment. No models were called, and no real work package was falsely marked as passed. They exposed a design gap: without a threat model defined upfront, patching counterexamples one by one is a bottomless pit.

Three rounds of hardening fixed real bugs in the gate, yet they caught zero wrong financial numbers. I froze the gate at Patch 9b, logged the remaining flaws, and narrowed its scope to catching routine workflow mistakes (skipped reviews, version mismatches, or editing a file without re-verifying) rather than acting as a security boundary against deliberate falsification. That tradeoff would be hard to accept in a production system handling real money or irreversible actions. With 22 days left on a research deadline, I had to redirect compute and attention back to the core work.

Evidence completeness failure and proposed check
Evidence completeness failure and proposed checkView SVG

One Work Package, Three Versions, 8 Million Tokens

When I froze the gate, I was acting on schedule pressure. Later in the project, auditing the review logs and raw manifest.json files showed what full-package reviews were actually costing.

Across 23 work-package and version combinations, internal adjudication records logged 6,262 raw review comments: 292 upheld, 5,967 rejected, and 3 indeterminate. These numbers come from internal adjudication that relied heavily on AI. Because we lack a complete ground-truth set of all real errors, we cannot compute recall and can only examine the inputs and outputs in the recorded logs.

The clearest picture comes from a single large work package tracked across three consecutive versions (v05, v06, and v07):

Metric v05 v06 v07
Fact items / Chunks 505 / 102 518 / 104 537 / 109
Successful review calls 204 208 218
Input tokens 1,217,903 1,238,614 1,316,025
Output tokens 1,311,742 1,407,154 1,526,263
Total tokens 2,529,645 2,645,768 2,842,288
Cumulative API time (hours) 4.52 5.09 5.73
Raw review comments 1,523 1,714 1,660
Upheld review items 67 59 14
needs_new_version 8 24 0
no_data_change 59 35 14
Tokens per upheld item (~) 37,756 44,844 203,021
Tokens per needs_new_version (~) 316,206 110,240 — (0 items)

These three versions of one work package consumed 630 successful review calls and 8,017,701 tokens. Cumulative API time is the sum of individual call durations, not human hours or wall-clock time. These figures cover only successful review calls, excluding failed retries and downstream adjudication overhead. Since itemized billing records were not retained, input is measured strictly in tokens.

Review tokens and upheld items by version
Review tokens and upheld items by versionView SVG

Two patterns stand out in this ledger.

First, from v05 to v07, total token usage grew 12.4% (with output tokens rising 16.4%, from 1.31M to 1.53M), while upheld review items dropped 79.1%, from 67 to 14. Average tokens per upheld item rose roughly 5.38x, from ~37.8k to ~203k. By v07, the system spent 2.84M tokens and produced no findings classified as needs_new_version; all 14 upheld items were no_data_change. Output token usage increased while upheld findings declined. This single-project record fits a straightforward engineering hypothesis: when any fingerprint change triggers a full re-review, external models keep emitting 1,500 to 1,700 raw comments per pass, behaving like a relatively stable noise floor.

Second, supervision yield did not decline monotonically by version. From v05 to v06, needs_new_version items (which include metadata revisions as well as numerical errors) jumped from 8 to 24, dropping the average cost per revision-triggering item from ~316k to ~110k tokens. That rebound cautions against tapering review intensity linearly by version number, or treating a single zero-finding pass as sufficient proof to stop.

Tokens per upheld and revision-triggering item
Tokens per upheld and revision-triggering itemView SVG

Raw comment volume also does not map one-to-one to adjudication effort. By v07, we had added reuse on the adjudication side: out of 1,660 raw comments, 874 matched prior adjudications from v06 or supplemental packages and were carried over directly (all 874 were rejected). Of the 786 comments requiring fresh adjudication, 359 were batch-processed by the main session using scope rules, and 427 were checked against source documents by four subagents. None of the 14 upheld review items came from the reused batch, though we cannot confirm all 14 were brand-new issues. Even with adjudication reuse, the review side still paid full-package token costs on every pass.

Adjudication routing and reuse in v07
Adjudication routing and reuse in v07View SVG

Noise Sources and the Split Between Detection and Disposition

Reading the raw logs showed at least three sources of noise in the rejected records.

Some were genuine model errors. Qwen once claimed that a specific page of an interim report was missing basic and diluted EPS figures; checking the original PDF and the exact text payload sent to the model showed both numbers were intact, with no truncation. Others were scope mismatches: a work package scoped strictly to the main balance sheet was flagged for omitting supplier footnote breakdowns.

A third source came from our own parser. The script split coherent review paragraphs into fragments, producing standalone records like "Furthermore" or "This chunk title contains" that could not be evaluated as independent claims. Across five work packages, merging those fragments collapsed 57 raw records into 42 distinct comments.

Adjudication itself introduced error. Claude initially rejected all 57 of those records. Codex then ran a risk-based audit of early adjudications, sampling all high-risk items and a fixed-seed random sample of advisory items. Out of 21 sampled records, Codex agreed with 14, disagreed with 4 on scope statements and rationale, and marked 3 as unjudgeable fragments. Because this was risk-based sampling, 4/21 cannot be extrapolated into a 19% overall error rate for the adjudicator, but it showed that once comment volume hits the thousands, parsing, deduplication, and adjudication become error-prone production steps of their own.

In Google's work on the Tricorder static analysis platform (Sadowski et al., 2015, 2018; Software Engineering at Google, Chapter 20), any alert that developers do not act on is counted as an effective false positive, and new checks are held to a threshold of under ~10% to prevent alert fatigue. Our rejection rate is defined differently and cannot be directly compared as a multiple, but the operational failure mode is the same: when the vast majority of an audit channel's output has to be triaged and dismissed, the channel itself drains system attention.

Multi-model review did catch real problems. Checking the raw timestamps from October 8–9 separated Detection, Adjudication, and Remediation cleanly:

  • Oct 8, 22:22:52 (UTC+8): Qwen returned a review flagging a depreciation and amortization (D&A) definition mismatch in a US-listed company's financial data.
  • Oct 9, 00:46:57: DeepSeek returned a review pinpointing that an EBITDA proxy used D&A from the cash flow statement instead of the income statement, skewing the derived figure.
  • Oct 9 (timestamp not recorded, between DeepSeek's review and Codex's verification): Claude confirmed the issue against the source filing, restricted downstream use of the metric, and deferred the revision to a later version instead of requiring an immediate fix.
  • Oct 9, 01:38:23: Codex began an independent verification, overturned Claude's disposition, blocked acceptance, and required a new version.

Both D&A numbers were real figures from the company's filings; the error came from mixing accounting definitions. The external models detected the problem, and the adjudicating agent confirmed it. What failed was the consistency of the disposition policy: acknowledging an error, restricting downstream use, and blocking acceptance were treated as separate decisions without sufficiently clear rules connecting them.

A related risk in multi-agent setups is correlated failure. In Knight and Leveson's (1986) classic experiment on N-version programming, 27 independent versions written by individual students at two universities were run through one million tests; even though each version was individually reliable, coincident failures occurred far more often than an independence assumption would predict. In multi-agent workflows, model diversity alone does not guarantee evidence independence, and it cannot compensate for inconsistent disposition rules.

Decision 53: Reallocating Supervision

On October 22, I recorded Decision 53 in the project decision log and overhauled the review policy.

I dropped mandatory full dual-model review for new data. Instead, Claude and Codex independently extracted figures and cross-checked each other, with a university financial database serving as a second source. Qwen and DeepSeek moved off full-table scanning and onto targeted reviews, blind reviews, and critique.

That day, the targeted review covered seven passages carrying a human-judgment tag (internally coded CAPTAIN), focusing on core investment conclusions, economic reasoning, thesis pillars, and falsification conditions. I gave both external models only the verified fact sheet, had them critique the passages independently, then let them read each other's critiques before Claude adjudicated the findings against the source filings, with final research decisions remaining mine.

In hindsight, the allocation rule was simple: give mechanically verifiable facts to independent extraction and deterministic code; reserve external models for critiquing judgment-heavy conclusions, and keep final authority human. This change reduced the scope of mandatory reviews for subsequent data.

When Should You Stop Full Audits?

A static threshold, such as stopping full review when less than 5% of facts change, breaks down in financial research. Changing one key valuation driver matters more than editing a hundred footnotes, and the jump from 8 to 24 needs_new_version items between v05 and v06 shows that version numbers and prior-round counts are unreliable proxies on their own.

Economically, the decision compares the incremental benefit and incremental cost of full review (FF) over incremental review (II):

E[LI−LF]⏟Additional expected lossavoided by full review>CF−CI⏟Additional costof full review\underbrace{\mathbb{E}[L_I - L_F]}_{\substack{\text{Additional expected loss}\\\text{avoided by full review}}} > \underbrace{C_F - C_I}_{\substack{\text{Additional cost}\\\text{of full review}}}

Here, LIL_I and LFL_F denote the residual error losses under incremental and full review, respectively, and CIC_I and CFC_F denote their respective costs (compute, tokens, and adjudication attention), expressed in commensurate, monetized units. Assuming hard security and compliance constraints do not mandate a full audit, a full rerun is justified only when the expected loss reduction exceeds the added cost. In finance and critical software, a rare, severe error can justify thousands of checks, and compliance boundaries cannot be traded away for speed.

In practice, LL is hard to estimate directly. The inequality translates into four operational checks before launching another full pass:

  1. Open blockers: Are there unresolved high-risk definition disputes or open blocking items from the prior round? If so, do not stop.
  2. Blast radius: Are the edits confined to local items, or do they touch core assumptions, key valuation drivers, or upstream dependencies?
  3. Validity of prior evidence: Are the source fingerprints, recursive dependency sets, and deterministic reconciliation checks for untouched items still intact?
  4. Sufficiency of independent verification: Have the new or modified items already passed independent extraction, second-source cross-checks, or deterministic validation?

When all four conditions are satisfied, I would make dependency-driven incremental review the default, supplemented by targeted blind critique and independent sampling of unchanged sections. A material new finding, invalidated evidence, or an uncertain dependency boundary would trigger broader review.

The v07 results motivate this policy, but they do not validate it. We have not yet classified whether the 24 revision-triggering findings in v06 concerned modified or unmodified regions. Since LLM reviews are stochastic, repeated reviews of unchanged content may still uncover previously missed errors. I would therefore treat these checks as a proposed stopping policy to be evaluated in future experiments, rather than a proven optimal stopping rule.

If I were designing this system from scratch, I would focus on three things: define the threat model before writing validation code, using JSON Schema, Pydantic, and deterministic scripts to enforce schemas, recursive dependency sets, and accounting identities while saving LLMs for semantic judgment; replace full reruns with dependency-driven incremental reviews; and enforce explicit disposition rules so confirmed detections cannot be inconsistently deferred.

I am still learning software engineering fundamentals. Many of the traps I walked into here have decades of literature in software testing, static analysis, and audit theory. Walking through an 8-million-token review process on a single work package left me with a question I want to keep studying: when an organization is made of multiple AI agents with different capabilities, error modes, and invocation costs, how should we allocate limited supervision?


References

Note: This post is based on an anonymized AI-assisted financial research project. Code snippets are simplified, anonymized pseudocode. Engineering statistics are aggregated from internal project logs and manifests without an independent controlled experiment and are not a benchmark of individual models.