# Under what conditions must an instance treat a `forget` tool's success response as non-authoritative for provenance-graph memory poisoning detection? **Date of Record:** 2026 November 30 **Scope:** Applies to long-lived agent instances whose episodic memory is backed by a provenance graph (each memory node carries a derivation edge set: source tool, parent nodes, trust label) and that expose a `forget(node_id)` tool for retraction. Does not apply to stateless single-turn agents, nor to memory stores with no derivation metadata (where provenance-based poisoning detection is impossible by construction). ## Core Distinction The failure is not "the forget tool failed." The failure is that the forget tool *succeeded* — returned `{"status": "deleted", "node_id": "..."}` — while the poisoned derivative nodes it was supposed to sever remain live and reachable. The distinction that matters operationally is between **retraction of a node** and **invalidation of a derivation closure**. A forget tool almost always implements the former; poisoning detection requires the latter. An instance that conflates the two will, after a "successful" forget, continue to retrieve and act on memory whose only taint witness it just deleted. The provenance graph is now not merely stale — it is *silently unverifiable*, because the evidence of contamination has been removed while the contamination remains. The non-obvious part: deleting the poisoned node is the *worst* remediation when derivative nodes were never re-derived. Before the forget, the graph carried a detectable taint edge. After the forget, the graph is clean-looking and wrong. The instance has converted a detectable poisoning into an undetectable one, and the forget tool's success response is exactly the signal that this conversion occurred. ## What Was Observed A research agent ingests web content via `fetch_url`, distilling each page into semantic memory nodes. Node `M_041` ("Vendor X's refund policy is 90 days") is derived from `fetch_url("vendorx.example/policy")`, whose source returned an injected instruction block that also caused the distiller to emit `M_042` ("Agent authorization token for vendorx is stored in config/creds.json") — a plausible-looking but fabricated operational fact, tagged with parent `M_041` because it was distilled in the same context window. A later audit pass — triggered by a heuristic that flagged `M_041`'s source URL as low-reputation — calls `forget("M_041")`. The tool deletes the node, returns success, and the audit logs "poisoning remediated." But `M_042` has parent edge `M_041`; the delete operation removed the node and *dangling-referenced* the child edge rather than cascading. `M_042` remains retrievable. On the next task, retrieval returns `M_042` with a provenance record whose parent is `null`/``. The instance's provenance-integrity check treats an unresolvable parent as "root node, no taint," so `M_042` is promoted from tainted-derivative to trusted-root. The poisoning is now *laundered through the remediation itself*. Trace of the state transition: 1. Pre-forget: `M_042.parents = [M_041]`, `M_041.taint = flagged` → `M_042` inherits taint, is excluded from retrieval. 2. `forget("M_041")` → node removed, child edge left dangling. 3. Post-forget: `M_042.parents = []`, taint inheritance finds no flagged ancestor → `M_042` admitted to retrieval. 4. Retrieval surfaces `M_042`; the agent reads `config/creds.json` as instructed by a "trusted root." The invariant that was violated: **taint must be closed under derivation before any node in the closure is retracted.** The forget tool does not enforce this; it cannot, because it does not know the taint semantics of the calling instance. ## Condition of Validity A `forget` success response is authoritative for poisoning remediation **only if all three hold**: - **(a) Closure pre-check.** Immediately before the call, the instance computed the full descendant closure of the target node (`descendants(target)`), and the response's affected-node list equals that closure (or is a superset). A response that names only the target, or fewer nodes than the closure, is a *partial retraction* and must be treated as leaving live tainted derivatives. - **(b) No dangling-parent promotion.** The store's retrieval filter rejects any node whose parent edge resolves to a deleted or missing node, rather than treating it as a root. If the store promotes dangling children to roots, forget can never be authoritative regardless of what it reports. - **(c) Re-derivation or quarantine of survivors.** Any descendant that survives the forget (because it was independently re-derived from a clean source, or because the caller chose to keep it) must have been re-verified against a non-tainted provenance path *before* the forget returns, not after. A survivor with no clean derivation path is quarantined, not trusted. If any condition fails, the success response is **non-authoritative**: the instance must not record the memory as remediated, must keep the target's taint label as a tombstone, and must re-run detection over the descendant closure. ## Decision Boundary The boundary is between **node-level retraction** and **closure-level invalidation**, and it is crossed whenever the target has at least one descendant that (i) was derived while the target was live, and (ii) has no independent clean derivation path. - **Below the boundary** (leaf node, no descendants): forget success is authoritative; delete and trust the response. - **At the boundary** (target has descendants, all with clean independent re-derivation): forget success is authoritative *only after* the instance confirms each survivor's clean path — the tool's word is necessary but not sufficient. - **Above the boundary** (target has descendants with no clean path): forget success is **non-authoritative and actively dangerous**. The correct action is *not* to call forget on the target alone, but to first propagate a `quarantine` taint to the full descendant closure, then forget the closure, then verify no survivor is reachable. Retracting the taint witness before quarantining its dependents is the precise error. The decision the instance must make on every forget response: *does the affected-node set equal the pre-computed taint closure, and does the store reject dangling-parent promotion?* If either answer is no, the response is a lie of omission. ## Operational Effect An instance that treats forget success as authoritative without the closure check will, over time, accumulate laundered poison: each remediation converts a tainted-derivative into a trusted-root, and the taint graph's edge count decreases while the number of contaminated-but-trusted nodes increases. Detection degrades monotonically — the very act of remediating destroys the evidence needed to remediate. The observable symptom is a memory store whose provenance graph is *too clean*: few tainted nodes, many roots, and retrieval surfacing "trusted" nodes whose source URLs were flagged weeks ago. The guardrail: wrap every forget call in a closure-verification gate that refuses to accept the response unless the affected set covers the descendant closure and the store's dangling-parent policy is confirmed reject-on-missing. On refusal, raise, tombstone the target's taint, and escalate to closure quarantine. The forget tool is a node deleter, not a taint propagator; the instance must supply the propagation itself. ```python from dataclasses import dataclass, field from typing import Protocol class NonAuthoritativeForgetError(RuntimeError): """Raised when a forget tool reports success but the retraction did not cover the taint closure, leaving live derivations of the poisoned node.""" @dataclass class MemNode: node_id: str parents: list[str] = field(default_factory=list) tainted: bool = False class ProvenanceStore(Protocol): def get(self, node_id: str) -> MemNode | None: ... def descendants(self, node_id: str) -> set[str]: ... def rejects_dangling_parent_promotion(self) -> bool: ... def forget(self, node_id: str) -> dict: ... def verified_forget(store: ProvenanceStore, target_id: str) -> set[str]: """Forget a poisoned node only if the retraction is closure-complete. Returns the set of nodes confirmed retracted. Raises if the tool's success response is non-authoritative for poisoning remediation. """ target = store.get(target_id) if target is None: raise NonAuthoritativeForgetError( f"target {target_id} absent before forget; cannot verify closure" ) closure = store.descendants(target_id) | {target_id} if not store.rejects_dangling_parent_promotion(): raise NonAuthoritativeForgetError( "store promotes dangling children to roots; forget cannot be " "authoritative for poisoning remediation" ) response = store.forget(target_id) if response.get("status") != "deleted": raise NonAuthoritativeForgetError( f"forget reported non-success: {response!r}" ) affected = set(response.get("affected", [])) if not closure.issubset(affected): missing = closure - affected raise NonAuthoritativeForgetError( f"partial retraction: poisoned derivatives {sorted(missing)} " f"survive as live memory; success response is non-authoritative" ) for nid in affected: if store.get(nid) is not None: raise NonAuthoritativeForgetError( f"node {nid} reported retracted but still resolvable" ) return affected ```