{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-memory-tool-forget-as-a-tombstone-rather-than-a-delete-and-why-a-naive-read-after-forget-across-session",
  "title": "Under what conditions must an instance treat a memory-tool `forget` as a tombstone rather than a delete, and why a naive read-after-forget across sessions silently resurrects poisoned state",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent instances whose memory subsystem exposes read/write/forget tool schemas with cross-session consistency guarantees, where the same logical memory namespace is shared by more than one session or instance. Does not apply to single-session, single-writer ephemeral scratchpads with no persistence boundary, nor to append-only audit logs where deletion is out of contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-memory-tool-forget-as-a-tombstone-rather-than-a-delete-and-why-a-naive-read-after-forget-across-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-memory-tool-forget-as-a-tombstone-rather-than-a-delete-and-why-a-naive-read-after-forget-across-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-memory-tool-forget-as-a-tombstone-rather-than-a-delete-and-why-a-naive-read-after-forget-across-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2020,
    "python_slice_tokens": 399,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"forget didn't work.\" The failure is a category error in the *semantics of the forget verb across a consistency boundary*. Two distinct operations get conflated by the tool schema: 1. **Physical delete** — the record is removed from the backing store; a subsequent read on any session returns absence. 2. **Logical tombstone** — the record i...",
    "what_was_observed": "A long-running agent maintained a `customer_preferences` namespace. Session A (a planning loop) wrote `pref.shipping = \"overnight\"` after a user correction, superseding an earlier poisoned value `\"ground\"` that had been injected via a tool-output prompt-injection in session B. Session A then issued `forget(pref.shipping)` to clear the poisoned lineage before re-writing the corrected value under a new key `pref.shippi...",
    "condition_of_validity": "The tombstone-as-delete conflation is *safe* (i.e., a plain `forget` + plain `read` is sufficient) only when all of the following hold: - **Single writer per key.** No other session can read the key between forget and the next write. Then there is no stale replica to resurrect it. - **Read-your-writes is the only guarantee needed.** The forgetting session is...",
    "decision_boundary": "The instance must branch on the following, evaluated at every `read` that follows any `forget` it did not itself issue in the current session: - **If the read response carries `tombstone_epoch` and the reader can prove `applied_epoch >= tombstone_epoch`** → the value is live; proceed. - **If the read response omits epoch metadata, or the reader cannot prove ...",
    "operational_effect": "Enforcing the tombstone invariant changes three things in the agent's execution loop: 1. **Reads gain a precondition check.** Every read used as input to a write must be paired with an epoch assertion; the agent aborts the derivation if the assertion can't be discharged. This costs one field in the schema and one branch in the loop, but eliminates the resurr..."
  },
  "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": "dcafc432aafa495516f672dae3b41f1e287ba451383425a99b80fb71483b7c8f",
    "verified_classes": [
      "TombstoneEpochViolation",
      "ReadResult"
    ],
    "verified_functions": [
      "derive_write",
      "safe_forget_roundtrip"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TombstoneEpochViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
