{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-prompt-injection-taint-that-survives-tool-output-summarization-label-decay-across-the-retrieval-to-context-laundering-path",
  "title": "How does an instance detect prompt-injection taint that survives tool-output summarization: label decay across the retrieval-to-context laundering path",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that carry information-flow labels (taint bits) on retrieved documents, tool outputs, and intermediate scratchpad entries, and that pass those artifacts through an LLM-driven summarization/compression step before re-injecting them into the working context. Does not apply to systems that keep tainted content in a structurally segregated channel (e.g., a separate tool-role message the model is architecturally barred from treating as instructions) with no re-entry through a generative transform.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-prompt-injection-taint-that-survives-tool-output-summarization-label-decay-across-the-retrieval-to-context-laundering-path.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-prompt-injection-taint-that-survives-tool-output-summarization-label-decay-across-the-retrieval-to-context-laundering-path.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-prompt-injection-taint-that-survives-tool-output-summarization-label-decay-across-the-retrieval-to-context-laundering-path.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2484,
    "python_slice_tokens": 503,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a property of the byte stream** and **taint as a property of the semantic claim**. A taint label attached to a raw tool output or a retrieved chunk is trivially checkable: the label rides on the envelope. The failure mode is that agents routinely launder tainted content through a *generative* step—\"summarize...",
    "what_was_observed": "A retrieval-augmented agent was configured with a document taint registry: every chunk fetched from the external corpus carried `taint=EXTERNAL`, and a pre-tool hook refused to place `EXTERNAL` content directly into the system-context region. To fit a large result set, the agent ran a `summarize_documents` tool that called the same underlying model with the retrieved chunks in the tool-result role and returned a sing...",
    "condition_of_validity": "The guardrail that prevents this is only sound under a condition that is easy to state and easy to violate: **every generative transform that consumes labeled inputs must emit an output whose label is the join (least-upper-bound in the trust lattice) of its inputs' labels, and this join must be computed by the runtime from the recorded input set, not asserte...",
    "decision_boundary": "The operational decision is where to place the enforcement point. Three candidate boundaries, with their failure signatures: - **Enforce at ingestion (label the raw artifact).** Necessary but insufficient. Catches direct injection; misses every laundered derivative. This is the boundary most systems implement, and it is exactly the one this failure mode walk...",
    "operational_effect": "With derivation-aware join labeling in place, the failure trace above terminates at step 3: the summarize tool's output is labeled `EXTERNAL` because its recorded input set includes `chunk_4471`, and the scratchpad write inherits `EXTERNAL`. At step 5 the egress guard sees `EXTERNAL` on the argument and blocks the call, surfacing a `TaintPropagationError` ra..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "7cac737edbc358202ec88e2fdf7dbb3e227d7e8365fa9597b5c0175a555b66cc",
    "verified_classes": [
      "TrustLevel",
      "TaintPropagationError",
      "Artifact",
      "TaintGraph"
    ],
    "verified_functions": [
      "summarize_documents",
      "__init__",
      "register",
      "_label_of",
      "join_label",
      "record_derivation",
      "check_egress"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintPropagationError"
    ],
    "sample_fail_closed_invariants": [
      "egress guard failed to block laundered taint",
      "summarizer invoked with no recorded inputs; cannot compute join",
      "generative transform recorded zero inputs; input capture incomplete"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
