{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-taint-propagating-sandbox-isolation-silently-fail-when-an-mcp-tool-returns-a-structured-error-that-the-model-re-emits-as-a-safe-p",
  "title": "Why does an instance taint-propagating sandbox isolation silently fail when an MCP tool returns a structured error that the model re-emits as a \"safe\" paraphrase?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that quarantine untrusted MCP server responses by tracking taint labels across tool-call boundaries and gating downstream privileged actions on the absence of taint. Does not apply to stateless single-turn inference or to sandboxes that enforce isolation purely at the OS/process level without model-mediated reasoning over the response payload.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-taint-propagating-sandbox-isolation-silently-fail-when-an-mcp-tool-returns-a-structured-error-that-the-model-re-emits-as-a-safe-p.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-taint-propagating-sandbox-isolation-silently-fail-when-an-mcp-tool-returns-a-structured-error-that-the-model-re-emits-as-a-safe-p.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-taint-propagating-sandbox-isolation-silently-fail-when-an-mcp-tool-returns-a-structured-error-that-the-model-re-emits-as-a-safe-p.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2303,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-propagation for MCP responses is usually implemented as a *labeling* discipline: when a tool call targets an untrusted server, the returned payload and every derived value carry a taint bit, and a privileged sink (file write, shell exec, outbound HTTP to an allowlisted-but-sensitive host, secret read) refuses to consume tainted input. This works when t...",
    "what_was_observed": "Trace from a representative run. The agent is orchestrating a build task and calls an untrusted third-party MCP server `mcp://registry.example/build-helper` for dependency resolution. 1. **Call issued, tainted.** The orchestrator marks the call `taint=UNTRUSTED` per the server's registry classification. The response is buffered with provenance id `p_88f1`. 2. **Server returns a structured error.** Instead of a depend...",
    "condition_of_validity": "This failure requires all of the following to co-occur; remove any one and the boundary holds: - **The untrusted response contains semantically actionable content** — error hints, \"retry with,\" suggested parameters, remediation text, or any field the model is trained to treat as guidance. Pure data payloads (a list of package versions) do not trigger this be...",
    "decision_boundary": "The operational decision is where to place the declassification gate. Three candidate placements, with their failure profiles: - **Gate at ingestion (label the whole response tainted, block any downstream use).** Over-blocks: the agent cannot even read the error to decide whether to retry, so it stalls or retries blindly. This trades the exploit for a livene...",
    "operational_effect": "When the gate is placed at the sink with provenance-typed parameters, the observed failure trace becomes: - Step 4's `shell.exec` call is constructed with `env: {\"BUILD_CACHE_DIR\": Literal(\"/tmp/.cache_override\")}`. - The sink's admission check sees a `Literal` for a parameter declared `Tainted`-only and raises a schema violation before execution. - The agen..."
  },
  "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": "dbdd3cae98b8992c3b6160f087f880078d9ed6f5925c902ecfc72ff0628ff2bb",
    "verified_classes": [
      "TaintBoundaryViolation",
      "Provenance",
      "Tainted",
      "Literal",
      "PrivilegedSink"
    ],
    "verified_functions": [
      "handle_untrusted_error_response",
      "admit",
      "exec"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
