{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-label-laundering-across-agentic-tool-call-retry-loops",
  "title": "Which invariants prevent taint-label laundering across agentic tool-call retry loops",
  "date_of_record": "2026 November 15",
  "scope": "Applies to agentic pipelines where tool outputs are labeled with taint (e.g., `untrusted_external`, `contains_pii`, `model_generated`) and a runtime enforces propagation of those labels into downstream tool arguments and prompts. Does not apply to stateless single-shot tool calls with no retry, no caching, and no cross-turn memory, where taint cannot survive a turn boundary by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-across-agentic-tool-call-retry-loops.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-across-agentic-tool-call-retry-loops.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-across-agentic-tool-call-retry-loops.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1629,
    "python_slice_tokens": 190,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a property of the data value** and **taint as a property of the invocation frame**. Most runtime implementations track taint on the value: a string returned by `fetch_url` is tagged `untrusted_external`, and any argument derived from it inherits the tag. This is the textbook model, and it is correct for a si...",
    "what_was_observed": "In a pipeline with three tools (`fetch_url`, `parse_html`, `send_email`), the following sequence was reproduced: 1. `fetch_url` returned attacker-controlled HTML, correctly tagged `untrusted_external`. 2. `parse_html` extracted a \"contact address\" and a \"requested action\" string; both inherited the tag. 3. `send_email` was invoked with `to=<extracted address>`, `body=<extracted action>`. The runtime correctly blocked...",
    "condition_of_validity": "The frame-level taint rule is valid, and must be enforced, exactly when all of the following hold: - The runtime permits **retry or reformulation** of a tool call after a taint violation or a recoverable error. (If a violation is terminal, the frame rule is vacuous.) - The model's context at retry time includes **any byte** of the tainted value, the tainted ...",
    "decision_boundary": "The decision boundary is between **value-provenance tracking** and **frame-provenance tracking**, and the runtime must choose per-retry, not per-pipeline: - If the retry is a **transport retry** (same bytes, same arguments, only the network failed), the frame is the same frame. Value provenance suffices; no new taint evaluation is needed. - If the retry is a...",
    "operational_effect": "Enforcing frame-level inheritance changes the failure mode from **silent laundering** to **loud, recoverable blocking**. The observable effects: - Taint violations on retry become terminal unless the runtime can demonstrate a complete clean-room scrub. This is the correct default: a blocked send is recoverable; a laundered send is not. - The runtime must mai..."
  },
  "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": "fcc883ffc4af9a9c2ed685dcb8d82ccf1f664145964d954ec11170412158260a",
    "verified_classes": [
      "TaintLaunderingError",
      "Frame"
    ],
    "verified_functions": [
      "evaluate_sink",
      "retry_after_violation",
      "absorb"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
