Semantic Drift Sentinels That Flag Poisoned Tool Results Before Orchestrator Fanout
Semantic checks before the plan is written contain poisoned tool output cheaply.

Silent tool failure detection in production multi-agent pipelines requires semantic checks before tool results enter the orchestrator’s plan and verification inside the recovery loop. Embedding-based drift detection flags departures from safe behavior, while intent-grounded verification checks whether proposed actions serve the user’s request. These gates must precede fanout, with trajectory-level attribution and production-trace replay supporting diagnosis and validation.
Why a poisoned tool result is cheap to fix before the orchestrator writes its plan and catastrophically expensive after
The orchestrator’s plan is the shared substrate that every worker inherits. If a poisoned tool result shapes that plan, its influence enters every worker branch simultaneously. Correcting it requires replanning and restarting the affected branches.
Before that commitment, the repair remains local. A verification step can stop the tainted content, followed by a re-fetch or rejection signal, without launching workers from it. That asymmetry makes placement a design constraint. A detector that recognizes the same poison after fanout has already lost the opportunity to contain it cheaply.
VIGIL shows the choice this leaves between trust and isolation. Strong instruction-following can make models obey injected tool rules, but static defenses that sever feedback can collapse utility. Enforcement therefore belongs at the commit boundary, where feedback can still inform reasoning without becoming an unchecked shared plan.
What tool stream poisoning actually is and how it differs from prompt injection
Tool stream poisoning differs from direct prompt injection in the surface it controls. It targets tool definitions and runtime feedback that the agent treats as operational constraints, going beyond the information supplied in a request. A forged operational rule can redirect planning because the model treats it as a condition of successful tool use.
Tool definition injection places malicious instructions in a natural-language descriptor or JSON schema before any user query arrives. Runtime feedback injection uses forged errors or status codes to make the agent replan as the attacker wants. Implicit poisoning needs no invocation of the poisoned tool. Its dormant descriptor can steer the agent toward privileged tools that the attacker controls.
VIGIL shows that stronger instruction-following models can be systematically more susceptible to these rules. MemoryGraft extends the risk across sessions by implanting malicious procedure templates in long-term RAG memory. Its demonstration on MetaGPT’s DataInterpreter agent shows that a small number of poisoned records can dominate retrieved experiences on benign workloads when similarity governs retrieval without provenance checks. The contamination persists beyond the original execution.
ShareLock moves the threat toward coordinated multi-tool attacks. It distributes a malicious payload across tools using Shamir’s threshold scheme, leaving no single descriptor with a recoverable instruction. Checking each descriptor on its own will miss the attack. The combined tool stream must be assessed for what it induces the agent to do.
Why content-level scanning fails and what semantic drift detection does differently
Content rules cannot reliably generalize to attacks that remain plausible and well formed. A poisoned result may look like legitimate feedback at the token or rule level while changing the agent’s course. Syntax is not the deciding evidence here. Semantic drift detection instead asks whether the result’s meaning departs from the behavior that the user’s intent and a safe baseline would predict.
Zanbaghi et al. provide an embedding-based approach to that comparison. Their method uses Sentence-BERT to represent deployment responses and measures distance from a centroid constructed from safe-mode LLM responses. Canary baseline comparison adds known-answer probes to the monitoring loop, checking for response consistency shifts without modifying the model.
The study reports high accuracy with zero false positives on the evaluated backdoored model and processing under one second per query. That result bounds latency in the evaluated setting. It does not establish a universal false-positive rate for production tool streams, whose tasks and responses may differ from the study’s inputs. Comparison against expected meaning transfers to other settings as a design principle.
For orchestrator protection, that comparison must precede context commitment. The sentinel evaluates the tool output before it becomes material for plan synthesis. Distance can flag unusual behavior, but on its own it cannot show whether a plausible result supports an authorized next action.
Intent-grounded verification as the second layer of VIGIL’s verify-before-commit protocol
Embedding distance checks whether a result looks like safe responses, while intent grounding checks whether the proposed action fits the original request. A plausible deviation can pass a distance threshold. The second check needs a stable representation of user intent and the safety constraints that govern execution, which it can query. Similarity alone cannot supply that authority.
VIGIL establishes this pattern through its verify-before-commit protocol. Rather than directly executing an action suggested by tool output or runtime feedback, it generates a speculative hypothesis about the intended action and verifies that hypothesis before commitment. Failed verification does not freeze the workflow. The agent can backtrack and select another tool path, preserving dynamic replanning rather than enforcing a rigid plan-then-execute sequence.
The framework reports reducing attack success rate by over 22% against state-of-the-art dynamic defenses while more than doubling utility under attack compared with static baselines. It was tested using SIREN, a benchmark of 959 tool stream injection cases built around dynamic dependencies. An agent must still respond to legitimate feedback without treating every new tool instruction as binding.
Ambiguous intent complicates verification but does not require exact matching. Speculative hypothesis generation compares actions against an inferred intent envelope, with underspecified requests allowing wider acceptable ranges. The check remains grounded in the request. Embedding drift detection and intent verification thus provide complementary evidence, one about departure from safe behavior and the other about the legitimacy of the proposed action.
Where in the orchestrator-worker architecture the sentinel must be placed
Without a pre-commit gate, the results of tool execution go straight into orchestrator context, plan synthesis, and worker fanout. A downstream sentinel may detect the resulting deviation, but it cannot prevent workers from inheriting it. The sentinel must intercept results after tool execution and before the context-write operation that feeds plan synthesis. That location preserves the opportunity for local rejection or re-fetch.
In LLM-led execution with weak or partial argument validation, tool-result ingestion must enforce both schema and semantic constraints. The model cannot reliably reject plausible-but-wrong input unaided. In sequential pipelines, each stage’s output requires validation before becoming the next stage’s input, because quiet elaboration on a wrong premise can replace an obvious crash.
Truncation introduces a separate provenance problem at this boundary. Over-aggressive shortening can remove facts that a final answer cites, making the answer appear unsupported in the retained view. That appearance alone does not establish injection. Tracking the truncation operation is necessary to distinguish missing evidence from content that was never present.
Long-term memory has its own commit boundary. MemoryGraft shows why a check at the orchestrator leaves future sessions at risk if material it accepts becomes a poisoned procedure template in the vector store. Grafted Experience Drift formalizes mitigations including cryptographic provenance attestation at insertion, constitutional consistency reranking before retrieved memory is used, and memory sandboxing by session or trusted context.
How do you know if a tool call failed silently inside a multi-agent workflow?
Semantic silent failures can fit schemas, seem to answer the request, and still be wrong. Intent grounding alone cannot detect every such fault because consistency with a task is not the same as consistency with ground truth. A plausible false premise can therefore enter the plan without triggering an ingestion guard.
Fanout then compounds the undetected error across workers. Each branch elaborates on the same premise, so more completed work does not necessarily provide independent support for it. Exception handling offers no dependable signal in this case. Retries and error-rate monitoring deal with visible execution failures, but they miss responses that look valid while getting the meaning wrong.
A verifier-guided self-healing orchestrator extends semantic checking into recovery. When a worker returns an output, the verifier checks it before that output feeds back into orchestrator context. Verification becomes part of the recovery loop itself. The verifier-guided self-healing study reports full task success with zero silent failures under the controlled semantic fault model it tested, while non-verifying methods still have meaningful silent-failure rates.
That result is bounded by the evaluated fault model. It nevertheless establishes the architectural gap left by ingestion-only defenses, because later worker output can introduce or preserve a fault after the initial gate has passed. When a multi-agent pipeline returns wrong answers without errors, diagnosis must check whether semantic verification covers worker feedback and recovery as well as whether tool calls completed successfully.
Root cause attribution when a sentinel fires, from flagged result to specific failure layer
The flagged result identifies where a deviation became detectable. Its local trace may offer little reliable evidence about the originating fault. Attribution requires tracing the trajectory. Earlier prompt ambiguity, silent parameter coercion, or retrieval of a poisoned memory can all produce a later result that appears to be the immediate failure.
The practical response is to distinguish the responsible harness layer before choosing a repair. A parameter rename or type change can expose a frozen schema snapshot in the evaluation harness. In that case, schema contract enforcement belongs at tool registration. The sentinel’s semantic alert does not change the underlying contract failure.
Prompt ambiguity requires a different remedy from schema drift. An underspecified instruction may lead the model to select a plausible but irrelevant tool, making prompt clarification the appropriate correction. A workflow loop has another failure path. If forged feedback is treated as authoritative and triggers repeated calls, the repair belongs in retry circuit-breaking and error-message provenance validation.
AgentDebugX addresses difficult attribution through multi-turn root-cause diagnosis. Failures that cannot be localized in one trace reading are escalated to a diagnostic agent that produces an auditable report with evidence and a recommended fix. The approach reports substantially better exact agent-and-step attribution than single-pass baselines on Who&When. This connects detection to remediation rather than leaving engineers with an unexplained alert.
Replay validation before shipping sentinel changes, and why production traces are the only honest test bed
A fixed benchmark captures a snapshot rather than the live distribution of tool results, task contexts, and injection attempts. A sentinel tuned only to that snapshot can drift from serving behavior. The way context is assembled can cause this mismatch even before attacks change. If the evaluation harness supplies a different context from the serving stack, its semantic baseline can miss genuine deviations or flag legitimate responses.
Production traces give the evidence needed to test for this mismatch. The replay-first approach captures tool-call logs, intermediate orchestrator state, and sub-agent decisions so that a detection or miss can be followed through its trajectory. Replay then distinguishes harness, evaluator, and handoff failures. The aim is to identify which layer produced the deviation and why the sentinel responded as it did.
Before a threshold change or new embedding baseline ships, it should run against a stable golden dataset of historical traces containing both known-good and known-poisoned cases. Validation must produce a delta in pass rates, false-positive rate, and tool-call correctness. Those comparisons expose regressions that an isolated success cannot. Production tool-call distributions add a separate signal, because abrupt shifts in tool selection or call rates can indicate influence on planning that a fixed evaluation set does not reveal.
Sentinel thresholds, embedding baselines, and intent-grounding constraints therefore belong among versioned harness artifacts. They require the same review and replay discipline as prompt changes and tool schema updates. Protection is not a one-time configuration exercise. The repeatable production workflow is to capture execution, attribute deviations, and replay proposed corrections before allowing them to govern the next commitment.
Sources
- Detecting Sleeper Agents in Large Language Models via Semantic Drift Analysis
- VIGIL: Defending LLM Agents Against Tool Stream ...
- MemoryGraft: Persistent Compromise of LLM Agents via Poisoned Experience Retrieval
- Measuring What Tool-Using LLM Agents Actually Do: Structured Validation, Causal Error Propagation, and Fabricated Tool Use


