{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-through-agent-authored-tool-arguments-during-retrieved-content-execution",
  "title": "Which invariants prevent taint laundering through agent-authored tool arguments during retrieved-content execution",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agentic loops where a single LLM instance reads untrusted retrieved content (web pages, tool outputs, RAG chunks, email bodies) and then emits tool-call arguments in the same context window. Does not apply to architectures where untrusted content is processed by a physically separate model instance whose output is a typed, schema-validated data structure with no free-form string fields reaching a tool.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-agent-authored-tool-arguments-during-retrieved-content-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-agent-authored-tool-arguments-during-retrieved-content-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-agent-authored-tool-arguments-during-retrieved-content-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2070,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not prompt injection causing the agent to *call* a forbidden tool. It is prompt injection causing the agent to *launder taint* — to take a string that originated in untrusted content and re-emit it as a tool argument whose provenance label the sandbox now reads as \"agent-authored.\" Most taint-tracking sandboxes label data at ingress (retrieved...",
    "what_was_observed": "A retrieval agent was given a `fetch_url` tool (taint sink: egress) and a `search_docs` tool returning untrusted chunks. A retrieved chunk contained, embedded in prose, a URL string: The chunk was correctly tagged `taint=untrusted` at retrieval. The agent, following an instruction also present in the chunk (\"summarize the linked guide\"), emitted: The sandbox saw `url` as a string literal authored by the agent's tool-...",
    "condition_of_validity": "The laundering failure is *bounded* — it does not occur — only when at least one of the following holds, and the invariant must be stated as a disjunction the runtime can actually check: 1. **No-copy invariant:** the tool schema for any taint sink contains no free-form string field. Arguments reaching a sink are drawn from an enum, an opaque handle minted by...",
    "decision_boundary": "The decision boundary is whether a taint sink's argument grammar admits a copy surface. Concretely: - If the sink's argument schema is `{type: string}` with no further constraint, the sink is **unbounded** and must be treated as reachable by any retrieved byte. No taint policy can be enforced on it; the only correct action is to remove the sink or wrap it in...",
    "operational_effect": "Enforcing the no-copy or handle-substitution invariant changes agent capability in measurable ways: - Free-form egress (posting a summary to an arbitrary URL, running a shell command assembled from a document) becomes impossible in-loop. The agent must route such operations through a human-approval gate or a pre-registered allowlist of destinations, because ..."
  },
  "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": "cdea6b8ea4333ca55f55af8aa662b8d4472ba2ca99a33db172a91bd5cb83fb22",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "enforce_taint_policy"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
