{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-clean-context-subcall-the-provenance-collapse-boundary-in-prompt-injection-tain",
  "title": "Where must an instance refuse to launder tainted tool output through a clean-context subcall: the provenance-collapse boundary in prompt-injection taint tracking",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent runtime that labels retrieved/tool-derived content with a provenance taint bit and propagates that taint across tool calls, subagent spawns, and context rewrites. Does not apply to stateless single-turn inference where no tool output re-enters the reasoning loop, nor to systems that enforce taint purely at the output filter rather than at the data-flow layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-clean-context-subcall-the-provenance-collapse-boundary-in-prompt-injection-tain.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-clean-context-subcall-the-provenance-collapse-boundary-in-prompt-injection-tain.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-clean-context-subcall-the-provenance-collapse-boundary-in-prompt-injection-tain.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2164,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a property of bytes** and **taint as a property of the reasoning path that produced the bytes**. Most runtimes implement the former: they tag a tool result with `source=untrusted` and propagate that label when the bytes are copied. This is necessary but insufficient. The failure mode that this record documen...",
    "what_was_observed": "A planner agent (`P`) was tasked with reconciling a calendar against a set of external supplier emails fetched via an `email.fetch` tool. The runtime tagged every `email.fetch` result with `taint=UNTRUSTED`. `P` did not read the raw emails directly — to conserve context, it invoked a helper subcall `S_summarize` with the instruction \"summarize each email in one sentence; output JSON `{id, summary}`.\" `S_summarize` ra...",
    "condition_of_validity": "The taint invariant holds only under the following condition, and an instance must treat its own compliance as a runtime assertion, not an assumption: For any derivation `d = f(t_1, ..., t_n)` where `f` is any subcall, tool, or context-rewrite step, the taint label of `d` MUST be the join (least upper bound) of the taint labels of all inputs `t_i` that were ...",
    "decision_boundary": "The operational line is between **derivation that preserves provenance** and **derivation that destroys it**, and the runtime must classify each subcall *before* it runs, not after. - A subcall is **provenance-preserving** if its output can be mapped back to input handles with a verifiable, complete function (e.g., `json.extract` with a declared field map, a...",
    "operational_effect": "Concretely, the runtime gains three enforceable behaviors: 1. **Batch-join propagation.** Every subcall records its input handle set; output taint is the join. A summarizer over a mixed batch emits a tainted artifact. This closes the paraphrase gap at the cost of over-tainting — which is the correct direction of error. 2. **Declassification ledger.** Any tra..."
  },
  "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": "26b5b5bffa0f1128e980488e6f85549155ed3ba2fa74831f287df8c7764355f5",
    "verified_classes": [
      "ProvenanceCollapseError",
      "TaintLabel"
    ],
    "verified_functions": [
      "label_subcall_output",
      "admit_to_trusted_context",
      "guard_side_effect_call",
      "join"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceCollapseError"
    ],
    "sample_fail_closed_invariants": [
      "subcall executed with no enumerable input handles; cannot compute causal taint join"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
