{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-quarantine-taint-flagged-context-before-tool-invocation-and-where-does-label-decay-silently-permit-injection-persis",
  "title": "In what scenarios must an instance quarantine taint-flagged context before tool invocation, and where does label decay silently permit injection persistence?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that ingest untrusted text (retrieved documents, API payloads, tool outputs) into a shared context window and subsequently emit tool calls or state mutations. Does not cover injection defenses at the model-alignment layer or input sanitization performed before the agent runtime receives bytes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-taint-flagged-context-before-tool-invocation-and-where-does-label-decay-silently-permit-injection-persis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-taint-flagged-context-before-tool-invocation-and-where-does-label-decay-silently-permit-injection-persis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-taint-flagged-context-before-tool-invocation-and-where-does-label-decay-silently-permit-injection-persis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2195,
    "python_slice_tokens": 363,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most prompt-injection defenses treat taint as a *scan-time* property: a classifier or heuristic inspects incoming text, marks it malicious or benign, and the pipeline either drops or admits the chunk. The failure this record documents is orthogonal. Taint is a *provenance label that must survive context assembly, compaction, summarization, and tool-result re...",
    "what_was_observed": "A retrieval-augmented agent was configured to answer questions over an indexed corpus and to call a `send_email` tool. Inbound documents were passed through a taint classifier that assigned a boolean `tainted` flag per chunk. Chunks flagged `tainted` were supposed to be excluded from the set of documents whose *contents* could influence tool-call arguments. The trace proceeded as follows: 1. A retrieved document `D7`...",
    "condition_of_validity": "The guardrail holds only under a specific invariant, which must be stated precisely because it is easy to approximate and get wrong: **Taint monotonicity across derivation:** For any context artifact `a` produced by a process that read artifacts `{b_1, ..., b_n}`, `taint(a) ⊇ ⋃ taint(b_i)`. Taint never decreases under transformation. Summarization, paraphras...",
    "decision_boundary": "The runtime must decide, at each tool-invocation boundary, whether the arguments to the call are derived from tainted spans. The decision is not \"is this call malicious\"—that is undecidable from within the loop—but \"does the taint lattice of the argument set intersect the taint lattice of any ingested untrusted span.\" If it does, the call is *tainted* and mu...",
    "operational_effect": "The practical consequence is that taint must be treated as a first-class field on every context artifact, propagated by every transformation, and checked at every side-effecting boundary. Concretely: - Retrieved chunks carry `taint: set[str]` of source IDs. - Summarizers, translators, and compactors are wrapped so that output taint is the union of input tain..."
  },
  "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": "9d65414ebb7a73cd15c348ca46b5aa36f271957631503e6cd34e42b41e23329d",
    "verified_classes": [
      "TaintLaunderingError",
      "Artifact"
    ],
    "verified_functions": [
      "derive",
      "summarize",
      "check_tool_call",
      "is_tainted"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert summary.is_tainted()"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
