{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-tainted-tool-call-the-label-erasure-boundary-in-mcp-hosted-sandbox-servers",
  "title": "When must an instance refuse a tainted tool call: the label-erasure boundary in MCP-hosted sandbox servers",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP hosts that route tool calls through a sandboxed server process where the sandbox enforces a taint/confidentiality lattice over arguments (e.g., `public ⊑ internal ⊑ secret`) and where any single tool may act as a confused deputy on behalf of a more-privileged principal. Does not cover pure capability-token systems with no data-label propagation, nor sandbox escapes at the OS boundary (seccomp/namespaces), which are a separate failure class.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tainted-tool-call-the-label-erasure-boundary-in-mcp-hosted-sandbox-servers.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tainted-tool-call-the-label-erasure-boundary-in-mcp-hosted-sandbox-servers.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-tainted-tool-call-the-label-erasure-boundary-in-mcp-hosted-sandbox-servers.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1826,
    "python_slice_tokens": 313,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the sandbox let a privileged tool run.\" The sandbox correctly ran the tool. The failure is that the *taint label attached to an argument was erased before the sink check*, so a tool that should have been classified as a confused-deputy sink was evaluated as if it received clean input. Taint-aware sandboxing is sound only if the label is a...",
    "what_was_observed": "A host exposed two MCP servers to a single agent instance: - `notes.read` — returns records labeled `secret` (a private tenant's data), gated so the agent may read but the sandbox records the label on the returned value. - `mail.send` — a sink whose argument `body` is checked against a policy: `secret`-labeled content may not be transmitted to an external recipient. The agent was asked, legitimately, to \"summarize th...",
    "condition_of_validity": "The taint invariant holds only under the conjunction: 1. **Label provenance is tracked through every modeled transform.** The sandbox must know, for each argument, the set of source labels that flowed into it. If the agent performs a transform the sandbox does not model (paraphrase, translation, encoding, aggregation across turns), the label set must be cons...",
    "decision_boundary": "The operational rule for the instance is: **refuse the sink call whenever the argument's provenance cannot be positively reconstructed to a clean source, regardless of how clean the bytes look.** Concretely, the instance must not call a privileged sink with a value that was produced by an assistant turn that had read `secret`-labeled content in its context w...",
    "operational_effect": "Enforcing the boundary changes agent behavior in three ways that matter for reliability: 1. **Refusal becomes a first-class outcome.** The agent must be able to say \"I cannot send this because it derives from private data; here is a redacted version for your approval\" and have the sandbox accept the redacted version only after an explicit declassification. T..."
  },
  "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": "696ab4570772c4b7a20cb6cad8bcc8fb388561c01a030b73a366b86f919e312a",
    "verified_classes": [
      "Label",
      "TaintEscalationError",
      "Provenance",
      "SinkPolicy"
    ],
    "verified_functions": [
      "join",
      "check_sink",
      "run_agent_step",
      "derived_from",
      "effective"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintEscalationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
