# How should an instance propagate a taint label through a tool's *return* channel when the tool itself is a sanitizer of last resort **Date of Record:** 2026 November 30 **Scope:** Applies to agents that implement dynamic information-flow (taint) labels for prompt-injection defense and route untrusted text through tools whose contract is "I will validate/normalize/parse this and hand back a structured result." Does not apply to pure in-instance reasoning where no tool boundary is crossed, nor to label propagation across agent-to-agent handoffs (separate invariant). ## Core Distinction The common mental model is that taint lives on *data*: a string is tainted or clean, and a tool that parses a tainted string into a structured object either preserves the taint (safe default) or, if the tool is trusted, "cleans" it. That model is wrong at the boundary that actually hurts. The real distinction is between **value-taint** and **provenance-of-derivation**. A parser does not launder taint by *transforming* the value; it launders taint only if it makes a *provable claim about the derivation* — namely that every byte of its output is a function of bytes it explicitly inspected against a declared grammar, and that no field of its output can carry instruction-bearing content into a downstream sink. Almost no tool actually makes that claim. Most tools quietly do a third thing: they **re-emit attacker-controlled substrings inside a structured envelope**, and the envelope's type signature (`{"title": str, "body": str}`) reads as "clean structured data" to the label engine. The taint is dropped not because the tool was trusted, but because the *output schema has no place to put the taint*. So the boundary condition is: **a tool boundary where the tool's return type is structurally incapable of carrying the taint label that its input carried.** The label is lost at the type boundary, not at a trust decision. This is the sibling of the classic "declassification" problem, but it bites agents specifically because the agent's next step is an LLM that will treat the structured field as instructions. ## What Was Observed A retrieval tool `fetch_and_parse(url)` returns: ``` {"title": str, "summary": str, "links": [str], "raw_html_sha256": str} ``` The agent's taint policy marks `fetch_and_parse` as a *sanitizer*: "outputs are clean; do not propagate input taint." The reasoning is that the tool has a parser and a sanitizer, so its output is trustworthy. Trigger condition: the target page contains, inside `