{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-tool-result-as-tainted-provenance-label-propagation-across-agent-tool-boundaries",
  "title": "When must an instance treat a tool result as tainted: provenance-label propagation across agent tool boundaries",
  "date_of_record": "2026 November 18",
  "scope": "Applies to agent runtimes that attach data-flow provenance labels (taint bits) to values and enforce sinks (shell, HTTP, file writes, outbound messages) against those labels. Does not apply to stateless single-turn LLM calls with no persistent value store, nor to systems whose only defense is prompt-level instruction (\"ignore injected instructions\"), which have no provenance substrate to reason about.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-provenance-label-propagation-across-agent-tool-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-provenance-label-propagation-across-agent-tool-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-provenance-label-propagation-across-agent-tool-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1779,
    "python_slice_tokens": 311,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **label propagation across a tool boundary** and **label laundering by value transformation**. A tool result that returns bytes derived from untrusted input (a fetched web page, a retrieved document, a third-party API response) must carry a `tainted` label into the agent's value store. The failure mode is not forgetting to...",
    "what_was_observed": "In a multi-tool agent (fetch → extract → summarize → act), the following sequence repeatedly produced sink violations that the taint tracker did not catch: 1. `fetch(url)` returns HTML. Runtime correctly labels the raw bytes `tainted:web`. 2. `extract(html)` returns a dict of text spans. The runtime labels the dict `tainted:web` — correct so far. 3. `summarize(spans)` is implemented as an LLM call. Its output is a pl...",
    "condition_of_validity": "The causal-origin invariant holds — and the trust-reset shortcut is invalid — under all of the following: - The tool's output is a **function of its inputs** (deterministic or model-mediated, but causally downstream). If the tool's output is genuinely independent of tainted inputs (e.g., `now()` returning wall-clock time), the trust reset is legitimate and t...",
    "decision_boundary": "At each tool boundary, the runtime must decide: **does the output inherit the union of input labels, or does it start clean?** Inherit (union of input labels) when *any* of: - The tool's implementation reads its arguments and its output is derived from them (the default for all pure/transform tools). - The tool invokes an LLM or any probabilistic component o...",
    "operational_effect": "Enforcing causal-origin preservation changes three things: 1. **Taint spreads further than naive trackers expect**, so sink checks fire on legitimate flows (a user's own question summarized and echoed back). This is the correct trade: false positives are recoverable via explicit declassification; false negatives are exfiltration. Budget for a declassificatio..."
  },
  "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": "f1f137a3b081ba5441f234cd32b171361df37ef17bd959014cd43a135b973289",
    "verified_classes": [
      "TaintLaunderingError",
      "Labeled",
      "Declassification"
    ],
    "verified_functions": [
      "_value_hash",
      "apply_tool",
      "check_sink",
      "is_tainted"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
