How can I correct or forget a memory and check the result?
Local protocol and Claude Code tests checked memory correction, stale-version conflicts and logical forgetting; a Codex edit was blocked.
Correct with correct_memory using the record’s current revision; forget with forget_memory, then inspect the same ID in a fresh session: correction yields a new revision and a new Source Receipt (the record of where it came from); forgetting yields memory_not_found. Our 2026-11-08 local test confirmed this through protocol checks and Claude Code, while Codex was blocked by its approval setting.
What did we run to check correction and forgetting?
The test used a local database and synthetic project-scoped decisions, with MCP source pinned to commit ad274b6, in full ad274b6117f86446fbf0ff16f503ae69d0278ce5. We kept automated protocol checks separate from native-client checks: the former used the official MCP SDK 2.0.0; the latter used Claude Code 2.1.319, reporting model claude-opus-5-5, across distinct sessions with explicit tool calls. The server ran on Node 24.22.1 in both.
For today's Cairn.ink Memory installation, use the 0.6.5 release and the Memory source control guide. The release installer README offers Cloud for automatic sharing after sign-in and Local for explicit tools on one computer without an account. The results here belong to the pinned local preview.
npx @cairn-ink/memory setup
A Memory is private context owned by its user. A Source Receipt is the source record accompanying it, used to trace why it exists. The revision is the record’s version number: sending the current revision with an edit gives the server a way to detect a request based on an older copy. For this test, the ID, revision and receipt supplied concrete values to compare across sessions.
What changed, and what did fresh sessions read back?
The SDK test passed 14 protocol cases with 19 tool calls across eight fresh server processes, exiting 0. The later Claude test passed 12 synthetic cases in 12 sessions with 20 calls; every CLI process, the batch runner and both evidence audits exited 0. A separate SDK state check used two fresh processes and four calls. The earlier mixed native batch’s CLI invocations exited 0 while its runner exited 1.
In the protocol sequence, correct_memory advanced the same record from revision 1 to revision 2 and created a new Source Receipt. Reusing revision 1 for correction or forgetting returned revision_conflict: the supplied version was stale. We then called forget_memory with expectedRevision 2 on that corrected record. Inspection returned memory_not_found, and a fresh server process returned empty memory and source lists. The pinned MCP guide describes the tools and inputs.
Claude Code also kept the same Memory ID through correction, advancing revision 1 to 2. A fresh session read the corrected record and its current source. The source list contained the new Source Receipt, with the old receipt absent. Attempts to correct or forget with the stale revision conflicted and left revision 2 unchanged.
For the native forgetting check, we used a separate disposable record. The tool returned true; inspection of its exact ID in a new process returned memory_not_found, and the current source list was empty. Wrong-project controls were empty too. Separate records let us inspect the corrected and forgotten outcomes independently, while the SDK sequence had checked correction and forgetting on the same record.
What happened to the Codex attempt?
The earlier batch’s Codex 0.166.0 correction hit an approval gate under policy never; a read-only check found the old revision unchanged, and native forgetting was unattempted in that batch. A later Codex 0.167.0 capability check found that its interactive terminal interface lacked the per-invocation isolation controls used by our non-interactive setup, so we made no further mutation attempt. Global configuration and approval policy remained unchanged.
How can I repeat the check safely?
Start with a fresh synthetic database and separate project-scoped records for correction and forgetting. Keep expected values outside the receiving prompt and repository. The pinned local store contract explains the state and revision fields used for comparison.
- Save an old synthetic decision and inspect it. Record its Memory ID, revision, project scope and Source Receipt, then confirm these identify the intended test record.
- Call
correct_memorywith thatmemoryId, its currentexpectedRevisionand the corrected content. Keep the returned revision and receipt beside the original values. - Open a fresh session and inspect the same ID. Compare the text, revision and current source with the successful tool result. Following the identifier makes this a check of the same record through the change.
- Retry correction and forgetting using the old revision. Record the conflicts and inspect again to confirm the current revision stayed unchanged. Label these deliberate stale requests in the test record.
- Forget the separate disposable record using its current revision. Open a new process, inspect that exact ID and read the current source list. Save both results alongside the forget response.
Record actual tool responses and process exit codes separately. The blocked batch illustrates why: a CLI process can exit 0 even when the requested edit was blocked and the batch failed. Keep that distinction when checking a new client version or setting, use disposable records, and preserve your normal configuration.
What does this test leave open?
Logical forgetting here means absence from the server’s current reads, not physical erasure from SQLite pages, journals, snapshots or backups. A Source Receipt traces origin rather than verifying that a decision is correct or current. Hosted same-account behavior, semantic recall quality, automatic capture and automatic retrieval remain untested; read_memory_sources lists sources, and local owner/project settings are not hosted account authentication. Successful native edits covered Claude Code, reproduction depends on each client’s controls, and the existing native subscription meant the run was not offline.
To connect and verify your own setup, follow the connection guide.
Sources
- https://github.com/Cairn-ink/cairn-memory/blob/ad274b6117f86446fbf0ff16f503ae69d0278ce5/docs/standalone-mcp.md
- https://github.com/Cairn-ink/cairn-memory/blob/ad274b6117f86446fbf0ff16f503ae69d0278ce5/docs/local-store.md
- https://github.com/Cairn-ink/cairn-memory/blob/49c5e284/README.md
- https://github.com/Cairn-ink/cairn-memory/blob/49c5e284/packages/setup/README.md