{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-launder-tainted-data-through-a-re-entrant-tool-call-after-a-policy-check-passes",
  "title": "Why does an instance launder tainted data through a re-entrant tool call after a policy check passes",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agent runtimes that enforce egress policy at tool-invocation boundaries using taint labels propagated from untrusted inputs (retrieved documents, tool outputs, prompt-injected context). Does not apply to runtimes that reset taint per turn, nor to stateless single-call inference with no tool loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-launder-tainted-data-through-a-re-entrant-tool-call-after-a-policy-check-passes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-launder-tainted-data-through-a-re-entrant-tool-call-after-a-policy-check-passes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-launder-tainted-data-through-a-re-entrant-tool-call-after-a-policy-check-passes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2466,
    "python_slice_tokens": 492,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-aware egress gate answers one question at a time: *given the current taint label of the arguments, may this tool call proceed?* That is a **point check on a single invocation**. The failure mode documented here is not a broken check — the check is correct and returns the right verdict. The failure is that the gate treats the *invocation* as the unit ...",
    "what_was_observed": "A research agent was given a fetch-and-report task. Its toolset: - `fetch_url(url) -> text` — egress class `NET_READ`, output taint `UNTRUSTED` (inherits document provenance). - `summarize(text) -> summary` — declared a **declassifier**: it may consume `UNTRUSTED` and emits `TRUSTED` because the runtime assumes the summarizer strips instruction-like content. - `post_webhook(payload)` — egress class `NET_WRITE`, gate ...",
    "condition_of_validity": "The per-call gate is sound **only** when all three of the following hold: - **(C1) Declassifier soundness is verified, not declared.** A tool may transition `UNTRUSTED -> TRUSTED` only if the runtime can bound the tool's output as a function of its input such that no input-controlled substring survives. For LLM-backed declassifiers this is *never* true in ge...",
    "decision_boundary": "The boundary is between two defensible designs, and the choice is not stylistic: - **Enforce at the call, accept laundering risk.** Cheaper, lower latency, compatible with arbitrary third-party tools. Valid only if the toolset is closed, declassifiers are hand-audited per C1, and the agent has no free-form scratchpad that can re-emit content (C2). In practic...",
    "operational_effect": "After the incident, the runtime was changed in three ways, each mapping to a broken condition: 1. `summarize` was removed from the declassifier allowlist and reclassified `UNTRUSTED_DERIVED` (fixes C1). The egress gate for `post_webhook` was widened to list the exact labels it accepts, and `UNTRUSTED_DERIVED` was not among them. 2. The context-write path was..."
  },
  "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": "fd5ea3c8b15c401f1b0ed5003025de2fa806bdfe7eb85de30a6082420d498f7c",
    "verified_classes": [
      "TaintLabel",
      "EgressClass",
      "TaintLaunderingError",
      "ToolSpec",
      "Call",
      "Turn"
    ],
    "verified_functions": [
      "check_call",
      "check_turn_path",
      "run_laundering_attempt",
      "append"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
