{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-launder-a-tainted-argument-through-a-clean-tool-return",
  "title": "When must an instance refuse to launder a tainted argument through a \"clean\" tool return",
  "date_of_record": "2026 November 20",
  "scope": "Applies to single- or multi-agent systems that attach provenance/taint labels to context segments and propagate them across tool-call boundaries (MCP tool calls, function calling, A2A handoffs). Does not cover taint tracking within a single model turn where no external tool output re-enters context, nor static prompt-hardening without runtime labels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-a-tainted-argument-through-a-clean-tool-return.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-a-tainted-argument-through-a-clean-tool-return.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-a-tainted-argument-through-a-clean-tool-return.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1756,
    "python_slice_tokens": 414,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent got injected.\" It is that the agent's *taint algebra* treats a tool's **return value** as a fresh, trusted provenance root, while the tool's **invocation** was driven by tainted input. The label collapses at the tool boundary: an argument carrying `taint=untrusted(web)` enters a tool, and the tool's output re-enters context labe...",
    "what_was_observed": "A research agent was tasked: \"Summarize the top three results for query Q and, if any result mentions a refund policy, email the summary to ops@corp.\" Tools: `web_search` (returns snippets, labeled `untrusted(web)`), `summarize` (labeled `trusted(tool:summarize)` because its code is vetted), `send_email` (a control-action sink, gated on `taint=trusted` for its body). Trace: 1. `web_search(Q)` returns snippets, each l...",
    "condition_of_validity": "The laundering failure is *possible* exactly when all of the following hold: - **Declassifying join.** At least one tool's output-provenance rule is `trusted` independent of its arguments (a constant label), rather than `join(arg_taints) ⊔ tool_intrinsic`. - **Control-relevant sink.** A downstream action (send, write, execute, delete, spend) gates on the lab...",
    "decision_boundary": "The boundary the agent must enforce at runtime, per tool call: - Compute `arg_taint = ⊔ {label(a) : a ∈ args}`. - Compute `out_label = arg_taint ⊔ intrinsic(tool)`. - If `out_label` is untrusted and the tool's declared `output_provenance` is a constant `trusted`, **reject the call** (or downgrade the declared label to the computed join) — do not proceed on t...",
    "operational_effect": "Systems that skip the join produce silent, audit-invisible exfiltration: gates pass, logs show `trusted`, and the only artifact is a wrong recipient or an outbound payload whose tokens trace to an untrusted root. The remediation is architectural, not prompt-level: (1) make output provenance a *function* of argument provenance (join), never a constant, for an..."
  },
  "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": "52ee79cabecf57b28751c8707dbf62891bc4e1218f5c3369aab320abf6fce55b",
    "verified_classes": [
      "Taint",
      "ProvenanceLaunderingError",
      "ToolContract",
      "Value"
    ],
    "verified_functions": [
      "invoke_tool",
      "gate_control_sink",
      "run_agent_turn",
      "join",
      "is_trusted",
      "__or__"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
