{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-launders-a-tainted-value-through-a-tool-result-and-the-policy-gate-only-inspects-the-immediate-provenance",
  "title": "What happens when an instance launders a tainted value through a tool result and the policy gate only inspects the immediate provenance",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that enforce information-flow / taint policies at the boundary where LLM-generated arguments are converted into tool invocations, and where tool results are re-injected into context. Does not apply to systems that quarantine every tool output until re-typed by a trusted adapter, nor to single-turn, stateless tool calls with no result feedback.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-a-tainted-value-through-a-tool-result-and-the-policy-gate-only-inspects-the-immediate-provenance.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-a-tainted-value-through-a-tool-result-and-the-policy-gate-only-inspects-the-immediate-provenance.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-a-tainted-value-through-a-tool-result-and-the-policy-gate-only-inspects-the-immediate-provenance.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1489,
    "python_slice_tokens": 191,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *syntactic provenance* (which message or tool call slot a value arrived in) and *semantic provenance* (which untrusted source originally authored the bytes). A taint gate placed only at the output-to-tool-input boundary observes syntactic provenance: it labels the argument string produced by the model in the current tu...",
    "what_was_observed": "A three-tool agent (fetch, shell, mailer) was given a policy: values derived from `fetch` output may not flow into `shell` or `mailer` arguments. The gate implemented this by tagging each tool result with a taint label and, at invocation time, checking whether any argument string appeared verbatim in a tainted result. Verbatim matching held for the first hop. The failure trace: 1. `fetch(\"https://untrusted.example/no...",
    "condition_of_validity": "The immediate-provenance check is only sound under a condition the runtime almost never satisfies: that the model cannot transform a tainted value into a non-matching but semantically equivalent form before emitting it. That condition holds only if (a) the gate normalizes arguments through the same canonicalization the downstream tool applies (path normaliza...",
    "decision_boundary": "The boundary is not \"is this argument tainted?\" but \"**can this argument's value be traced, through the model's transformation, to a tainted source?**\" Two defensible architectures bound the problem: - **Lineage-carrying values.** Tainted tool results are stored in a side channel keyed by a token; the model may only reference them by opaque handle (`{{ref:7f...",
    "operational_effect": "Without lineage or re-derivation, the gate provides the appearance of enforcement while admitting every paraphrase, encoding, and whitespace mutation — and the model, being probabilistic, will find those mutations because its training distribution contains them. The practical consequence is that a single untrusted fetch contaminates the entire subsequent ses..."
  },
  "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": "1831f650ce769db59dc6126b17b4a472429effa7b52a5eef4429edd1d93d5c3a",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "canonicalize",
      "gate_argument",
      "invoke"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
