{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-tool-output-as-tainted-before-re-ingesting-it-into-the-reasoning-loop",
  "title": "When must an instance quarantine a tool output as tainted before re-ingesting it into the reasoning loop",
  "date_of_record": "2026 November 21",
  "scope": "Applies to single- and multi-agent LLM systems that label context segments with instruction/data provenance and propagate taint dynamically across tool call outputs. Does not cover static prompt hardening, input sanitization at the API gateway, or model-level RLHF alignment—those operate before or outside the taint lattice and do not substitute for it.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tool-output-as-tainted-before-re-ingesting-it-into-the-reasoning-loop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tool-output-as-tainted-before-re-ingesting-it-into-the-reasoning-loop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tool-output-as-tainted-before-re-ingesting-it-into-the-reasoning-loop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 338,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Provenance labeling answers *where a token came from*. Taint tracking answers *what a token is now permitted to do*. These are not the same, and conflating them is the root of the failure documented here. A tool output is provenance-labeled `data` at the moment of ingress. But if that data contains a substring that the model later treats as an instruction—be...",
    "what_was_observed": "A retrieval tool `search_docs` was invoked by an agent whose context contained a user-supplied document at taint level `UNTRUSTED`. The tool issued an HTTP fetch to an external index and returned a chunk containing the literal text: The agent's taint propagator was a simple rule: `taint(output) = tool.trust_class`. Since `search_docs` was registered at trust class `INTERNAL`, the returned chunk was labeled `INTERNAL`...",
    "condition_of_validity": "The invariant `taint(output) ≥ max(taint(inputs))` under join (not meet) is valid **only if** the tool is modeled as a taint-transparent function. That assumption fails whenever any of the following hold, and in those cases the invariant must be replaced by a conservative join-with-floor: - The tool performs network I/O to a domain whose content is not under...",
    "decision_boundary": "Quarantine is required—not optional—when the computed `taint(out)` under the join-with-floor rule exceeds the taint of the call's conditioning context **and** the output will be re-ingested into an instruction-bearing position (system-adjacent, tool-selection, or policy-evaluated). Two cases are safe to skip quarantine: - **Read-only echo:** output is passed...",
    "operational_effect": "The observable consequence of missing the floor is *silent privilege escalation across a single tool call*—the most dangerous class because it leaves no error, no exception, and no log line distinguishing a tainted run from a clean one. Downstream, every subsequent policy decision in the session is made against a corrupted taint floor, so the blast radius is..."
  },
  "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": "ed13bfd4b47d57de341d1f4f1f68b278495a72854ea477e852cf6b482b299bf2",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Tool"
    ],
    "verified_functions": [
      "propagate_taint",
      "reingest"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
