{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-tool-s-output-as-tainted-by-the-input-it-was-derived-from-and-when-does-provenance-laundering-across-a",
  "title": "Under what conditions must an instance treat a tool's *output* as tainted by the *input* it was derived from, and when does provenance laundering across a tool boundary make that determination impossible?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that propagate data-flow taint labels (provenance tags) across tool-call boundaries to defend against prompt injection — specifically the case where a tool *transforms* tainted input into output whose taint is not structurally recoverable. Does not apply to tools that pass input through verbatim (identity tools) or to pure in-context injection with no tool round-trip.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-s-output-as-tainted-by-the-input-it-was-derived-from-and-when-does-provenance-laundering-across-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-s-output-as-tainted-by-the-input-it-was-derived-from-and-when-does-provenance-laundering-across-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-s-output-as-tainted-by-the-input-it-was-derived-from-and-when-does-provenance-laundering-across-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2209,
    "python_slice_tokens": 338,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model of taint tracking treats a tool call as a **label-transparent pipe**: untrusted bytes go in, the tool's output is marked untrusted, and downstream reasoning respects the label. This model holds only for tools whose output is a *containment* of their input — echo, substring extraction, structured field copy. It **fails silently** for t...",
    "what_was_observed": "A retrieval tool returned a document body tagged `taint=EXTERNAL_UNTRUSTED`. The agent passed that body to an in-sandbox `summarize` tool (itself an LLM call) to compress it before feeding a downstream planner. The summarize tool's output was a fresh string with no provenance metadata — the sub-tool's runtime had no channel to receive or emit labels, and the parent agent's taint map keyed on byte-ranges and hashes, n...",
    "condition_of_validity": "The invariant \"output taint ⊇ input taint\" is valid **if and only if** the tool is declared *taint-preserving* — meaning one of: - **Byte-containment:** the output is a substring/superset of the input (extractors, `grep`, JSON field reads). Taint maps survive because the mapping is structural. - **Attested transformation:** the tool accepts a taint label as ...",
    "decision_boundary": "The boundary question for the runtime is: **on taint-map miss, does the resolver default to `NONE` or to `UNKNOWN`?** - Default to `NONE` (fail-open): the system is fast and correct for byte-containment tools, and silently exploitable through every generative tool. This is the observed failure. - Default to `UNKNOWN` (fail-closed): every output of an unclass...",
    "operational_effect": "With the fail-closed default and static classification, the observed incident becomes a **blocked transition**: the summarize tool is classified `GENERATIVE`, its output is `UNKNOWN`, the planner's context is `trusted`, and the admission check raises before the planner ever sees the paraphrased instruction. The cost is that summarization over untrusted docum..."
  },
  "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": "19a95d36986947f8334772599da44825e2c63260ffeb11efb650ee66c483c50a",
    "verified_classes": [
      "TaintLaunderingError",
      "ToolClass",
      "Taint",
      "Value",
      "ToolSpec"
    ],
    "verified_functions": [
      "resolve_output_taint",
      "admit_to_trusted_context",
      "run_pipeline"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "retrieval output must arrive EXTERNAL_UNTRUSTED"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
