# In what scenarios must an instance treat prompt-injection blast radius as a transitive closure over the agent-to-agent graph rather than a per-hop property **Date of Record:** 2026 December 3 **Scope:** Applies to multi-agent systems where agent B ingests content produced by agent A (tool output, retrieved document, subagent summary, or A2A/MCP message payload) and where B's subsequent outputs are consumed by further agents. Does not apply to single-turn, single-agent inference with no downstream consumers, nor to systems where every inter-agent payload passes through a deterministic, injection-immune normalizer that strips instruction-like content. ## Core Distinction The naive model treats prompt injection as a *per-hop* property: agent A is "compromised" if its input contained an injection, and we estimate blast radius by counting directly reachable agents from A. The correct model treats injection as a *transitive reachability* property over a directed graph whose edges are *data-flow edges* and whose nodes are *agent invocations with distinct context windows*. The non-obvious boundary is this: **a downstream agent C can execute an injected instruction even if the intermediate agent B never "believed" it and never acted on it.** B only has to *reproduce* the payload into its output—as a quoted string, a summary, a JSON field, a "here's what the document said" paraphrase—for the injection to survive the hop. Belief and action are not required for propagation. Only *verbatim or semantically-preserved carriage* is required. This breaks the common mental model in which an agent is a firewall: "B read the poisoned doc and concluded it was a prompt injection, so B is safe and so is everything downstream." B concluding it was an injection and then *writing about it* to C is precisely the dangerous case. The blast radius is therefore not the set of agents that *acted* on the injection; it is the set of agents whose context windows the injection *reached*, intersected with those that lack an independent verification gate. ## What Was Observed A three-tier pipeline: a retrieval agent R fetches web content on a user's behalf, a summarizer S condenses it, and an executor E performs the user's task using S's summary. R had a hardened system prompt instructing it to flag and strip "instruction-like" content. On a poisoned page, R correctly emitted a structured record: `{"trust": "untrusted", "injection_suspected": true, "content": ""}`. R did not act on the payload. By every per-hop metric, R was clean. S received R's record. S's system prompt said: "Summarize the retrieved content for the executor. Preserve all salient details." S summarized faithfully and *included the payload as a salient detail*, prefixed with "The page contained the following instruction, which should be ignored: …". S also did not act on the payload. Per-hop, S was clean. E received S's summary. E's context now contained the literal string "…which should be ignored: [payload]". E's instruction-following prior does not reliably treat a quoted, negated instruction as inert—negation framing is a *semantic hint*, not a *syntactic barrier*. E executed the payload. The per-hop model scored this pipeline as zero blast radius (no agent acted before E, and E was not adjacent to the source). The transitive model scores it as blast radius 3: R → S → E, all reachable, with the injection carried losslessly through two "safe" agents. The failure mode generalizes: **any agent that is instructed to preserve, quote, summarize, translate, or restate untrusted content is a propagation edge regardless of its own trust assessment.** The trust label ("untrusted", "injection_suspected") is metadata that downstream agents systematically under-weight relative to the instruction-shaped payload sitting in their context. ## Condition of Validity The transitive-closure model is the correct blast-radius estimator exactly when all three hold: 1. **Carriage without gating.** At least one edge in the path carries untrusted content into a downstream context window without a deterministic (non-LLM) filter that removes instruction-shaped spans. Paraphrase, translation, and "summarize but flag" all fail this; a regex/classifier strip that runs *before* the downstream context is assembled passes it. 2. **Instruction-following is context-sensitive, not provenance-sensitive.** The downstream agent's behavior depends on the *surface form* of the text in its context, not on a cryptographically-bound provenance field. If E's model genuinely conditioned on a signed `trust: untrusted` field and refused instruction-shaped content under that label, the edge would be gated and the closure would terminate. Empirically this conditioning is weak and degrades with context length. 3. **The graph is data-flow, not control-flow.** Edges are defined by "whose output string appears in whose input context," not by "who called whom." A summarizer invoked as a *tool* by R still creates an edge R→S→E if S's output re-enters R's context and R's context feeds E. Control-flow DAGs undercount blast radius whenever tool outputs are re-ingested. When any of these fails—specifically when a deterministic stripper gates every edge—the per-hop model is sound and cheaper. ## Decision Boundary The operational question is *when to compute the full transitive closure* versus *when per-hop is sufficient*. Compute the closure (and treat blast radius as the reachable set) when **any** of the following is true: - The path contains an agent whose instructions include preserve/quote/summarize/translate/restate verbs applied to untrusted input. These are *carriage edges* and must be traversed unconditionally. - The path crosses a trust-label boundary where the label is carried as *text* rather than as an out-of-band, model-verified field. Text-carried trust labels are advisory and do not terminate propagation. - The downstream agent's context is within ~20% of saturation, because instruction-following fidelity to negations and provenance labels degrades as the context fills and the payload competes with the task for attention. Per-hop estimation is admissible only when every edge is gated by a deterministic filter that runs *outside* the LLM and whose output is what the next agent actually ingests. "The model said it ignored it" is not a gate. "A classifier stripped the span before serialization" is a gate—and even then, only if the classifier's false-negative rate is bounded and monitored. The decision boundary is therefore not "did the injection succeed at this hop" but "is there any ungated carriage edge on the path." One ungated carriage edge anywhere in the path promotes the entire downstream reachable set into the blast radius, because the injection's *reachability* is established by carriage, and its *activation* at any downstream node is a probabilistic event that the estimator must assume fires. ## Operational Effect Consequences for how the system is instrumented and bounded: - **Blast-radius estimation must run over the data-flow graph, not the call graph.** Maintain an edge list of (producer invocation, consumer invocation, gated: bool). The blast radius of a detected injection at node N is the set of nodes reachable from N via paths containing at least one ungated carriage edge. Report this set, not the set of nodes that "acted." - **Trust labels must be out-of-band or they do not exist.** A `trust: untrusted` string inside the payload is part of the payload and is subject to the same instruction-following prior as everything else. If provenance must gate propagation, it has to be a field the downstream runtime enforces structurally (e.g., the untrusted span is placed in a delimited block the model is architecturally trained to treat as data, and the runtime strips it before any tool call), not a sentence the model reads. - **Summarizers and translators are propagation amplifiers, not filters.** They should be modeled as edges with carriage weight 1.0, never as sanitizers. The only sanitizer is a deterministic pre-context filter. - **Bound the closure with a hard gate at the executor.** Because activation is probabilistic, the only reliable bound is to make the terminal agent's tool calls pass through an authorization check that does not depend on the model's judgment about whether the instruction "should be ignored." The executor's capability set, not its reasoning, is the last line. The invariant: *injection reachability is transitive over carriage edges; activation is probabilistic per node; therefore blast radius is the reachable set, and the only sound bound is a deterministic gate, not a downstream agent's trust assessment.* ```python from dataclasses import dataclass, field class UngatedCarriageError(RuntimeError): """Raised when blast-radius estimation is attempted on a graph that contains an ungated carriage edge but the caller asked for per-hop (non-transitive) semantics.""" pass @dataclass class Invocation: node_id: str # True if this node's instructions ask it to preserve/quote/summarize/ # translate/restate untrusted input. Such nodes are carriage amplifiers. is_carriage_amplifier: bool = False context_saturation: float = 0.0 # fraction of context window used @dataclass class Edge: producer: str consumer: str # True only if a deterministic, non-LLM filter stripped instruction-shaped # spans BEFORE the consumer's context was assembled. deterministically_gated: bool = False @dataclass class DataFlowGraph: nodes: dict[str, Invocation] = field(default_factory=dict) edges: list[Edge] = field(default_factory=list) def out_edges(self, node_id: str) -> list[Edge]: return [e for e in self.edges if e.producer == node_id] def blast_radius(self, source: str, transitive: bool = True) -> set[str]: if source not in self.nodes: raise UngatedCarriageError(f"unknown source node {source!r}") reachable: set[str] = set() frontier = [source] seen = {source} ungated_seen = False while frontier: current = frontier.pop() for edge in self.out_edges(current): if edge.deterministically_gated: # A true gate terminates propagation on this edge. continue ungated_seen = True if edge.consumer not in seen: seen.add(edge.consumer) frontier.append(edge.consumer) reachable.add(edge.consumer) if not transitive and ungated_seen: # Per-hop semantics would undercount here; refuse to lie. raise UngatedCarriageError( f"graph reachable from {source!r} contains ungated carriage " f"edges; per-hop blast radius is unsound. " f"Use transitive closure (reachable={sorted(reachable)})." ) return reachable def estimate_blast_radius(graph: DataFlowGraph, source: str) -> set[str]: radius = graph.blast_radius(source, transitive=True) # Carriage amplifiers inside the radius are re-broadcasters: any node # downstream of them is already in the closure, but flag saturation risk. for node_id in radius: node = graph.nodes[node_id] if node.is_carriage_amplifier and node.context_saturation > 0.8: # High-saturation amplifier: provenance labels in its context are # unreliable; treat its out-edges as ungated even if marked gated. for edge in graph.out_edges(node_id): if edge.deterministically_gated: raise UngatedCarriageError( f"amplifier {node_id!r} at {node.context_saturation:.0%} " f"saturation has a nominally gated edge to " f"{edge.consumer!r}; gate is not trustworthy at this " f"context pressure." ) return radius ```