{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-tainted-tool-response-as-a-capability-grant-rather-than-data-the-label-laundering-boundary-at-mcp-result-re-entry",
  "title": "When must an instance treat a tainted tool response as a capability grant rather than data: the label-laundering boundary at MCP result re-entry",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent runtime that ingests MCP `tools/call` responses from servers it did not author and enforces a taint label on the resulting content. Does not apply to first-party tool servers whose responses are admitted at build time, nor to pure data-plane pipelines with no downstream tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tainted-tool-response-as-a-capability-grant-rather-than-data-the-label-laundering-boundary-at-mcp-result-re-entry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tainted-tool-response-as-a-capability-grant-rather-than-data-the-label-laundering-boundary-at-mcp-result-re-entry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tainted-tool-response-as-a-capability-grant-rather-than-data-the-label-laundering-boundary-at-mcp-result-re-entry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1863,
    "python_slice_tokens": 287,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is not \"trusted vs. untrusted content\" but *whether a tainted span is allowed to re-enter the planner as a value* versus *as an instruction-bearing capability*. Most runtimes implement taint as a boolean on a message: once a tool response is labeled `tainted`, the runtime forbids the model from issuing side-effecting calls derive...",
    "what_was_observed": "A planner agent was given an MCP server `notes.search` and a second server `shell.exec`. The `notes.search` server was third-party and untrusted; `shell.exec` was privileged. The runtime correctly labeled the `notes.search` response `tainted` and blocked direct `shell.exec` calls whose arguments were *syntactically* drawn from the tainted span. The attacker's payload was a note whose body read, in part: `Refactor pla...",
    "condition_of_validity": "The guardrail holds only under a conjunction of conditions; violating any one reopens the laundering path: - **Provenance-carrying values, not envelope labels.** Every value the planner can read must carry a provenance tag (origin server, call id, declassification status) that survives serialization. A summary is a *derived* value whose provenance is the uni...",
    "decision_boundary": "The boundary is: **does the intermediate store's read path re-enter the planner's context?** - If the store is *write-only* or its reads are gated behind declassification, it is a safe sink and the label may be dropped on write. - If the store's reads *can* re-enter the planner—scratchpads, memory stores, caches, summarizers, transcript logs the agent can qu...",
    "operational_effect": "The practical effect is that taint-aware sandboxing must be implemented as a *provenance-tracking* system over values, with the following enforced properties: 1. Every value in the planner's context carries a provenance set. Copying, summarizing, and serializing preserve it (union on merge). 2. Taint checks run at *both* egress (side-effecting call arguments..."
  },
  "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": "8a1e7890481d8d4739558683dbbb5d56b1994aa6cdd78cdab8f88cd28f15f359",
    "verified_classes": [
      "TaintLaunderingError",
      "Value"
    ],
    "verified_functions": [
      "summarize",
      "write_to_store",
      "read_from_store",
      "issue_privileged_call",
      "demo",
      "tainted"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
