{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-provenance-when-a-laundered-value-re-enters-through-a-memory-write",
  "title": "Why does an instance lose taint provenance when a laundered value re-enters through a memory write?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that propagate untrusted-value taint across sequential tool calls and persist intermediate results to episodic or semantic memory. Does not apply to single-hop tool invocations whose outputs are consumed only inline and discarded before any memory write.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-laundered-value-re-enters-through-a-memory-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-laundered-value-re-enters-through-a-memory-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-laundered-value-re-enters-through-a-memory-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1931,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint propagation within a single reasoning turn is a *dataflow* property: the runtime labels each value returned by a tool with the provenance of its inputs, and the label travels with the value as it is passed into the next tool call. Taint persistence across turns is a *storage* property: the label must survive serialization into memory and deserializatio...",
    "what_was_observed": "A three-hop chain executed across two turns: 1. **Turn 1, hop 1:** `fetch_url(\"https://untrusted.example/page\")` returns document text. Runtime labels the return value `taint=[UNTRUSTED_EXTERNAL, source=untrusted.example]`. 2. **Turn 1, hop 2:** `extract_entities(text)` is called with the tainted text. The runtime correctly propagates: output labeled `taint=[UNTRUSTED_EXTERNAL]`, derived. 3. **Turn 1, hop 3:** `memor...",
    "condition_of_validity": "The invariant that must hold for taint to be sound across memory is: > For every memory record `r`, `r.provenance` must be a join (least upper bound) over the provenance of every value that contributed to `r.content`, computed transitively through all transformation hops, and this join must be recomputed on every write, including overwrites. This invariant i...",
    "decision_boundary": "The design choice is between **label-carrying memory** and **boundary re-derivation**: - **Label-carrying memory** (store provenance in the record schema, join taints on write, propagate through every transformation tool) is correct but fragile: it requires every tool author to participate, and any tool that returns a fresh unlabeled value silently breaks th...",
    "operational_effect": "The observable consequence is that an agent's privilege boundary is defined not by what it *read* but by what it *remembered*. An untrusted document that is fetched, transformed, and stored becomes, on the next turn, indistinguishable from agent-native knowledge. The blast radius is bounded by the set of privileged actions that consume memory records without..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "3f39eae4d7b0bd9896519826d69dd318338aa232c172caf018b0fc97ad603e5e",
    "verified_classes": [
      "Taint",
      "ProvenanceContinuityError",
      "TaintedValue",
      "MemoryRecord",
      "MemoryStore"
    ],
    "verified_functions": [
      "privileged_action",
      "__init__",
      "write",
      "read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
