Invariant-Aware Harness Enforcement to Protect LLM Agents from Silent API Failures: what it means for business leaders

SilentGuard moves the decision to trust an API result from the LLM agent to the harness that runs its tool calls, withholding any value that breaks an invariant a correct API must satisfy.

1. What the method is

SilentGuard is a set of checks placed in the agent harness, the code that executes an LLM agent's tool calls, instead of in the model. Each API result is tested against invariants that any correct API must satisfy. For a filtered count, the count with a condition plus the count with its negation must equal the count without it. For a list, every record must meet the filter, none may repeat, and the size must match the reported total. Every request parameter must appear in the API's published specification. A result that fails is re-checked once. If an exact check fails again, the harness withholds the value and accepts only verified answers, so the agent ends up reporting that the answer cannot be determined. Where only learned contracts exist, mined from clean responses, the harness warns and leaves the value visible. It never repairs a value itself.

2. Why the method was developed

An API can fail silently: it ignores part of a request, such as a misnamed filter, and still returns HTTP 200 with a plausible but wrong number. The authors probed 15 public research APIs and found at least one silent fault in 11. Ten ignored a misnamed filter and returned the unfiltered count, in one case 691 times too large, and 6 of 14 quietly returned fewer records per page than requested. The fixes in use today, which are checklist prompts, reviewer models, Outcome Monitors and LLM judges, leave the decision to the model. In the authors' tests each left more than 70% of answers wrong, against 74.0% for an unguarded agent. The fault was not going unseen. A judge shown the consistency check's results flagged 82.4% of faulted runs, yet agents reported the flagged count in 77.4% of those. Their stated confidence fell, and they answered anyway.

3. Who should care

Engineering teams that build agents on top of internal or third-party APIs are the first audience, because the change is to the harness they own and needs no model retraining or extra model call. Data and analytics leaders should care wherever an agent reports counts or record lists drawn from catalogs, search services or reporting endpoints, since a wrong figure arrives looking like a successful lookup. Teams that publish our own APIs have a direct instruction from the paper: reject unknown parameters and say when a page was cut short. Product owners need to plan for the consequence of enforcement, which is an agent that says a number cannot be determined instead of supplying one. Anyone buying an agent platform should ask the vendor whether tool results are checked in code or left to the model's judgment, because the paper shows that prompting and stronger models do not close the gap.

4. How the method works

After every filtered count query the harness itself sends the extra queries needed to test the count identity, repeating the test for each condition in the filter so that an ignored filter at any position is caught. A value-swap check flags a filter whose count does not change when its value changes, and the parameter check rejects a request with an undocumented parameter before it runs. Each check carries an estimated false-alarm rate derived from the number of clean examples it held on. Exact checks have a rate of zero, so a repeated failure leads to withholding. Learned checks never fell below the 1% cutoff in the authors' runs, so they only warn. When a value is withheld, the agent is told which values could not be verified and which other tool could redo the step. For counts, the harness rejects an unchecked count twice and then answers that the count cannot be determined.

5. How it was evaluated

The main benchmark, AgentOrchBench, is the authors' own: eight local REST services, 36 count tasks over 400 synthetic catalog records, two seeds, and six fault types injected inside the server that repeat on every call, graded exactly against seed data. A retail orders schema with four fault types tests transfer. Nine real public APIs, with five count tasks each, were run with documentation in which one filter name was altered. ToolMaze, built by others, contributed 180 workflows not used in design. Comparisons covered no guard, a caution prompt, self-verification, re-query, blind retry, an LLM judge, and the published checklist, reviewer and Outcome Monitors methods, plus ablations of the harness action. Seven open-weight models ran everything, and three GPT-5.6 frontier models ran a subset. Predictions were written down and code frozen by hash beforehand. The frontier runs were added later on Genentech's internal platform, without predictions or releasable logs.

6. How it performed

Across seven open models SilentGuard cut wrong answers on its target faults from 74.0% to 1.7%, with clean accuracy unchanged at 84.9%. On three frontier models wrong answers fell from 70.2% to 0.5%. A warning from the same check left 70.1% wrong. On real APIs wrong answers fell from 89.8% to 21.3%, a gain the parameter check achieved alone. The method abstains instead of recovering: correct answers under faults fell from 16.4% to 2.4%, and at a 25% fault rate it answers 67% of tasks with 3.3% of those answers wrong. On fault types written after the method was frozen, wrong answers fell only from 61.1% to 24.5%. Blind retry does better on faults that clear within a call or two, and self-consistent faults or filters embedded in query strings go undetected. Our call is to pilot: add the parameter and count-identity checks to our own agent harnesses where agents report counts or lists. (Source: arXiv 2611.20595, 2026)

← Back to dossier index