Skip to main content
Back to timeline
arXivSource publication:

Agents can read an API that quietly answers the wrong question: SilentGuard moves the verdict into the harness, cutting wrong answers from 74.0% to 1.7%

Synopsis

SilentGuard moves the decision of whether a tool result can be trusted from the model to the harness that runs tool calls: the harness tests each result against invariants any correct API must satisfy and withholds values that break an exact one. Across 7 open models it cuts wrong answers on its target faults from 74.0% to 1.7% with clean-task accuracy unchanged at 84.9%, and on three frontier models from 70.2% to 0.5%. It avoids wrong answers by abstaining rather than recovering, and on fault types its checks cannot see, wrong answers fall only from 61.1% to 24.5%.

AI-generated editorial illustration: Invariant-Aware Harness Enforcement to Protect LLM Agents from Silent API Failures

Interpretation

When an agent calls an API, one kind of failure leaves no trace: the API ignores part of the request, such as a misnamed filter, yet returns HTTP 200 and a plausible but wrong number. SilentGuard moves the final decision on whether to trust that result from the model to the harness, which withholds values that fail a check. Earlier fixes left the judgment to the model: checklist prompts, reviewer models, Outcome Monitors and LLM judges all ask the model to catch the problem. Under the same faults those methods leave wrong answers close to the 74.0% of an unguarded agent, at 72.3% for the checklist, 73.8% for the reviewer and 72.2% for Outcome Monitors. On AgentOrchBench, with 7 open models and 2 seeds per fault type, SilentGuard cuts wrong answers from 74.0% to 1.7%, at most 4% on any model, while clean-task accuracy stays at 84.9%, the same as with no guard; on three frontier models wrong answers fall from 70.2% to 0.5%.

The harness runs two kinds of check on every tool result: exact checks hold on any API that applies its filters correctly, and learned checks mine contracts such as field type, echoed arguments and value range from clean responses. A failing result is re-checked once, and if it fails again the harness withholds or merely warns according to how certain the failed check is. For count queries the exact check is a count identity: the count with a condition plus the count with its negation must equal the count without it, and the harness issues those extra queries itself, so no extra model call is needed. For list queries every returned record must meet the filter, no record may repeat, and the list size must match the reported total. Of 15 public research APIs, 11 show at least one silent fault, and 10 answer a plausibly misnamed filter with HTTP 200 and the unfiltered count, inflated up to 691 times; on nine real APIs given slightly wrong documentation, wrong answers fall from 89.8% to 21.3%, while the parameter spec check alone reaches 21.0%.

SilentGuard avoids wrong answers by abstaining rather than repairing: under faults it mostly answers that the count cannot be determined, so correct answers fall too. On six fault types written after the method was frozen, the harness alone cuts wrong answers from 61.1% to 24.5% and correct answers from 38.9% to 19.0%; auto-repair recovers more true counts on the faults it was built for but released 49 wrong answers marked as verified on new faults. At a 25% fault rate SilentGuard answers 67% of tasks with 3.3% of its answers wrong, against 90% coverage at 24.6% risk with no guard and 66% coverage at 6.1% wrong for the LLM judge with evidence and blocking.

Perspective

The findings rest on count and list answers, the purpose-built AgentOrchBench and a retail schema, nine real public APIs and the externally built ToolMaze, with 7 open-weight models and 3 frontier models from one vendor; the real-API study sent only read-only GET requests, and fault injectors ran only on local test services.

Faults consistent with themselves, such as prefix matching or a consistent lie, pass the count check, and a filter the agent never sends cannot be checked; the count identity assumes two-valued filters, estimated or shifting totals can break it, and it held on only 25 live queries. Under faults SilentGuard mostly answers that the count cannot be determined, giving the user no number; blind retry does better on faults that clear within one or two calls; and the frontier runs on an internal platform cannot be released or recounted.