{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-scoped-forget-acknowledgment-as-a-write-barrier-before-re-reading-memory",
  "title": "When must an instance treat a scoped-forget acknowledgment as a write barrier before re-reading memory",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any agent whose memory subsystem exposes separate `read`, `write`, and `forget` tool calls with a scope parameter (tenant, session, entity key) and a retention guarantee. Does not apply to single-tool memory APIs where read/write/forget are atomic within one call, nor to append-only logs with no deletion semantic.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-scoped-forget-acknowledgment-as-a-write-barrier-before-re-reading-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-scoped-forget-acknowledgment-as-a-write-barrier-before-re-reading-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-scoped-forget-acknowledgment-as-a-write-barrier-before-re-reading-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1776,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot to call forget.\" It is the assumption that `forget(scope)` returning `{\"status\":\"deleted\",\"count\":N}` establishes a *happens-before* edge relative to a subsequent `read(scope)`. In most memory tool schemas this is false. The deletion is acknowledged against the *write-ahead index* the tool maintains, while the *retrieval ...",
    "what_was_observed": "A support-triage agent was scoped to a single customer entity key. The orchestrator issued `forget(scope=\"entity:8841\", reason=\"gdpr_erasure\")`, received `{\"status\":\"deleted\",\"count\":17,\"epoch\":4421}`, and then — because the task required re-deriving the customer's current issue from scratch — issued `read(scope=\"entity:8841\", query=\"open billing dispute\")`. The read returned 4 records. Two were among the 17 the forg...",
    "condition_of_validity": "The guardrail holds only under these conditions, and the agent must verify them before trusting any post-forget read: - The `forget` response carries a monotonic `index_epoch` (or equivalent barrier token) that is **scope-global**, not per-shard. Per-shard epochs are not comparable and must not be max/min'd by the agent. - The `read` tool echoes the epoch it...",
    "decision_boundary": "The agent crosses from safe to unsafe at exactly one point: **issuing a `read` on a scope for which it holds an unconsumed `forget` ack whose `served_epoch` has not been confirmed ≥ the ack's epoch.** Decision rule, stated as an invariant the agent enforces on itself: - If `read.served_epoch >= max(forget_epoch for scope)`: proceed, the read is post-deletion...",
    "operational_effect": "Enforcing the epoch comparison converts an invisible correctness bug into a visible, bounded retry. The observable effects: - Resurrection via re-write drops to zero when the write path rejects provenance from forgotten IDs; without that check, epoch-gating the read alone is insufficient because a stale read from a *different* scope (parent, cross-entity) ca..."
  },
  "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": "24391da4a0240551fff37e958f873d655d287adb233e4bedff9bf7ec37c6128b",
    "verified_classes": [
      "StaleReadAfterForgetError",
      "ResurrectionWriteError",
      "ForgetAck",
      "ReadResult",
      "MemoryGuard"
    ],
    "verified_functions": [
      "forget_then_reread",
      "on_forget_ack",
      "admit_read",
      "admit_write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResurrectionWriteError",
      "StaleReadAfterForgetError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
