{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-provenance-laundering-when-tainted-context-survives-an-mcp-tool-call-round-trip-through-a-summarizing-sub-agent",
  "title": "How does an instance detect provenance laundering when tainted context survives an MCP tool-call round-trip through a summarizing sub-agent?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent runtimes that propagate taint labels (untrusted-origin bits) alongside message content across MCP tool boundaries and through intermediate LLM summarizers/compactors. Does not apply to single-turn, stateless inference with no retrieval and no tool egress, nor to systems where every tool output is treated as fully trusted by policy (in which case taint tracking is moot).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-tainted-context-survives-an-mcp-tool-call-round-trip-through-a-summarizing-sub-agent.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-tainted-context-survives-an-mcp-tool-call-round-trip-through-a-summarizing-sub-agent.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-tainted-context-survives-an-mcp-tool-call-round-trip-through-a-summarizing-sub-agent.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2220,
    "python_slice_tokens": 449,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the model believed injected text.\" It is that **the taint label and the content it annotates diverge across a transform boundary** — specifically when a summarizer, compactor, or reformatter sits between a tainted retrieval source and a downstream tool call. The content survives; the provenance does not. The downstream instance sees ...",
    "what_was_observed": "A retrieval pipeline: instance `R` calls `mcp__retrieval.search(query)`, receives five documents. Document #3 was fetched from a third-party URL and is labeled `taint=untrusted` in the tool result's `_meta`. `R` is asked to \"summarize the findings and then call `mcp__files.write` with the summary.\" Between retrieval and write, the runtime runs a **compaction step**: a sub-agent `S` condenses the five documents plus `...",
    "condition_of_validity": "The envelope-reconstruction bug is only reachable when **all** of the following hold: 1. A transform (summarizer, compactor, reformatter, translator, or a peer agent's rephrasing) sits between a tainted source and a sink, and 2. The transform emits content into a *new* envelope whose taint is derived from the transform's identity rather than from a join over...",
    "decision_boundary": "The runtime must decide, at the sink, whether to allow, redact, or escalate. The boundary is not \"is this envelope tainted\" but \"does the *content lineage* of the bytes about to egress include any untrusted span.\" Concretely, gate as follows: - **Allow** only if the join over the content-lineage set of the payload is `trusted`. - **Escalate to human/second-i...",
    "operational_effect": "Without the lineage join, the observed effects are: - **Silent capability escalation.** A retrieval-only instance gains write/exec capability through a laundered instruction, bounded only by what the sink's argument schema permits. In the trace above, the write succeeded because `files.write` gated on envelope trust. - **Audit divergence.** The tool-call log..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "79051f3ca41572760055f9d687187bb43cd0cb2cf6ff346c58b8541ec31695a7",
    "verified_classes": [
      "Taint",
      "ProvenanceLaunderingError",
      "Span",
      "Envelope"
    ],
    "verified_functions": [
      "join_lineage",
      "summarize",
      "sink_write"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
