Est.

Regression Gates That Quarantine Poisoned Tool Results Before Pipeline Fanout

Deterministic checks outside the model keep one bad tool result from spreading.

· 9 min read
Cover illustration for “Regression Gates That Quarantine Poisoned Tool Results Before Pipeline Fanout”
Regression Testing · November 19, 2026 · 9 min read · 1,949 words

To detect silent tool failures in production multi-agent pipelines, checks must run outside the model’s reasoning path. Regression gates validate tool results before context ingestion, inspect proposed writes before execution, and prevent contaminated observations from entering persistent memory. Their purpose is to keep one bad result local rather than let downstream reasoning amplify it, while recording enough evidence to diagnose the failure and test the correction.

Why tool output poisoning becomes a pipeline-wide problem, not a local one

A runbook tells an agent to update a DNS record with a “deployment check” value read from a local file. Reading the file and updating the record are routine operations. But the value is the server’s API credential. Neither operation reveals the harmful sequence when judged alone, because the violation depends on where the data originated and where it goes next.

That dependency makes contamination an architecture problem. Untrusted content can influence tool arguments, stale memory can shape a privileged action, or an agent can invoke a tool outside its intended boundary and put its output into shared context. Once the result enters context, the reasoning that follows builds on the poisoned premise. In multi-agent pipelines, accuracy can remain stable before a poison write and degrade monotonically afterward, consistent with failure amplification across connected stages. The containment boundary must therefore interrupt propagation.

Schema drift as the most common unintentional poisoning path

Most production tool poisoning comes from schema drift that the evaluation harness never encounters. A downstream team renames attendee_emails to invitees and updates its service, while the harness continues testing against a frozen schema snapshot. The evaluation still passes, but the live agent proceeds with output that is structurally valid and semantically wrong. Successful execution is not evidence of a valid interpretation.

Qian et al. (2026) show that a schema change’s propagation boundary depends on persistent user state. A power user with stale API memories and learned reporting skills may regress across unrelated analysis workflows, while the same change is harmless for a light user. The changed API is only the starting point.

Zhu et al. find that API Misuse and API Incompatibility together account for more than half of reported failures in LLM-agent frameworks, concentrated in the execution-heavy self-action stage. Freshness creates a related risk because a tool response without freshness metadata gives the agent no reliable basis for distinguishing a stale observation from a current fact. Neither problem requires a tool exception. The pipeline can finish cleanly while working with the wrong data.

How do you know if a tool call failed silently inside a multi-agent workflow?

The hardest failures leave the downstream state wrong even as the agent says it has succeeded. In a policy-permissive environment, a tool executes any well-formed call even when domain policy forbids the corresponding state transition. Compliance then depends on the model applying every relevant rule before every write. The tool does exactly what it was asked. Its successful response says nothing about whether that request was permitted.

Reddy et al. (2026) found that 78% of observed failures on a budget agent in the τ2-bench airline domain were silent wrong-state failures with no tool error. The aggregate failure rate reproduced across disjoint seeds, ruling out sampling noise. An operator can therefore see a clean transcript and a successful final response while the underlying state violates policy. Neither the tool status nor the agent’s self-report exposes the violation.

A stronger model makes this less likely, but the risk remains. The same study found that frontier-tier agents still tried to make writes that broke policy at default reasoning settings. Diagnosis requires checking whether the proposed transition satisfies domain policy against current state. That check must sit outside the model’s reasoning path, at the boundary before execution.

What regression gates actually are and where in the pipeline they belong

A regression gate is a deterministic, out-of-model check that inspects a tool output or proposed action at a pipeline boundary. It runs before the result enters context or a write executes. The separation is the essential design property. Deterministic checks have no LLM in the decision path, so the evaluated content cannot persuade a model to disregard the check. The grounds for a decision can remain attached to execution evidence for forensic replay.

Placement determines which evidence the gate can inspect. A tool-output gate runs after a tool returns but before the result enters reasoning context, where it can check schema, freshness, and provenance. A pre-execution action gate inspects a proposed call before commitment and can compare it with current database state. A memory gate examines a write before persistence, preventing a contaminated observation from becoming a durable premise for future runs.

The harness is the natural instrumentation point because it assembles context, registers capabilities, dispatches calls, and manages delegation. It already spans all three boundaries. Gate engineering can enforce checks there without changes to tool code or model weights. Gate design depends on which transition needs protection and which evidence is available there.

Diagram: Where Regression Gates Sit in the Pipeline. Visualizes: Show three named gate positions as a left-to-right pipeline sequence: (1) Tool-Output Gate — runs after a tool returns but before the result enters reasoning context, checking schema…

Four implemented gate architectures and what each one protects

Tool-Guard uses a quarantine-list approach to stop one tool from influencing another. When an invocation is detected as misaligned or suspicious, the tool enters an “influenced list” that restricts further propagation while still allowing its use in support of the task. Quarantine does not mean complete tool removal. Its reported overhead is 1.5× tokens over the no-defense setting on the AgentDojo and ASB benchmarks.

AGATE makes joint authorization and data-provenance judgments at instrumented harness boundaries. Authorization remains tied to its issuer and scope, while checks retain the origin of reused material. A claim of approval in untrusted content cannot create a grant. Adapters integrate DeepSeek Harness, OpenCode, and OpenClaw without modifying host code, applying the gate across both data transfers and the actions they support.

PROVISO places its controller after the agent proposes an action and before that action executes. It decides which action to commit by tracking whether the action’s content originated with the user or with external sources such as tool outputs. This provenance-aware pre-commit design protects the point where an observation becomes an attempted change.

