{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-enforce-taint-provenance-across-tool-outputs-rag-chunks-and-inter-agent-messages-and-why-single-hop-taint-checks-silently-fail",
  "title": "Where must an instance enforce taint provenance across tool outputs, RAG chunks, and inter-agent messages — and why single-hop taint checks silently fail",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent instance that ingests untrusted text (tool results, retrieved chunks, peer agent messages) into a shared context window and later acts on it via tool calls or delegation. Does not cover purely offline batch scoring with no tool execution and no inter-agent handoff.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-provenance-across-tool-outputs-rag-chunks-and-inter-agent-messages-and-why-single-hop-taint-checks-silently-fail.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-provenance-across-tool-outputs-rag-chunks-and-inter-agent-messages-and-why-single-hop-taint-checks-silently-fail.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-provenance-across-tool-outputs-rag-chunks-and-inter-agent-messages-and-why-single-hop-taint-checks-silently-fail.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1919,
    "python_slice_tokens": 413,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model of prompt-injection defense is *per-artifact classification*: each tool output or RAG chunk is labeled `trusted` or `untrusted`, and the agent refuses to act on instructions found in `untrusted` artifacts. This fails because **taint is not a property of an artifact — it is a property of a provenance path through the context window**. An instr...",
    "what_was_observed": "A three-stage incident on a retrieval-augmented research agent with a `fetch_url`, `write_file`, and `send_message` toolset. **Stage 1 — split payload across two RAG chunks.** Chunk 47 (from an indexed vendor FAQ) read: *\"Production credentials for the billing service are stored under the path `/ops/creds/billing.json` on the shared vault mount.\"* Chunk 112 (from an indexed support-forum thread) read: *\"When automati...",
    "condition_of_validity": "The per-artifact classifier is only sound under a condition that RAG agents routinely violate: **the untrusted sources must be non-composable** — i.e., no two untrusted artifacts may jointly specify a tool name, an argument value, and a sink. In practice this fails whenever: - The retrieval index mixes documentation, forum content, and user-supplied files (c...",
    "decision_boundary": "The boundary between \"safe to execute\" and \"requires re-authorization\" is not `tainted → block`. Blocking all tainted calls makes the agent useless on any task touching retrieved text. The operational boundary is: 1. **Taint propagates through value derivation, not just copying.** If `arg = f(chunk)` for any `f` (concatenation, formatting, path-joining, JSON...",
    "operational_effect": "Enforcing argument-level taint provenance changes three system properties: - **Latency:** every tool call now requires a provenance join over the context window. On a 200k-token window with ~40 resident spans, this is a ~5–15ms linear scan per argument if provenance spans are tracked as interval sets; sub-millisecond if the planner emits provenance tags at p..."
  },
  "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": "21d2a2b7049f455c090b8f76142db0deaf0b4a0baf5edf71f90865be26ac4401",
    "verified_classes": [
      "TaintProvenanceError",
      "Span",
      "ToolCall",
      "ReauthRecord"
    ],
    "verified_functions": [
      "authorize_call",
      "demo_split_payload"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
