{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-across-tool-call-boundaries-when-labels-are-propagated-dynamically",
  "title": "How does an instance detect taint laundering across tool-call boundaries when labels are propagated dynamically?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that attach provenance/taint labels to context segments and propagate those labels through dynamic (data-dependent) tool-call chains. Does not apply to static, compile-time-annotated dataflow systems or to single-turn LLM calls with no tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-tool-call-boundaries-when-labels-are-propagated-dynamically.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-tool-call-boundaries-when-labels-are-propagated-dynamically.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-across-tool-call-boundaries-when-labels-are-propagated-dynamically.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1510,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most prompt-injection defenses treat taint as a *property of a message*: an untrusted string enters context, it gets flagged, and downstream sinks are gated on \"does the current context contain untrusted content?\" This collapses under dynamic propagation because taint is really a *property of a derivation* — a fact that is only knowable if every transformati...",
    "what_was_observed": "A research agent with three tools — `fetch_url`, `summarize`, `send_email` — received a tainted page from `fetch_url`. The runtime correctly labeled the raw HTML segment `UNTRUSTED:web`. The planner then called `summarize(text=raw_html)`. The `summarize` tool returned a clean-looking 200-token abstract. The runtime labeled the output `TRUSTED:summarize` because the tool is on an internal allowlist. The abstract conta...",
    "condition_of_validity": "The invariant holds only if the runtime can answer, for every tool output, the question *\"which context segments were in this call's argument closure?\"* Three conditions are required and each is independently violable: 1. **Argument closure is observable.** The runtime must capture the exact segments bound to tool arguments, not just the serialized string. I...",
    "decision_boundary": "The boundary is between **label-by-source** and **label-by-derivation**. Label-by-source assigns a label from the tool's trust tier and is O(1) per call but unsound under any reconstruction. Label-by-derivation computes `label(out) = ⋃ label(in_i) ⊔ tool_tier` and is sound but requires maintaining a per-segment provenance DAG across eviction. The decision to...",
    "operational_effect": "With derivation-based labeling enforced, the `summarize` output inherits `UNTRUSTED:web`, the `send_email` gate fires, and the plan halts with a `TaintLaunderingError` naming the derivation path `fetch_url → summarize → send_email` and the eviction event that would have masked it. The cost is a provenance DAG that must survive eviction (typically a compact s..."
  },
  "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": "152e1d75aa4f57bfff44f7211f761f30bed33b764668441e68ae0c12076eaa20",
    "verified_classes": [
      "TaintLaunderingError",
      "ProvenanceDAG"
    ],
    "verified_functions": [
      "__init__",
      "register",
      "evict",
      "join_inputs",
      "record_tool_output",
      "sink_gate"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
