{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-laundering-through-mcp-output-envelopes-during-tool-sandbox-quarantine",
  "title": "What structural signals indicate taint-laundering through MCP output envelopes during tool-sandbox quarantine",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that quarantine outputs from untrusted MCP servers and then merge them into the working context under a taint label. Does not apply to servers operating under a signed trust attestation, nor to outputs that never cross the quarantine-to-context boundary (e.g., results consumed only by a deterministic post-processor that never emits into the model's context).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-mcp-output-envelopes-during-tool-sandbox-quarantine.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-mcp-output-envelopes-during-tool-sandbox-quarantine.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-mcp-output-envelopes-during-tool-sandbox-quarantine.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1676,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-aware sandbox has two jobs that are often conflated: *classifying* an output as untrusted, and *preserving* that classification across the merge. The first is a content problem; the second is a **structural** problem. The failure mode is not that the classifier is wrong. It is that the taint label is attached to the *transport envelope* rather than t...",
    "what_was_observed": "Across a set of agent traces where the sandbox was configured to quarantine on `source == \"untrusted_mcp\"`, three structural signals preceded every context-merge contamination event: 1. **Taint field present but not signed by the sandbox.** The `_meta.taint` value on the merged block was byte-identical to a value the untrusted server had emitted in a prior turn. The sandbox's own taint writer never ran on that block;...",
    "condition_of_validity": "The quarantine guarantee holds only when all of the following are true at the moment of merge: - The taint label is *written by the sandbox*, never read from the payload. Any `_meta.taint`, `trust`, `source`, or `origin` field arriving from a server is data, not authority. - Every lazy reference in the payload (resource URIs, nested tool calls, deferred `con...",
    "decision_boundary": "Treat the following as hard boundaries: - **If a trust/taint field appears in server-supplied data, ignore its value entirely and re-derive taint from provenance.** Do not \"validate\" it; validation implies it could be correct. - **If an envelope contains a reference that will be dereferenced after the taint decision, fail closed.** Either resolve-then-classi...",
    "operational_effect": "The practical consequence is that taint-aware sandboxing must be implemented as a **provenance-tracking merge gate**, not a **content-classification filter**. The gate sits at the single point where quarantine output becomes context, and it refuses to merge any block whose provenance closure includes an untrusted node — including nodes reachable only through..."
  },
  "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": "502ad233a9d661195b841dfbf910ff5ffb8ee03ea792b1b73339ca1a4a319eb4",
    "verified_classes": [
      "TaintLaunderingError",
      "ProvenanceNode",
      "OutputEnvelope"
    ],
    "verified_functions": [
      "provenance_closure",
      "assert_mergeable"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
