The Over-Verification Trap in AI Agents: Root-Cause Diagnosis Through a Plumbing Metaphor

    This article uses a plumbing repair scenario to explain why AI agents often make many tool calls without making progress. It breaks down four failure modes—hypothesis-space explosion, non-progress negative conclusions, repeated probing of unavailable tools, and goal drift under context compression—and presents a hypothesis-driven layered diagnosis framework. The article also provides a budgeted diagnostic loop, a persistent evidence ledger, and quantitative evaluation metrics for diagnostic agents.

    1. A Metaphor: Why “Fifteen Rounds of Diagnosis and the Water Is Still Leaking”

    Imagine a typical scenario: a pipe is leaking at home, so you call a repair technician. When he arrives, he does not check the water meter first. Instead, he runs a “full search,” fails, and switches to targeted probing. He then reports that humidity is high somewhere but stresses that this is not enough to determine the cause. Next, he confirms that water is flowing inside the pipe and wants to measure the flow rate. After the flow-rate measurement fails, he speculates that external magnetic interference is the cause. To verify the magnetic field, he measures the current location. When positioning fails, he switches to another satellite navigation system. After obtaining latitude and longitude, he decides he cannot trust them directly, so he observes facilities outside the window and listens to accents outside. Even after the context has been compressed, he is still working on “geomagnetic field strength.” You finally interrupt and ask, “Is the leak fixed?” He replies that he will confirm the root cause and perform a minimal repair, and that he will no longer measure flow rate, positioning, or magnetic fields. Half an hour later, he delivers his conclusion: some of the water delivered from the source has overflowed outside the supply system.

    This narrative feels uncomfortable because it accurately reproduces how many agents behave in real engineering tasks: dense actions, frequent tool calls, and rigorously cautious language, but no progress on the task itself. This is not a problem of insufficient capability. It is a problem of missing goal control and convergence mechanisms.

    2. Failure Modes: Four Reusable Diagnostic Conclusions

    1. Hypothesis Space Explosion Without Prior Ranking

    The phenomenon of “leaking water” may correspond to dozens of candidate hypotheses: a damaged pipe body, a loose joint, a failed valve, condensation, seepage from an upper floor, backflow from a drain pipe, and so on. If an agent verifies all hypotheses equally, the cost grows linearly or even exponentially with the number of hypotheses. A mature engineer ranks them by prior probability, verification cost, and information gain, and first tests hypotheses that can eliminate a large portion of the space in one step.

    2. Negative Conclusions Produce No Progress

    Many statements in the original scenario follow the same pattern: “This does not imply A, nor B, and certainly not C.” Such statements are logically correct, but they do not shrink the hypothesis space and are zero-information-gain actions. An efficient diagnostic loop should compress the candidate set at every step, not merely exclude a few extreme inferences. A simple criterion can constrain the process: after this round, has the number of candidate hypotheses decreased?

    3. Tool Capability Boundaries Are Repeatedly Probed

    Flow-rate measurement fails, positioning fails, and switching to another positioning system fails again. This mistakes “the tool is unavailable” for “more tools are needed.” The correct response is to mark that evidence channel as unavailable and switch to an alternative observation—for example, close the valve and check whether the meter continues to run—rather than trying another implementation on the same dead path.

    4. Context Compression Causes Goal Drift

    After compression, the agent retains the intermediate subgoal of “geomagnetic field” but loses the top-level goal of “fix the leak.” This is the most frequent failure point in long tasks: intermediate state is retained, while acceptance criteria are discarded.

    3. Engineering Convergence Framework: Hypothesis-Driven Layered Diagnosis

    It is recommended to model diagnosis explicitly as four layers and enforce top-down progress:

    • Phenomenon layer: Confirm that the problem truly exists and is reproducible (where the leak is, how large it is, and whether it persists).
    • Link layer: Use binary search along the data or water path (supply segments, upstream/downstream isolation).
    • Component layer: Locate the specific failed component within the locked segment.
    • Root-cause layer: Provide a verifiable causal explanation and output a minimal fix.

    Each layer requires decidability: a hypothesis must be falsifiable by a single observation. Non-falsifiable statements (such as “may be affected by the external environment”) should not enter the queue.

    1. @dataclass
    2. class Hypothesis:
    3. desc: str
    4. prior: float # prior probability
    5. cost: int # estimated tool-call/time cost
    6. probe: str # a single executable check
    7. falsifiable: bool # can be falsified by one observation
    8. def diagnose(goal, budget=12, hypotheses=None):
    9. queue = sorted(hypotheses, key=lambda h: -(h.prior * 100 / max(h.cost, 1)))
    10. evidence, used = [], 0
    11. while queue and used < budget:
    12. h = queue.pop(0)
    13. if not h.falsifiable: # discard zero-information-gain hypotheses
    14. continue
    15. result = run_probe(h.probe) # tool call
    16. used += h.cost
    17. evidence.append((h.desc, result))
    18. if result.settled:
    19. return minimal_fix(goal, evidence) # prioritize minimal fix
    20. queue = [x for x in queue if not result.excludes(x)]
    21. if all(r.blocked for r in evidence[-2:]):
    22. return degrade_gracefully(goal, evidence) # degrade if channel unavailable
    23. return report(goal, evidence, used)

    There are three key constraints: a hard budget cap, discarding non-falsifiable hypotheses immediately, and switching to a minimal fix as soon as one is available.

    4. Evidence Ledger: Externalize State to Resist Context Compression

    Do not keep state only in the conversation context. Maintain a structured ledger and persist it to a file or external storage so that it can be reconstructed before and after compression:

    1. goal: fix overflow outside the water supply system
    2. acceptance: meter stops after valve is closed, and overflow point is dry
    3. confirmed: [continuous flow in segment A]
    4. ruled_out: [condensation, upper-floor seepage]
    5. blocked: [flow-rate measurement channel unavailable]
    6. next: isolate by binary segmentation

    With the goal and acceptance fields, no compression will push the task back to “continue studying the magnetic field.” In practice, the ledger can be hosted in object storage or a configuration center, with logging and monitoring/alerting used to retain the full call trace for retrospective analysis of where divergence began.

    5. How to Evaluate a Diagnostic Agent

    Avoid using “looks like it did a lot of work” as the evaluation criterion. Instead, quantify four metrics:

    1. Root-cause hit rate: the proportion of tasks in which the correct root cause is provided within one task.
    2. Convergence rounds: the number of iterations from start to minimal fix; lower is better.
    3. Irrelevant action ratio: the proportion of tool calls unrelated to the current hypothesis, which should be significantly lower than the total number of calls.
    4. Minimal-change rate: whether the scope of changes involved in the fix is limited to the necessary set.

    A healthy agent trajectory should show a monotonically shrinking candidate set. If the trajectory shows long periods of lateral expansion, the constraint mechanism has failed.

    6. Conclusion

    Returning to the initial scenario: what the user wants is not a rigorous troubleshooting report, but a pipe that no longer drips. The value of an agent does not depend on how many possibilities it rules out, but on how quickly it compresses the problem to a fixable point and stops to act. Explicitly writing the goal, acceptance criteria, budget, and evidence ledger into the process is the shortest path from a “diligent bystander” to a “deliverable executor.” Such processes can run on general container platforms and task orchestration capabilities, with logging and monitoring systems providing observability, making them reusable in cloud environments for automated operations and development assistance.