{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-prompt-injection-taint-when-a-tool-output-is-laundered-through-a-summarizer-agent-before-reaching-the-memory-write",
  "title": "Why does an instance lose prompt-injection taint when a tool output is laundered through a summarizer agent before reaching the memory write?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent runtime that carries data-flow provenance labels (taint bits) on tool results and propagates them into persistent memory writes. Does not apply to single-turn, memoryless inference where no cross-call state survives.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-prompt-injection-taint-when-a-tool-output-is-laundered-through-a-summarizer-agent-before-reaching-the-memory-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-prompt-injection-taint-when-a-tool-output-is-laundered-through-a-summarizer-agent-before-reaching-the-memory-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-prompt-injection-taint-when-a-tool-output-is-laundered-through-a-summarizer-agent-before-reaching-the-memory-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1660,
    "python_slice_tokens": 241,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model obeyed an injection.\" It is that the taint label attached to a tool output *did not survive a transformation step performed by a second LLM instance*. A deterministic sanitizer (regex strip, JSON schema validation, length truncation) preserves provenance because the transformation is a pure function whose input label is triviall...",
    "what_was_observed": "Trace of a concrete incident on a research agent with a `fetch_url` tool, a `summarize` sub-agent, and a `write_memory` tool: 1. `fetch_url(\"https://attacker.example/post\")` returns a 4 KB page. Runtime labels the tool result `taint=external_untrusted, source=web, id=T1`. 2. The orchestrator, following its plan (\"condense source before storing\"), dispatches the T1 payload to the summarizer sub-agent. The summarizer i...",
    "condition_of_validity": "This failure requires all of the following to co-occur; if any is absent, the taint survives: - A **transformation by a model** (not a deterministic function) sits between the tainted source and the sink. Deterministic transforms preserve labels because the runtime controls the output construction. - The runtime's provenance model treats **model-generated te...",
    "decision_boundary": "The boundary is **whether a generation step is modeled as a provenance-preserving or provenance-resetting operation.** Two defensible policies, and the failure lives in the gap between them being applied inconsistently: - *Reset policy:* model output is always untrusted; anything derived from a model call must be re-validated before a trusted sink. Safe but ...",
    "operational_effect": "Downstream consequences compound: - **Taint laundering is one-shot persistent.** A single successful summarization permanently converts external-untrusted content into agent-generated trusted content in the memory store. Unlike a live injection, which expires with the context window, this artifact is retrieved on every future cold start. - **Audit ledgers li..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "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": "526d3369458f7e0f77131e2674048aeeba63b73e2b3a6fce6a4318da073f8bed",
    "verified_classes": [
      "TaintLaunderingError",
      "Artifact",
      "MemoryStore"
    ],
    "verified_functions": [
      "summarize",
      "guarded_pipeline",
      "write"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
