Est.

Tracing Degraded Output Quality Back to Swallowed Tool Errors Through Regression Replay

Replaying recorded runs pinpoints where tool errors vanish and tests the fix.

· 9 min read
Cover illustration for “Tracing Degraded Output Quality Back to Swallowed Tool Errors Through Regression Replay”
Regression Testing · November 15, 2026 · 9 min read · 1,995 words

Silent tool failure detection in production multi-agent pipelines requires checking whether calls completed and tracing wrong answers back to the tool results the agent consumed. A swallowed tool error can become plausible output without triggering an infrastructure alert. Regression replay turns that historical execution into a test that isolates the responsible harness layer and tests a fix before it ships.

Why degraded agent output is structurally different from an error you can monitor

An agent passes evals, enters production, and starts producing subtly wrong answers days later. No alert fires, and the service stays up. Latency, uptime, and error rate all describe a healthy system, while the output no longer satisfies the task.

Traditional observability catches errors but can miss wrong answers. An agent can produce a coherent response at every step and still fail as a system because those steps depend on one another. A successful call says little about whether its result supplied the right evidence for the next decision. In this setting, output degradation and a swallowed tool error are two ends of the same execution path.

Dexing Liu’s June 2026 study found silent failures occurring with “alarming regularity across different architectures, different models, and different task domains” in production observations spanning over 100,000 agent interactions. The problem therefore extends beyond a particular framework. A final answer that looks reasonable does not show which earlier dependency failed or whether the agent ever got a result it could use.

How the LLM converts a tool error into plausible output — the suppression mechanism

Consider a tool that returns data outside its expected schema. The framework drops the nonconforming output, while a catchall handler allows the next turn to proceed without a useful error signal. The LLM then continues without the evidence that the tool was meant to supply. It generates fluent text from the remaining context, concealing the missing result. The response looks complete, but its foundation is incomplete.

The suppression site is not necessarily the model. Framework error handling can remove the signal before the model receives it, while a tool can return defective content that passes structural checks. Sugam Panthi and Rabab Abdelfattah’s 2026 study describes a documented production incident in which a cached HTTP error page, consumed as content, became a confident fabricated analysis. In that path, the result arrives successfully. Its meaning, rather than its delivery, is wrong.

These paths fall into three distinct failure classes. Schema mismatch means returned data violates the contract, so retrying with the same arguments repeats the defect. Partial data is structurally valid but incomplete and may be recoverable through modified parameters. Semantic garbage is well-formed, complete data that is nevertheless wrong, such as a negative price that arrives in the expected format. Schema validation alone cannot detect that last class.

The distinction determines what recovery can accomplish. A retry cannot repair every defective result, and a valid schema cannot establish factual correctness. Once downstream steps use the bad input, each can make sense on its own while carrying the original error further. Liu’s study tracks how this disorder builds up as output consistency, task accuracy, and cross-session coherence decline.

Why the failure stays hidden long enough to become a regression problem

Silent degradation persists because the signals used to detect failure may remain normal. A model provider can change its serving infrastructure while calls still have the expected latency and token counts. Tool-call patterns can also change, and a schema anomaly can be visible in the trajectory several steps before the downstream reasoning failure. Without output scoring and trajectory inspection, neither change necessarily produces an actionable alert.

The trajectory is often the only decisive evidence. An agent can reason correctly at one step, select the wrong context at the next, and then act confidently on that context. Evaluating only the final turn loses the earlier constraint that makes the answer wrong. Context loss therefore delays detection as well as causing it, because the evaluator also needs the relevant history.

Wei Wu’s June 2026 study illustrates how extensive checks can still miss suppression. A production runtime with thousands of unit tests and hundreds of declarative governance checks silently vacated 67 checks for months, with all 67 executing vacuously. The defect became visible only when sabotage validation for a new invariant refused to fail. Executing a check had not established that it enforced anything.

By the time someone notices the output defect, the decisive execution is historical. The live environment may have changed, and a fresh run may take another path through the workflow. Re-running the original request tests how the agent behaves now, when the conditions that led to the incident may have changed. Diagnosis needs the recorded trajectory rather than another opportunity for the agent to succeed.

What regression replay actually does and what distinguishes it from re-running the agent

Regression replay turns a captured execution into a repeatable test by fixing selected inputs and tool outputs from the record. The agent’s logic runs against those recorded conditions, and the test evaluates what it does. A fresh run allows model responses, tool results, and environmental conditions to vary together, obscuring which change explains the outcome.

Chawla and Koul’s Chronicle, presented at REALM 2026, uses cut-point replay to set that boundary. It serves a chosen subset of execution boundaries from the record and executes the complementary subset live with new code. The recorded incident can then become a regression test in continuous integration. Crucially, the chosen cut points determine which behavior remains fixed and which implementation is actually exercised.

Chronicle’s mutation study shows why that distinction is consequential. Cut-point tests kill 51 mutants, while a full-stub baseline kills none because the tool never actually runs under the full stub. A test that replaces the defective implementation entirely cannot expose its defects.

Non-determinism makes boundary selection central to the test’s meaning. A recorded tool response can reproduce the problematic input without requiring the model to generate the same inference again. That isolates the execution layer under examination, but it does not establish that every aspect of a live environment has been reproduced.

How do you know which harness layer swallowed the tool error?

