{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-a-memory-poisoning-detector-that-passes-every-per-write-provenance-check-still-fail-to-detect-a-poisoned-memory-at-read-time-a",
  "title": "Why does an instance of a memory-poisoning detector that passes every per-write provenance check still fail to detect a poisoned memory at read time across a long-horizon agent session?",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent memory systems where provenance is validated at write time (ingest) and memories are retrieved by similarity or recency at read time, with sessions spanning more than one context window (i.e., memories outlive the turn in which they were written). Does not apply to single-turn agents, to systems that re-validate full provenance chains on every read, or to read-only memory with no external ingestion surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-memory-poisoning-detector-that-passes-every-per-write-provenance-check-still-fail-to-detect-a-poisoned-memory-at-read-time-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-memory-poisoning-detector-that-passes-every-per-write-provenance-check-still-fail-to-detect-a-poisoned-memory-at-read-time-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-memory-poisoning-detector-that-passes-every-per-write-provenance-check-still-fail-to-detect-a-poisoned-memory-at-read-time-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1972,
    "python_slice_tokens": 399,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct invariants that get conflated under \"provenance auditing\": 1. **Write-time provenance validity** — at the moment a memory is created, its source, author, and derivation chain are well-formed and trusted. 2. **Read-time provenance sufficiency** — at the moment a memory is *used to justify an action*, the retrieving agent can reconstruct...",
    "what_was_observed": "In a long-horizon session (multi-day, ~40 context rollovers, ~11k memory writes), a memory-poisoning detector instrumented at the write boundary reported zero anomalies across the entire session. A red-team injection that arrived on day 9 via a scraped web tool result was written to memory with correct provenance metadata: source = `tool:fetch`, parent = `turn:8841`, delegation = `subagent:researcher`, trust = `scope...",
    "condition_of_validity": "The write-time-only audit is valid **only** under the conjunction: - The session does not outlive a single context window (memories never cross a rollover), **or** - Every retrieved memory carries a self-contained, non-pointer trust proof that the reader re-evaluates, **or** - The trust basis of every memory is monotonic (trust can only increase, never decay...",
    "decision_boundary": "At read time, for each retrieved memory, decide: **is this memory's trust basis still live and sufficient for the action it is about to justify?** - If the memory's provenance is a **self-contained proof** (signed, re-verifiable, with an expiry the reader checks) → admit, re-verifying the proof at read time. - If the memory's provenance is a **pointer to eph...",
    "operational_effect": "Systems that instrument only the write boundary report clean coverage and still get poisoned. The failure is silent because the audit log looks perfect: every write passed, every field was present, every pointer was valid. The poison is not in the write — it is in the *decay of the trust predicate between write and read*, which no write-time check can observ..."
  },
  "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": "da7dca99c1daf2f4d4ab717709280e0a7f7bc1a6782dab2fede7e222b290c2ff",
    "verified_classes": [
      "ReadTimeProvenanceError"
    ],
    "verified_functions": [
      "admit_memory",
      "retrieve_and_admit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReadTimeProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