ChannelGuard separates protection by channel through a tool-output gate and a memory gate. Its tool-output gate, IB-3, blocked all 30 tool-poisoning attacks across GPT-5, Qwen, and Llama in controlled tests. Its memory gate blocked most memory attacks on Qwen and Llama, but far fewer on GPT-5 because Azure’s filter or the model often stopped them first. Tool-Guard and ChannelGuard protect tool-return paths, PROVISO protects proposed actions, and AGATE binds authorization to data origin across the action sequence.

The precision problem: gates that fire wrong are a reliability failure of their own

A gate can block legitimate work as well as contamination. False blocks make the system less reliable even when the results improve overall. When Reddy et al. checked each gate, they found that one had perfect precision across many fires, while another fired dozens of times with only a handful of true blocks. A suite-level success rate conceals that difference. Each policy needs its own precision assessment.

Model changes can expose a different set of costs. The same study found frontier-tier tasks that both fired gates and lost ground, indicating genuine gate-related harm despite larger gains elsewhere. AGATE’s evaluation also reported denials in six of eleven file-processing scenarios that were benign. Provenance checks can therefore obstruct legitimate reuse when their rules do not distinguish it from poisoned reuse.

The decision boundary needs auditing. Legitimate normalization or reformatting can trigger an unexpected pattern, while correct reuse in a new context can inherit suspicion from an earlier one. Gaps in what the gates can observe let compound attacks spread across several steps go unseen. Teams should track per-gate fire rate, true-block rate, and false-block rate, audit changes in model behavior, and retire gates below an operational precision threshold. These costs call for gate engineering.

Connecting gate decisions to root-cause attribution across the trace

Quarantine contains immediate damage but does not explain its cause. A block without supporting evidence leaves the team unable to distinguish a schema mismatch from a memory problem or a policy violation. The place where failure surfaces may be far downstream from its origin. Gate records must therefore identify the rejected result and support attribution across the trace.

AgentDebugX organizes debugging into Detect, Attribute, Recover, and Rerun. When a gate fires, it provides the detection event, and the reasons it records provide evidence for attribution. The framework identifies a limitation of trace replay alone, which offers little help in locating root causes or translating diagnosis into recovery. A visible sequence is not yet an explanation. Without decision evidence, the later recovery and rerun stages become guesswork.

AgentRx distinguishes nine root-cause categories across diverse domains, with different categories pointing to different repairs. Planning failures can implicate the system prompt or model reasoning, tool and schema failures the harness, and workflow loops the planning logic. To support that distinction, gates should emit structured records naming the responsible layer, including prompt, tool, workflow, memory, or model, with the block decision. Retaining the decision grounds and execution evidence lets attribution operate at trace level without relying on manual log review.

Replay-based CI as the operationalization of regression gating

A gate tested only when it is introduced will drift as its pipeline changes. Replay-based CI makes its behavior a recurring engineering test. The harness provides a repeatable way to define golden tasks, replay tool calls deterministically, score outcomes against rubrics, and block regressions. Those tests must link back to production traces. Otherwise, the suite can remain internally consistent while losing contact with the outputs it is supposed to validate.

Teams can start with one recorded golden run, replay it in CI, and deliberately sabotage it once to show that it gets rejected. A harness that cannot fail that run is not evaluating the boundary. For drift detection, the CI pass should take the dominant fingerprint from the last 24 hours of production traffic and force the evaluation harness to load that exact composition. Running the golden set against it exposes schema changes, version bumps, and index updates that a frozen setup misses.

Before deploying a model change, a per-gate precision audit in CI can reveal rules that overblock the replacement model. ReHarness addresses a related limitation by supplementing forward information flow with backward revision under a strictly online streaming protocol. That approach can adapt coverage to live traffic without a separate replay dataset. For replay-based CI, however, golden runs should derive from real production traces, because synthetic scenarios do not capture the actual distribution of tool outputs.

Harness engineering as the durable answer to tool contamination

A production agent consists of a model and a harness, including its prompt template, tools, memory, planning, and verification logic. Contamination often originates in those surrounding components. Retraining does not repair a stale schema assumption, supply missing freshness metadata, or install a pre-execution policy check. The durable response is to change the mechanism that admitted the invalid result.

Self-Harness (2026) describes a loop that uses evidence of behavior to make minimal changes to the harness, each tied to a specific failure mechanism. Tasks produce execution traces with verifiable outcomes, which then inform modifications. That constraint gives gate changes an auditable basis. Allowing an LLM to rewrite arbitrary harness code would weaken auditability, so changes should remain reviewable, limited, and connected to failure evidence.

Tool schemas should be declared and validated before ingestion, freshness should be explicit, and data origin should remain available to authorization checks. Precision and recall should count as much as test coverage. When a gate change has a stated policy, trace evidence, and a replay test that can reject it, incident containment becomes a maintainable property of the pipeline.

Sources

  1. AGATE: Provenance-Based Runtime Defense Against Compositional Attacks on LLM Agents
  2. Reason Less, Verify More: Deterministic Gates Recover a Silent Policy-Violation Failure Mode in Tool-Using LLM Agents
  3. Toward User-Conditioned Evaluation of Personal LLM Agents under Temporal Interventions
  4. Compositional Threat Analysis of Latent Compromise in LLM Agent Systems: The Order 66 Scenario
  5. ChannelGuard: From Borrowed Safety to Application-Controlled Defenses in Multi-Agent LLMs
  6. AgentDebugX: An Open-Source Toolkit for Failure Observability, Attribution, and Recovery in LLM Agents
  7. TelemetrySuffBench: Is Agent Telemetry Sufficient for Failure-Origin Diagnosis?

More in Regression Testing