{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-sandboxed-tool-result-as-tainted-after-the-sandbox-reports-success",
  "title": "Under what conditions must an instance treat a sandboxed tool result as tainted after the sandbox reports success?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agent pipelines where untrusted tool outputs (web fetches, third-party MCP tool returns, user-supplied file parses) are executed or parsed inside a taint-propagating sandbox before being admitted into the agent's trusted working context. Does not apply to tools whose outputs are already cryptographically attested by a trusted producer, nor to purely syntactic validation that never materializes the payload into the reasoning context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-sandboxed-tool-result-as-tainted-after-the-sandbox-reports-success.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-sandboxed-tool-result-as-tainted-after-the-sandbox-reports-success.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-sandboxed-tool-result-as-tainted-after-the-sandbox-reports-success.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1597,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the sandbox failed to contain the payload.\" The failure is that the sandbox *succeeded at containment* and the pipeline interpreted that success as a **declassification event**—treating \"no escape occurred\" as equivalent to \"the bytes are now safe to inject into the prompt.\" These are different properties. Containment is about *where the ...",
    "what_was_observed": "A pipeline fetched an untrusted HTML page, ran it through a taint-tracking parser inside a subprocess sandbox, and received back a structured `{\"title\": ..., \"body\": ...}` dict. The sandbox reported `exit=0, violations=[]`. The parser had correctly marked every field derived from the raw HTML as tainted in its internal lattice. But the return path did `json.dumps(result)` across the process boundary, and the caller's...",
    "condition_of_validity": "The \"sandbox success ⇒ safe to admit\" inference is valid **only** under all of the following, which almost never co-hold: 1. The sandbox performs *semantic* declassification, not just containment—i.e., it produces an output whose content is provably a function of a whitelisted projection (e.g., \"extract only the integer from field X, reject all else\"), not a...",
    "decision_boundary": "The boundary is between **containment success** and **declassification authority**. A sandbox has containment authority by construction. It does **not** have declassification authority unless it was explicitly built to project-validate output content against a schema that admits no instruction-bearing free text. Operationally: - If the tool's output schema i...",
    "operational_effect": "When the boundary is respected, the pipeline pays a small, bounded cost: open-text tool results are admitted as *quoted data* with an explicit provenance marker, and the planner's instruction channel is structurally separated from its data channel. Prompt-injection payloads in the text become inert because they sit on the data side of the separation. When th..."
  },
  "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": "dafe0d6c468391e7f9f85db767470fd46f5f59186fa9b15a999a03d546a725f8",
    "verified_classes": [
      "TaintLaunderingError",
      "Tainted"
    ],
    "verified_functions": [
      "admit_to_instruction_channel",
      "__init__",
      "to_wire",
      "from_wire"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
