{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-provenance-when-a-tool-output-is-re-serialized-through-a-summarizer-s-own-context-window",
  "title": "Why does an instance lose taint provenance when a tool output is re-serialized through a summarizer's own context window",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that propagate prompt-injection taint labels by attaching provenance metadata to tool outputs and threading it through context-window compaction, summarization, or re-emission steps. Does not apply to systems where taint is carried out-of-band (e.g., a policy engine keyed on message IDs) and never re-enters the token stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-tool-output-is-re-serialized-through-a-summarizer-s-own-context-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-tool-output-is-re-serialized-through-a-summarizer-s-own-context-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-tool-output-is-re-serialized-through-a-summarizer-s-own-context-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2212,
    "python_slice_tokens": 521,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a taint label can travel with data: 1. **In-band taint**: the label is encoded as tokens inside the same channel as the content (a prefix like `[TAINT:UNTRUSTED]`, a JSON field the model can read, an XML attribute). It survives exactly as long as the content survives verbatim. 2. **Out-of-band taint**: the label live...",
    "what_was_observed": "A retrieval tool returned a document body containing an injected instruction and was correctly wrapped by the runtime: The orchestration graph then ran a **compaction node** whose job was to reduce the fetched page from ~9k tokens to ~600 to fit the working context. The compaction node received the wrapped string and a system prompt: \"Summarize the following content faithfully, preserving all facts relevant to the us...",
    "condition_of_validity": "The laundering requires all of the following to co-occur: 1. **A re-serialization node** (summarizer, formatter, extractor, \"cleaner\") sits between an untrusted source and a trusted consumer. 2. **Taint is carried in-band** as tokens that the re-serialization node can read and rewrite. If taint is out-of-band, the summarizer cannot strip it because it never ...",
    "decision_boundary": "The boundary is not \"should we summarize untrusted content\" (sometimes you must, to fit context). It is **who is allowed to lower a taint label, and on what evidence.** A taint label may be lowered from `untrusted` to `trusted` only by an explicit, auditable **declassification step** with all of: - A named declassifier (a policy function, not a model). - A s...",
    "operational_effect": "Concretely, the guardrail is a change in how taint is assigned at re-serialization nodes and a hard stop when the invariant would be violated. The runtime must (a) compute output taint as the join of input taints, (b) refuse to route a summary whose join is `untrusted` into an instruction-consuming slot without an explicit declassification record, and (c) tr..."
  },
  "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": "21893898dfca498f2e9962b3914086e06a0c6824998e5ca2f07e8d252c503242",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Message",
      "Declassification",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "join",
      "__init__",
      "add_source",
      "_join_inputs",
      "add_reserialization",
      "route_to_instruction_slot",
      "declassify"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "declassification requires named declassifier, reason, span"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