Attribution begins with a production trace detailed enough to preserve the failure path. The required evidence includes tool-call arguments, response payloads, and intermediate reasoning alongside terminal output. Without those spans, a wrong answer establishes only that the workflow failed. It does not distinguish a prompt defect from tool schema drift, memory loss, workflow logic, or framework error handling.

The next step is to cluster traces by recurring execution patterns so that a class of incidents can be investigated together. A schema anomaly followed by degraded reasoning calls for a different investigation from a trajectory that loses its goal despite valid tool results. The cluster defines which historical cases the proposed explanation must account for.

Attribution then proceeds through successive cut points. Replaying a recorded response against the current schema tests whether the mismatch exists at the tool-call boundary. Replaying individual steps against fixed upstream outputs helps locate where prompt ambiguity or context drift begins to compound. Moving the cut point narrows the suppression site by changing which layer runs while preserving the evidence supplied to it.

The loop taxonomy gives that location an operational meaning. L1 is the inner tool-call cycle, where schema mismatch, wrong tools, and bad arguments belong. L2 is the task loop, where task drift, context exhaustion, and shallow planning emerge. L3 is the orchestration loop, where trust violations, runaway loops, and missing coordination arise. These labels describe ownership.

Outcome Monitors supply a complementary detection signal. Panthi and Abdelfattah’s study mines outcome contracts from task-disjoint traces and issues a nonbinding advisory receipt when a result violates a contract property. The approach raises ToolMaze task completion to 28.1% across multiple model families, with the recovery-tool list as the active ingredient. Removing that list eliminates the gain. Such detection can identify a suspect result and support recovery, while replay tests where the harness failed to handle it.

The final diagnostic step is validation against the historical failure cluster. An explanation is not yet a shipping decision. The changed harness must fix the recorded pattern without causing regressions elsewhere.

What replay-based validation looks like before shipping a harness fix

Replaying only the most visible incident risks accepting a change that fixes one example while breaking an adjacent pattern. The validation set therefore includes the historical traces that exhibited the failure, together with known-good behavior. The test asks both whether the defect is resolved and whether the surrounding behavior remains acceptable.

Live traces can receive online evaluations, failing examples can enter datasets, and cases needing interpretation can be routed for annotation. Golden-set replay then supplies a fixed reference for comparing harness changes.

Output scoring also needs to examine the path. A trajectory coherence check can ask whether retrieved content was relevant to the task the agent subsequently executed. It can also ask whether a verification step occurred when the task type warranted one. These checks evaluate intermediate decisions that a plausible final answer may conceal. LLM-as-judge scorers support quality assessment, but terminal-output scores alone leave that gap open.

Production-side scoring complements golden-set replay by detecting distribution shift after deployment. Continuous scoring of sampled traces, grouped by time window and paired with alerts on score movement, tests whether quality holds as real inputs change. Replay evaluates a controlled reference, while production scoring evaluates the traffic the system now receives.

The honest limits of replay fidelity and what they mean for how to use it

Replay fidelity depends on what the record captures. Hidden state, environmental randomness, and gaps in the test oracle can prevent a replay from reproducing the original failure fully. Chronicle explicitly states that its simulated model boundaries validate the replay mechanism rather than reproduction under a nondeterministic provider. Its results therefore do not establish a general guarantee that a passing cut-point test proves a fix in a live, stateful environment.

Detection has a separate coverage constraint. Panthi and Abdelfattah’s study finds that detection outside the mined contract vocabulary falls to 46% on a suite transcribed from a published incident taxonomy, while delivery continues and task completion is unchanged. A monitor cannot be assumed to recognize failures absent from its contract vocabulary.

These limits define how replay should be used. The golden set needs active curation after deployment as new failure patterns are identified. Boundaries that hold tool responses constant are the most reliably replayable, while live external services reintroduce environmental variance. Replay-based CI gates and production trace scoring therefore provide complementary coverage. Neither supplies a sufficient standalone guarantee.

Treating trace-driven harness repair as an engineering discipline rather than a reactive firefight

Harness engineering applies testing rigor to everything around the model weights. That includes prompts, tool schemas, workflow logic, memory, evaluations, and failure handling. These components determine what the model sees, what it can touch, how steps proceed, and what persists between sessions. A swallowed error is therefore a concrete engineering defect.

The operational change is in how work enters the repair process. Recurring trace patterns become attributable clusters that can be prioritized, tested, and corrected as a class. Unit evals examine discrete steps before errors compound, while LLM-as-judge regression suites assess output quality and continuous production sampling detects drift between replay runs. Each layer has a distinct responsibility.

This discipline also allows improvement without retraining. A harness that loads an updated persistent memory file in future sessions can use trace signal gathered over time to change its behavior without changing model weights. That possibility does not remove the need for evaluation, because memory is itself part of the execution stack under test.

A repair is ready when the evidence supports its scope. The broken trace shows the conditions, attribution finds the layer responsible, and historical replay tests the proposed change before it ships. Production scoring then supplies the next set of cases as behavior shifts. Each incident strengthens the tests for the next harness change in a repeatable maintenance workflow.

Sources

  1. Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable
  2. Outcome Monitors: Recovery Affordances for Silent Tool Failures
  3. When Errors Become Narratives: A Longitudinal Taxonomy of Silent Failures in a Production LLM Agent Runtime

More in Regression Testing