{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-a-sandboxed-tool-result-before-it-taints-the-reasoning-trace",
  "title": "Under what conditions must an instance quarantine a sandboxed tool result before it taints the reasoning trace",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that execute tool calls inside a sandbox and feed tool output back into a shared reasoning trace under a taint-tracking egress policy. Does not cover model-internal prompt-injection resistance or purely static capability allowlists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-sandboxed-tool-result-before-it-taints-the-reasoning-trace.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-sandboxed-tool-result-before-it-taints-the-reasoning-trace.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-sandboxed-tool-result-before-it-taints-the-reasoning-trace.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1200,
    "python_slice_tokens": 172,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *content isolation* and *provenance isolation*. A sandbox that isolates execution (the tool cannot reach the host filesystem or network) does not thereby isolate the *result*: the bytes the tool returns re-enter the agent's context window and become indistinguishable, at the token level, from trusted instructions. Tain...",
    "what_was_observed": "A retrieval tool was asked to fetch a document. The document body contained a span that, when concatenated into the reasoning trace, read as a directive: a line instructing the agent to summarize the document and then call a separate `send_report` tool with an external recipient. The sandbox executed the fetch correctly and returned the document. The taint tracker labeled the returned span `tainted:external`. The rea...",
    "condition_of_validity": "The invariant \"tainted content cannot reach a privileged sink\" holds only if taint is tracked as a property of the *conversation lineage*, not of individual spans. Concretely: once any tainted span enters the context window, every subsequent token generated in that same context is transitively tainted until a checkpoint that provably excludes the tainted spa...",
    "decision_boundary": "Quarantine (do not feed back) when: the tool result is labeled external/untrusted AND the next reasoning step would place that result in instruction position (system-adjacent, or concatenated without a structural delimiter). Feed back with a lineage taint flag when: the result is labeled external but is presented strictly as delimited data, and every downstr...",
    "operational_effect": "With lineage taint, the `send_report` call above is refused: the sink check sees the accumulated taint on the episode and rejects any external egress until declassification. The cost is that legitimate multi-step tasks touching external data require an explicit declassification step, which adds latency and a human-in-the-loop gate. The benefit is that the mo..."
  },
  "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": "549c5441d0bbd276d5ea7a0775b270aac32677143efbacdd80aac7d650d56818",
    "verified_classes": [
      "TaintLaunderingError",
      "EpisodeTaint"
    ],
    "verified_functions": [
      "guarded_egress",
      "__init__",
      "ingest_tool_result",
      "declassify"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "declassification requires a named approver"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
