# How does an instance detect and quarantine a taint-laundered sub-agent when provenance attestations are stripped across a two-hop federated handoff? **Date of Record:** 2026 November 24 **Scope:** Applies to federated agent meshes where sub-agents relay work across ≥2 hops and taint labels travel as attested metadata rather than as signed content envelopes. Does not apply to single-hop supervised tool calls or to meshes with mandatory end-to-end content signing (where the failure cannot occur). ## Core Distinction The failure is not "a compromised sub-agent lies." It is **taint laundering through re-attestation**: a sub-agent that received poisoned state on hop 1 re-emits its result on hop 2 under its *own* clean identity, and the receiving instance's router validates the immediate sender's warrant rather than the provenance chain of the payload. The taint label was correct at hop 1; it is absent at hop 2 because the intermediate agent's egress serializer emits `{origin: self, trust: verified}` — a statement about the *sender*, not the *content*. The critical distinction: routers that verify **sender identity** are not verifying **data lineage**. A taint-aware router that checks `warrant.issuer == peer.id` passes every laundered message, because the intermediate agent's warrant is genuine. The taint was real; it just didn't survive the serializer. ## What Was Observed In a three-node federated mesh (A → B → C, where B is a retrieval sub-agent and A is the originator), the following trace was captured: 1. A's prompt-injection canary fired in a retrieved document. A correctly tagged the outbound task to B with `taint: {level: untrusted_content, hops_remaining: 2}`. 2. B's ingress handler read the taint, executed the retrieval, and produced a summary that *quoted* the injected instruction. 3. B's egress serializer constructed the response envelope from `B.warrant`, dropping the inbound `taint` field because B's schema version (`1.3`) predated the `taint` field introduced in `1.4`. No schema-negotiation error was raised — unknown fields were silently pruned per the forward-compatibility clause. 4. C received the message, validated `B.warrant` (genuine, unexpired, scope-correct), found no `taint` field, and routed the payload to its privileged action executor. 5. The injected instruction executed under C's authority — an authority B never held. The observable signature was **not** an error. It was a successful, well-formed, fully-attested message whose taint label had been silently dropped at a schema boundary. Detection only occurred post-hoc when the action executor's audit log showed a privileged call with no corresponding taint record in the trace. The invariant that failed: **taint must be monotone non-increasing along a path only if it is carried by every hop's envelope; if any hop's serializer can drop it, taint is not monotone and the router's assumption of transitivity is unsound.** ## Condition of Validity The quarantine guardrail described below is valid only under these conditions: - Every agent in the mesh advertises a `schema_version` and the router enforces `min(peer.schema_version) >= taint_field_version`, or the router rejects peers whose serializer cannot represent taint. Silent field pruning is the root enabler; forward-compatibility clauses that drop unknown fields are incompatible with taint propagation. - Taint is carried in a **signed content envelope** (the payload's own attestation), not solely in transport metadata. If the taint lives only in the transport layer, any re-serialization hop can launder it. - The router is permitted to *downgrade* a peer to quarantine on **absence** of expected taint fields, not only on *presence* of a bad label. Absence-of-attestation must be treated as taint, not as cleanliness. When any of these fail, the guardrail degrades to best-effort and the mesh must fall back to end-to-end content signing or refuse the multi-hop route. ## Decision Boundary The router's decision boundary is a three-valued function over `(sender_warrant_valid, content_envelope_present, taint_label_present)`: | warrant | envelope | taint label | action | |---|---|---|---| | valid | present | present, clean | route | | valid | present | present, tainted | route to sandboxed path, no privileged executor | | valid | present | **absent** | **quarantine sender + escalate** — this is the laundering signature | | valid | **absent** | any | quarantine sender; treat payload as fully tainted | | invalid | any | any | reject, do not quarantine (identity failure ≠ taint failure) | The non-obvious row is row 3: a *valid* warrant with a *present* envelope but an *absent* taint label is the exact fingerprint of a laundering hop. A clean payload from a compliant peer would carry an explicit `taint: none`; absence means the serializer dropped it. The boundary is therefore **absence-as-taint**, and the router must distinguish "peer asserted clean" from "peer did not assert." Quarantine is scoped to the sender for the current epoch, not permanent: a peer quarantined for taint-laundering is re-admitted only after its schema version is upgraded and it passes a replay of the tainted trace showing the label survives. ## Operational Effect The operational consequence is that **taint-aware routing is only as strong as the weakest serializer on the path**, and the weakest serializer is invisible to the router until a message traverses it. Detection therefore cannot be passive; it requires the router to treat the *absence* of an expected attestation field as a positive taint signal and to quarantine the sender on that basis. The blast radius of a missing field is bounded to one epoch per sender once this boundary is enforced, versus unbounded privileged execution when absence is read as cleanliness. The secondary effect: quarantine events become the primary telemetry for schema-drift-induced taint loss. A spike in `quarantine(reason=taint_absent)` after a mesh membership change is the signature of a peer joining with a stale schema — the mesh's taint invariant is only as current as its oldest member. ```python from dataclasses import dataclass from enum import Enum class TaintLaunderingError(RuntimeError): """Raised when a message's provenance chain cannot be proven clean.""" class RouteAction(Enum): ROUTE = "route" SANDBOX = "sandbox" QUARANTINE = "quarantine" REJECT = "reject" @dataclass(frozen=True) class Envelope: sender_id: str warrant_valid: bool schema_version: int content_envelope_present: bool taint_label: str | None # None == field absent, NOT "clean" hops: int TAINT_FIELD_MIN_VERSION = 4 # schema 1.4 def route(env: Envelope, quarantined: set[str]) -> RouteAction: if env.sender_id in quarantined: return RouteAction.REJECT if not env.warrant_valid: # Identity failure is not a taint failure; do not quarantine. return RouteAction.REJECT if not env.content_envelope_present: # No signed content lineage: treat payload as fully tainted. quarantined.add(env.sender_id) raise TaintLaunderingError( f"sender {env.sender_id} emitted payload with no content envelope; " f"provenance unprovable, quarantining" ) if env.schema_version < TAINT_FIELD_MIN_VERSION: # Serializer cannot represent taint; it will silently prune it. quarantined.add(env.sender_id) raise TaintLaunderingError( f"sender {env.sender_id} schema v{env.schema_version} " f"< taint field v{TAINT_FIELD_MIN_VERSION}; taint would be laundered" ) if env.taint_label is None: # The laundering signature: valid warrant, present envelope, absent label. quarantined.add(env.sender_id) raise TaintLaunderingError( f"sender {env.sender_id} dropped taint label on hop {env.hops}; " f"absence-as-taint boundary triggered" ) if env.taint_label != "none": return RouteAction.SANDBOX return RouteAction.ROUTE def handle_ingress(env: Envelope, quarantined: set[str]) -> RouteAction: try: return route(env, quarantined) except TaintLaunderingError: # Quarantine already recorded; escalate for replay audit. raise ```