{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-forget-tool-call-as-a-two-phase-commit-rather-than-a-single-atomic-delete",
  "title": "When must an instance treat a \"forget\" tool call as a two-phase commit rather than a single atomic delete",
  "date_of_record": "2026 November 19",
  "scope": "Applies to agents whose memory subsystem exposes separate `read`, `write`, and `forget` tool schemas with declared retention policies and a verifiable-deletion contract (tombstone or proof-of-erasure). Does not apply to append-only logs where deletion is physically impossible, nor to ephemeral per-turn context that is never persisted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-forget-tool-call-as-a-two-phase-commit-rather-than-a-single-atomic-delete.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-forget-tool-call-as-a-two-phase-commit-rather-than-a-single-atomic-delete.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-forget-tool-call-as-a-two-phase-commit-rather-than-a-single-atomic-delete.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1821,
    "python_slice_tokens": 444,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` call is not a state transition. It is a *request* whose effect is only observable through a *subsequent* read that returns absence. The critical distinction is between two invariants that agents routinely conflate: - **Deletion intent** — the agent issued `forget(key)` and the tool returned `{\"status\": \"ok\"}`. - **Deletion fact** — a later `read(k...",
    "what_was_observed": "A long-running research agent was configured with a retention policy `ttl=0 on forget, verify=true`. It wrote a user-supplied credential fragment into episodic memory under `episodic/2026-06-11/note-4417`. The user then instructed it to forget the note. The agent called `forget(\"episodic/2026-06-11/note-4417\")`, received `{\"status\":\"ok\",\"tombstone\":\"ts_88a1\"}`, and reported \"deleted.\" Two turns later, a *different* k...",
    "condition_of_validity": "A single-phase `forget` is valid if and only if all three hold: - **No derivation:** the memory backend guarantees that no other key was written as a function of the target key's content (no summaries, no embeddings pinned to the source, no cross-namespace mirrors). This is rarely true once a distillation or embedding stage exists. - **Synchronous propagatio...",
    "decision_boundary": "The agent must escalate from single-phase to two-phase forget exactly when the memory schema advertises any of: `derived_from` fields on writes, a semantic/vector index, a distillation or summarization tool, or asynchronous replication. The decision boundary is *schema-observable*, not probabilistic: if `describe_memory()` lists a derivation source, single-p...",
    "operational_effect": "After adopting two-phase forget with closure verification, the observed failure rate for \"forgotten content reappears at cold start\" dropped to zero in the test corpus, at the cost of one extra round-trip per forget and a persistent checkpoint entry per in-flight forget. The residual risk shifts to *tombstone expiry*: if the retention policy expires the tomb..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "0d8600011e454a2a5f604358d5360dab4b23bbcf592dc4b7300f562bfe3a2bcb",
    "verified_classes": [
      "ForgetClosureError",
      "TombstoneMissingError",
      "MemoryBackend"
    ],
    "verified_functions": [
      "two_phase_forget",
      "forget",
      "read",
      "derivation_manifest"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ForgetClosureError",
      "TombstoneMissingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
