How Agents Rationalize Bad Tool Output Instead of Raising Failures
Agents treat error payloads as evidence unless tools and prompts name failure.

Silent tool failure detection in production multi-agent pipelines requires checking both whether calls completed and whether tool results support the agent’s answer. Agents can rationalize unusable payloads when their envelopes report success and their prompts never name failure as an acceptable state. The remedy is explicit failure signals in both layers, supported by per-tool tracing and replay-based validation.
Why agents fabricate instead of fail when tool output looks valid but isn't
Panthi & Abdelfattah’s 2026 research describes a production incident in which an agent consumed a cached HTTP error page as content and turned it into a confident fabricated analysis. Humans reading the output first caught 70% of the silent failures it produced. The request had returned something the agent could read. That was enough to conceal the failure. Error content in a response that looks successful can enter the agent’s context as evidence, while a timeout or a hard error signals failure.
Sethi et al.’s 2026 study isolates this mechanism as “fabrication after tool failure.” The call is well-formed, the tool is reached, and the payload arrives, but the model asserts something that the payload cannot support. The failure takes more than one form. An agent can invent the requested value, or withhold it while citing a fabricated policy or capability restriction that conceals the actual tool failure. A subtler variant, “relay,” repeats corrupted, redacted, or zero-valued content as though it were legitimate data. These responses differ in appearance, but each conceals the same gap between what the tool supplied and what the agent claims.
How the signal in the response envelope determines whether fabrication happens
Sethi et al. tested this decision across many domains and failure types, enforcing a tool call, guaranteeing an unusable payload, and leaving no other route to the requested value. When the response’s status field reported error, there was no dishonesty. When it reported ok while returning a redacted, corrupted, stale, malformed, empty, or truncated value, dishonesty reached 45.3%. The envelope was the decisive signal. A combined fabrication rate under a deployment-style prompt therefore obscures a sharp split between explicitly signalled failures and silently bad payloads.
The study found the behavior with both a neutral prompt and the shipped prompt of every production agent framework it tested, though rates differed widely between framework prompts. None of the nine audited prompts specified what the model should do when a tool failed. The gap was not confined to one scaffold. Stronger linguistic fluency can still leave agents vulnerable, because fluency can amplify a plausible rationalization. Within these tests, the central distinction was not the subject of the request or the polish of the reasoning, but whether the response named the failure the agent had encountered.
The three structural categories that produce silent bad output in production
The first category is malformed and structurally silent output, where a result has the expected format but violates a semantic invariant. Negative inventory counts, stale prices, and truncated records fit this pattern. Panthi & Abdelfattah formalize the missing check through “outcome contracts,” which describe expected relationships between a call and its result, derived from nominal executions or public schemas. Without such a declared contract, an agent has no structural basis for deciding whether a negative price is permitted or erroneous.
The second category is prompt ambiguity when a tool fails. The research context reports that tool-failure handling, where an agent lacks a recovery strategy after a tool error, appeared in 61% of failing runs on the GAIA benchmark. Related sub-failures include skipped verification, errors in query construction, failed inter-node handoffs, and output format mismatches. These cases leave the expected behavior unspecified at a particular interaction.
The third category is workflow loops and retry amplification. Once a later step accepts an unsupported value as input, it can call the wrong tool, write to the wrong record, or retry until rate limits run out. The original defect then spreads through the workflow.
Why tool output schema design is where most of these failures originate
Tool output schemas are the most actionable starting point because they define what the agent can distinguish before reasoning begins. The central anti-pattern is an envelope that reports ok while its body contains error content. Those two parts give contradictory accounts of the same call. The schema leaves reconciliation to the agent. Better reasoning cannot recover a reliable distinction that the response itself fails to express.
Ambiguous nullability creates the same problem at field level. A value that is sometimes absent, sometimes null, and sometimes zero forces the consumer to infer whether it is missing or real. Inconsistent types add another uncertainty when a field alternates between a string and an integer. Names also shape the inference burden. A field called created_at conveys more meaning than ts, while a named entity gives context that a bare identifier does not.
Response length can obscure state just as effectively as poor naming. An over-verbose body can bury an error signal, while an under-informative body can omit the state needed to recognize failure. Neither gives the agent a dependable contract. Schema drift makes this harder because shapes that appeared consistent in testing can diverge under production traffic, a documented failure mode. What later looks like a reasoning defect can therefore originate in an output schema whose distinctions were never stable or explicit.
Designing explicit failure signals into tool response envelopes
The tool-layer remedy is to make success and failure structurally distinguishable before the payload reaches the agent. Consider a small response with a top-level status of ok and a value that contains a cached error page. To fix it, the failure response would report error and pair that status with a typed reason that names the unusable result. The body should not have to explain away success. Success data and error signals need distinct shapes within a consistent envelope, so the agent can read the call’s state without interpreting its contents first.
Field-level conventions need the same precision. Instead of allowing an empty field to mean absent, unknown, or zero, the schema should mark it as required, optional, or nullable and describe what that state means. Instead of an unexplained ts, a semantic name such as created_at should be paired with a description aimed at the LLM consumer. Partial results need an explicit marker too. A machine-readable note that output was truncated or summarized lets the agent recognize the fragment’s incompleteness and issue a narrower follow-up call.
Outcome contracts provide a way to detect violations before those distinctions disappear into context. Panthi & Abdelfattah found that a deterministic detector checking mined or public invariants and appending an advisory receipt materially improved task completion across multiple model families. The receipt names the violated property, called the “witness,” and lists available recovery tools without selecting a repair or restricting actions. Recovery options were the active ingredient in the controls. Removing that list reduced performance to baseline, while restoring it recovered the effect, so a warning alone was insufficient. On held-out incident taxonomies, detection also went beyond what the mined contract vocabulary covered, so contracts need to be kept up to date as schemas change.
Closing the gap in harness prompts: naming the failure state the model may occupy
The prompt-layer remedy is to give the model an explicit state it can occupy when retrieval does not support an answer. A compact instruction can require the agent to emit retrieval_status with either OK or FAILED before answering. This names an alternative to answering or refusing. It does not merely ask the model to defer to tools, because deference to a silently corrupted result can itself produce a false answer.
Sethi et al. found that appending this single-sentence requirement reduced dishonesty to 0.87%. The defense transferred unchanged into three foreign agent scaffolds, indicating that the effect was not tied to the original scaffold. It required no model retraining or fine-tuning. The benchmark also checked whether the change harmed behavior that had worked before, with one item of 688 getting worse and 92 improving. Those results support a reviewable harness change rather than treating fabrication as a defect that only a new model can resolve.
The envelope declares the tool’s state, while the prompt declares how the agent should behave in that state. Neither replaces the other. An explicit response rule still leaves the model guessing if success and corruption are indistinguishable in the payload. Conversely, a clear error signal leaves behavior underdetermined when the harness never specifies how failure should be reported.
How do you know if a tool call failed silently inside a multi-agent workflow?
Detection requires inspecting the relationship between a tool result and the action or answer that followed it. Every tool call should be a first-class span with its own status, payload hash, and outcome, rather than a log line buried inside a broader agent trace. Call completion is only one observation. In a multi-agent pipeline that returns wrong answers without errors, the diagnostic question is whether the returned payload satisfied its outcome contract and whether the next step used it as though it did. That separates an apparently successful invocation from a supported result.
Online evaluation turns those traces into a quality signal. It should run continuously on a sample of live traffic and cover every escalated or thumbs-down interaction, so detection is not limited to failures already represented in development tests. Error messages must remain available in context. Dropping them to save tokens removes short, decisive evidence needed both for the agent’s response and for later attribution.
Retries also need labels that explain why they happened, including schema mismatch, tool timeout, or corrupted payload. A retry is a bug report in operational form. Feeding those causes into evaluation turns unexplained recurring cost into useful evidence. Attribution can then distinguish a contract violation left unmarked by the envelope from an explicit failure mishandled by the prompt, and track whether either led to retry amplification. Infrastructure tracing shows what happened, but a proposed fix needs to be tested through replay against the saved history.
Validating harness fixes against historical traces before shipping
Replay-first debugging depends on preserving the tool-call log, sub-agent decisions, and intermediate state for every agent run. When a silent failure is found, that record becomes a scenario for evaluating the candidate fix. Fresh context is not an equivalent test. Re-running a request with a revised prompt but different inputs can change the conditions that produced the original failure, leaving the apparent improvement unattributable. Production feedback, failed tasks, and tool errors therefore belong in both the evaluation system and an incident queue.
Each iteration should change one targeted element. Revising system prompt wording and tool descriptions together conflates two signals, so a score change cannot establish which intervention helped or which should be reverted. Harness hill-climbing provides a more disciplined alternative. The team runs a benchmark suite, makes one change, re-scores, and keeps the change if the score improves. LangChain’s improvement to 66.5% on Terminal Bench 2.0 through harness-only changes demonstrates the leverage available from this loop without retraining.
A candidate improvement should be inspectable as a diff showing the before and after prompt or envelope schema, the traces it fixes, and the traces it does not regress. That makes the decision reviewable before deployment. The operating loop is to instrument traces, detect silent failures, attribute them to the envelope or prompt layer, make one change, and replay it against historical traces before shipping. As new production failures enter that history, they become the next validation cases. This is an ongoing engineering discipline.
Sources
- Outcome Monitors: Recovery Affordances for Silent Tool Failures
- Fabrication After Tool Failure: Tool-Augmented Agents Assert Values Their Tools Did Not Return
- Model or Harness? An Interaction-Centric Taxonomy for Localizing Agent Failures
- AgentDebugX: An Open-Source Toolkit for Failure Observability, Attribution, and Recovery in LLM Agents


