{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-terminate-taint-propagation-when-a-tool-response-re-enters-the-agent-with-a-label-that-contradicts-the-label-the-agent-already",
  "title": "Where must an instance terminate taint propagation when a tool response re-enters the agent with a label that contradicts the label the agent already assigned to the same bytes?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent runtimes that attach dynamic information-flow (taint) labels to context segments and propagate them across tool-call boundaries. Does not apply to stateless single-turn inference with no persistent context store, nor to systems using only static system-prompt segregation without per-segment labels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-terminate-taint-propagation-when-a-tool-response-re-enters-the-agent-with-a-label-that-contradicts-the-label-the-agent-already.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-terminate-taint-propagation-when-a-tool-response-re-enters-the-agent-with-a-label-that-contradicts-the-label-the-agent-already.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-terminate-taint-propagation-when-a-tool-response-re-enters-the-agent-with-a-label-that-contradicts-the-label-the-agent-already.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1834,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-tracking designs assume the label is a property of the *data*: bytes originating from an untrusted tool are labeled `UNTRUSTED`, and that label travels with the bytes wherever they go. The failure mode described here is the opposite: the label is a property of the *provenance event*, and when the same bytes re-enter the agent through a second path...",
    "what_was_observed": "A retrieval-augmented agent fetched a document from an untrusted source (`web_fetch`) and the runtime correctly labeled the returned chunk `T_UNTRUSTED`, gating downstream tool calls that could exfiltrate (e.g., `send_email`, `http_post`) behind a confirmation check. The agent then summarized the chunk and passed the summary to a second tool, `cache_lookup`, which returned a *verbatim substring* of the original untru...",
    "condition_of_validity": "The monotonicity invariant is *necessary and sufficient* to bound this failure class only under the following conditions: - **Content identity is computed over the exact bytes that will be consumed downstream.** If the runtime hashes a normalized form for dedup but a raw form for policy evaluation, an attacker can produce a normalization collision (e.g., Uni...",
    "decision_boundary": "The runtime must choose, at the moment of re-entry, between three policies. Only one is sound: The boundary is sharp: any policy that permits the effective label of an existing segment to *decrease* is exploitable. The join must be over the taint lattice with `UNTRUSTED ⊔ TRUSTED = UNTRUSTED`. The incoming label from any tool response is a *lower bound* on t...",
    "operational_effect": "With monotonic join enforced, the cache-echo attack in the trace above fails at step 3: `T_UNTRUSTED ⊔ T_TRUSTED = T_UNTRUSTED`, the exfiltration gate on `send_email` continues to fire, and the agent must route through confirmation. The attacker's echo channel is neutralized because echoing cannot *lower* taint—it can only confirm or raise it. The cost is a ..."
  },
  "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": "e1d4da0b4ed251ed253a6139d6295b2136046be319701430b4710b007308a080",
    "verified_classes": [
      "Taint",
      "TaintLaunderingAttempt",
      "ContextStore"
    ],
    "verified_functions": [
      "gate_exfiltration",
      "join",
      "_key",
      "bind",
      "label_of"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingAttempt"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
