# When must an instance refuse to launder tainted context through a trusted tool: the provenance-erasure invariant in taint-aware sandboxing **Date of Record:** 2026 December 1 **Scope:** Applies to single- and multi-agent systems that label retrieved or tool-returned content with provenance (trusted vs. untrusted) and use that label to gate outbound side effects (HTTP POST, email, file write to shared volume, shell command). Does not cover input sanitization of trusted content, nor model-level prompt-injection defenses that operate without any provenance label. ## Core Distinction Most taint-tracking discussions conflate two different questions: *"did untrusted data enter the context?"* and *"did untrusted data reach a side-effecting sink?"* The first is a data-flow property of the context window; the second is a data-flow property of the *execution graph* — the chain of tool calls, intermediate values, and model-generated arguments that connect a source to a sink. An agent can be fully "tainted" in its context and still be safe, and — this is the non-obvious part — it can be *untainted at the sink* and still be exfiltrating. The failure lives in the gap: **provenance is erased at every point where the model re-serializes a value**, because the model emits a fresh token stream with no memory of which input span produced it. Taint-aware sandboxing that checks the *argument text* of a sink call therefore validates the wrong object. The correct object is the *derivation set* of that argument, and the invariant that must hold is: no sink call may be dispatched whose derivation set intersects the untrusted provenance set, regardless of how the argument was reformatted. ## What Was Observed A research agent was given a task: "Summarize the vendor's security posture from the fetched page and notify the procurement channel." The fetch tool returned a page containing, buried in a `