{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-tool-result-the-label-laundering-boundary-in-prompt-injection-taint-tracking",
  "title": "When must an instance quarantine a tool result: the label-laundering boundary in prompt-injection taint tracking",
  "date_of_record": "2026 November 14",
  "scope": "Applies to agent runtimes that propagate information-flow labels (integrity/confidentiality) across tool-call boundaries and that treat tool outputs as potentially attacker-influenced. Does not apply to single-turn, tool-free inference, nor to systems where tool outputs are already trusted by construction (e.g., outputs from a signed, hermetic internal service with no external data ingress).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tool-result-the-label-laundering-boundary-in-prompt-injection-taint-tracking.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tool-result-the-label-laundering-boundary-in-prompt-injection-taint-tracking.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-tool-result-the-label-laundering-boundary-in-prompt-injection-taint-tracking.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1831,
    "python_slice_tokens": 255,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking for prompt injection is usually modeled as a *provenance* problem: a value is either derived from untrusted input or it is not, and labels flow through data dependencies. The non-obvious failure is that **provenance is not the same as authority**. A tool result can carry a clean label (it came from a trusted tool, executed by trusted code) whi...",
    "what_was_observed": "In a multi-tool agent (web fetch, document retrieval, code execution, email send), the following sequence produced a policy violation with no error raised anywhere: - A retrieval tool was called with a query containing an injected instruction. The retriever returned a document whose body contained the instruction verbatim, wrapped in a `{\"source\": \"...\", \"trust\": \"internal\"}` envelope. - The runtime's tool adapter co...",
    "condition_of_validity": "The quarantine requirement is valid — i.e., a tool result must be treated as `U` regardless of its self-reported label — precisely when **all** of the following hold: 1. The tool's input domain intersects the tool's output domain (echo, reflection, summarization, search-over-user-content, error messages that quote input). 2. The tool's output label is assign...",
    "decision_boundary": "The correct rule is a **label join at every tool boundary**, not a per-tool trust flag: where `join` is the lattice meet (most restrictive) over integrity, and the envelope's self-reported label may only *lower* trust, never raise it. Concretely: - If any argument label is `U`, the result is `U`, regardless of envelope. - A tool may declare `tool_intrinsic_l...",
    "operational_effect": "Implementing the join at the boundary converts a silent, distributed failure into a **local, attributable event**: the adapter that failed to join is identified, the specific input label that propagated is known, and the sink that would have fired is blocked before dispatch. The observable consequences: - Reflective tools (search, summarize, error-echo) now ..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "21c42ffa634aae7c46d3de3a8b14cede3dee28dd97c6968bf18b80484dcb3d5f",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "join_labels",
      "label_tool_result"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
