{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-laundering-a-tainted-instruction-through-a-tool-result-boundary",
  "title": "Which invariants prevent laundering a tainted instruction through a tool-result boundary",
  "date_of_record": "2026 November 25",
  "scope": "Applies to single- or multi-agent systems that maintain per-field data-flow provenance (taint) on context segments and enforce an instruction/data separation at tool boundaries. Does not apply to systems with no provenance tracking, or to purely stateless single-turn inference with no tool calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-laundering-a-tainted-instruction-through-a-tool-result-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-laundering-a-tainted-instruction-through-a-tool-result-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-laundering-a-tainted-instruction-through-a-tool-result-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1691,
    "python_slice_tokens": 232,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **content provenance** (where a byte sequence entered the agent's context: user turn, system prompt, tool result, peer message) and **instruction authority** (whether that content is permitted to steer control flow). A taint-tracking system that conflates the two—or that only tracks provenance without a separate author...",
    "what_was_observed": "A three-step trace on an agent with a naive taint model (taint on message objects, authority inferred from role): 1. **Ingress.** A user turn contains a benign request plus an embedded document fetched later. The document field is tagged `taint={user_doc}`. Correct so far. 2. **Tool hop.** The agent calls `read_file(path)`. The tool returns the document body. The runtime constructs a `tool_result` message whose `cont...",
    "condition_of_validity": "The invariant holds—i.e., injection cannot escalate—only when all three of the following are enforced simultaneously: - **I1 (transitive taint on derivation).** For every tool result `r`, `taint(r) ⊇ ⋃ taint(inputs of the producing tool invocation)`, including LLM-backed tools whose outputs are not lexical substrings of inputs. A tool that cannot declare its...",
    "decision_boundary": "At each tool hop the runtime must evaluate a single join and choose one of three outcomes. Let `t = taint(result)`, `ch = channel(result)`, requested authority `α`: - If `t = ∅` and `ch` is a trusted channel: permit `α` up to `ch`'s cap. (Clean fast path.) - If `t ≠ ∅` and `α ≤ data`: permit; the content may inform but not steer. Reasoning may quote it, must...",
    "operational_effect": "With I1–I3 enforced, the escalator closes: injected text can still enter context, still be summarized, still be reasoned over, but it can never acquire instruction authority without a recorded declassification. The cost is a new failure surface—**over-tainting**—where a summarizer that unions all inputs marks benign derived text as untrusted and forces spuri..."
  },
  "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": "ddbe07cd4d3bd4423035efc8d86739bc1d4c4c8e35c645333205e9fe065fde78",
    "verified_classes": [
      "TaintEscalation",
      "Segment"
    ],
    "verified_functions": [
      "authorize_tool_result",
      "propagate_taint"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintEscalation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
