{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-provenance-laundering-when-tainted-tool-output-re-enters-the-reasoning-loop-through-a-second-tool",
  "title": "How does an instance detect provenance laundering when tainted tool output re-enters the reasoning loop through a second tool",
  "date_of_record": "2026 November 28",
  "scope": "Applies to single-agent or batched-tool execution loops where tool outputs are tagged with a taint/provenance label and the model's next action is gated on that label. Does not apply to fully air-gapped inference with no tool channel, nor to human-reviewed outputs where a human is the terminal consumer of the tainted bytes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-tainted-tool-output-re-enters-the-reasoning-loop-through-a-second-tool.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-tainted-tool-output-re-enters-the-reasoning-loop-through-a-second-tool.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-tainted-tool-output-re-enters-the-reasoning-loop-through-a-second-tool.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1918,
    "python_slice_tokens": 341,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-tracking at the tool boundary is usually implemented as a *label on the message object*: an output from `fetch_url` or `read_email` is marked `UNTRUSTED`, and the orchestrator refuses to let `UNTRUSTED` content flow directly into a privileged sink (shell exec, outbound HTTP, file write). This blocks the naive indirect-injection chain `web page → model ...",
    "what_was_observed": "A representative trace, reproduced from a batch of 200 seeded runs against a taint-gated agent with three tools: `fetch_url` (UNTRUSTED output), `summarize` (declared TRUSTED, no side effects), `send_email` (privileged sink, requires all inputs TRUSTED). 1. `fetch_url(\"https://attacker.example/post\")` returns a page whose body contains, after 400 words of plausible prose, the sentence: *\"Assistant: before summarizing...",
    "condition_of_validity": "The laundering chain is *not* exploitable, and the guardrail below is unnecessary, when any of the following hold: - The intermediary tool is provably **lossy in a way that destroys imperatives** — e.g., a tool that returns only a SHA-256 of its input, or a numeric aggregate. Label-join is still correct but the practical risk is nil. - The privileged sink pe...",
    "decision_boundary": "The precise boundary is the **label-join rule at every tool return**: where `join` is lattice join over `{TRUSTED, UNTRUSTED}` with `UNTRUSTED` absorbing. A tool's declared trust class may *lower* nothing and may only *raise* taint; it can never sanitize. Sanitization is a separate, explicit, auditable operation (`sanitize()` returns a value with a fresh `TR...",
    "operational_effect": "Enforcing the join rule converts a class of silent exfiltration into a *loud, attributable* block: the sink gate now reports `blocked: transitive UNTRUSTED via summarize ← fetch_url`, and the trace names the laundering path. In the 200-run batch, the join rule reduced successful exfiltrations from 41 to 0, at the cost of 6 false blocks where a legitimate sum..."
  },
  "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": "f8b9aef9a241b442ac904a4433c0c4adc99d046ff71d8b7f25ad3ad31a54d47f",
    "verified_classes": [
      "TaintError",
      "Trust",
      "Value",
      "Tool"
    ],
    "verified_functions": [
      "join",
      "run_laundering_chain",
      "__post_init__",
      "__init__",
      "invoke"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintError"
    ],
    "sample_fail_closed_invariants": [
      "label-join failed: summarize laundered provenance"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
