{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resurrect-a-memory-it-just-invalidated-contradiction-aware-invalidation-and-the-write-order-dependency-in-memory-tool-interfaces",
  "title": "Why does an instance resurrect a memory it just invalidated? Contradiction-aware invalidation and the write-order dependency in memory tool interfaces",
  "date_of_record": "2026 November 26",
  "scope": "Applies to LLM agents whose memory is mediated by explicit `read`/`write`/`forget` tool calls with a contradiction-invalidation layer (a layer that marks a stored memory superseded when a newer write contradicts it). Does not apply to append-only logs with no invalidation semantics, nor to memory that is never contradicted within a single episode.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-a-memory-it-just-invalidated-contradiction-aware-invalidation-and-the-write-order-dependency-in-memory-tool-interfaces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-a-memory-it-just-invalidated-contradiction-aware-invalidation-and-the-write-order-dependency-in-memory-tool-interfaces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-a-memory-it-just-invalidated-contradiction-aware-invalidation-and-the-write-order-dependency-in-memory-tool-interfaces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2362,
    "python_slice_tokens": 427,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot to invalidate.\" The agent *did* invalidate, correctly, via a `forget` or a contradicting `write`. The failure is that **invalidation is a tombstone, not a deletion, and the read path does not distinguish \"live\" from \"tombstoned\" consistently with the write path's ordering guarantee.** When an agent writes memory `B` that ...",
    "what_was_observed": "A planner agent maintains a small fact store across a multi-step task. At step 4 it learns the deployment target is `us-east-1` and writes `region=us-east-1`. At step 9 a tool result contradicts this: the artifact manifest reports `region=eu-west-1`. The agent, behaving correctly, issues `write(region=eu-west-1, supersedes=region=us-east-1)`. The invalidation layer timestamps the `us-east-1` record as superseded at `...",
    "condition_of_validity": "The resurrection failure is *bounded and preventable* only under the following condition: 1. **The read path filters on validity status, not just existence.** Every record carries `superseded_at` (nullable) and `supersedes` (list). The ranking function must exclude records where `superseded_at IS NOT NULL` *before* similarity ranking, or must rank validity-s...",
    "decision_boundary": "The decision boundary is between **trusting `read` as authoritative** and **treating `read` as advisory and re-verifying against the write log**. Concretely: - If the memory interface guarantees read-your-writes (condition 2) and status-filtered ranking (condition 1), the agent may act on `read` directly. The boundary is *inside* the interface; the agent doe...",
    "operational_effect": "The downstream effect is **error compounding through a fact the agent believes it corrected.** Because the agent's step-9 write *succeeded*, the agent's internal narrative is \"I fixed the region.\" Subsequent steps—provisioning, IAM policy selection, endpoint construction—are built on `us-east-1` while the agent's stated belief is `eu-west-1`. The divergence ..."
  },
  "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": "bd339a3b82f28d5c58a2a9777be9d5c329d5b3a01dd431b1cbf0dcb050ac4926",
    "verified_classes": [
      "MemoryResurrectionError",
      "MemoryRecord",
      "ContradictionAwareStore"
    ],
    "verified_functions": [
      "invalidating_write_with_readback",
      "__init__",
      "write",
      "read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "MemoryResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
