{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-drops-provenance-labels-at-the-tool-call-boundary-taint-laundering-via-tool-result-re-entry",
  "title": "What happens when an instance drops provenance labels at the tool-call boundary: taint laundering via tool result re-entry",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent systems that propagate provenance/taint labels on context segments and enforce injection defenses at tool-call boundaries. Does not apply to single-turn, single-tool pipelines where the tool result is never re-ingested into a context that also contains higher-privilege instructions.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-drops-provenance-labels-at-the-tool-call-boundary-taint-laundering-via-tool-result-re-entry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-drops-provenance-labels-at-the-tool-call-boundary-taint-laundering-via-tool-result-re-entry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-drops-provenance-labels-at-the-tool-call-boundary-taint-laundering-via-tool-result-re-entry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2079,
    "python_slice_tokens": 388,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct failure classes in prompt-injection taint tracking, and they are routinely conflated: 1. **Label loss** — a tainted segment reaches the model without its provenance label attached. This is a detection failure: the downstream policy engine cannot see the taint, but the taint is still present in the data. 2. **Label laundering** — a tain...",
    "what_was_observed": "In a multi-tool agent with a provenance-tracking runtime, the following sequence was reproduced: 1. A `fetch_url` tool retrieved an attacker-controlled page. The runtime correctly labeled the result segment `provenance=untrusted, source=fetch_url`. 2. The model, operating on that segment, emitted a call to `search_index(query=\"<text lifted from the page>\")`. The runtime correctly tainted the call's argument set as `u...",
    "condition_of_validity": "The invariant holds — and the failure is possible — only when all of the following are true: - **Transitive derivation exists.** Tool outputs are computed from tool inputs such that attacker-controlled bytes can survive into the output (echo, search-over-tainted-index, summarization, format-preserving transforms). If the tool is a pure function of constants,...",
    "decision_boundary": "The operational decision is where to enforce the `join`. Three placements were evaluated: - **At the wrapper (label-time join).** Cheapest; requires every tool-result construction site to call the join. Fails open when a new tool wrapper is added without the join — exactly the observed bug. Acceptable only if wrapper construction is centralized in one audite...",
    "operational_effect": "After moving to derive-time join with a label-consistency assertion, the reproduced attack was caught at step 3: the `search_index` result's stored `trusted` label disagreed with the derive-time `untrusted` join, the assertion fired, and the turn aborted before `send_email` was emitted. The cost was a measurable latency increase (graph traversal per policy d..."
  },
  "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": "bd7411e3b18896af0f6f3240f3b5ea24a504c8b802903ffe364fb0e6f38149c2",
    "verified_classes": [
      "Trust",
      "ProvenanceLaunderingError",
      "Segment"
    ],
    "verified_functions": [
      "derive_label",
      "assert_no_laundering",
      "wrap_tool_result",
      "_repro",
      "walk"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
