← Practical guides to AI coding memory

Guides

How can I trace an AI coding assistant's memory back to its source conversation?

Inspect memory files, tool results and Source Receipts to identify where a coding assistant learned a claim and what evidence to check.

By: Cairn

Updated:

Published:

Trace a remembered claim by inspecting the saved record and its source evidence, rather than asking the assistant to explain from memory. In Claude Code, start with /memory; with an MCP server, inspect its returned records. Cairn.ink Memory returns Source Receipts containing a redacted excerpt and client metadata, so you can compare the Memory with what was actually said.

What should I ask the assistant to show first?

Ask for the remembered wording, its storage location or identifier, and the source returned by the tool. Keep these separate from the assistant's explanation of why it used the claim. An explanation is easier to evaluate when you can see the actual saved record beside it.

For example, suppose your assistant says, “The Harbor prototype uses SQLite.” You want to know whether that came from your decision, the assistant's suggestion, or an old experiment. Ask it to retrieve the underlying record before you approve a change based on that statement. Read enough surrounding text to distinguish “we chose SQLite” from “we could try SQLite.”

Useful evidence includes the record ID, the saved wording, the speaker role and the source excerpt. Where session or event identifiers are available, keep them for your own comparison. Work with a harmless example while learning the interface, so the inspection itself is easy to share with a colleague if needed.

What can I inspect in Claude Code's native memory?

Claude Code's official memory documentation, accessed 2026-11-12, describes editable Markdown notes. Open the memory panel:

/memory

Browse the auto memory folder and read the relevant files. Its usual location is ~/.claude/projects/<project>/memory/, with MEMORY.md as the index and separate topic files for details. The placeholder is chosen by Claude Code. Follow the location shown in your own session, especially if you configured a different memory directory.

These files expose what Claude saved. Read the relevant topic file as well as its index entry, and distinguish auto memory from maintained instructions in CLAUDE.md. If the statement came from a repository rule, the source to inspect is that file and its history. If it came from a remembered interaction, compare the note with the conversation you retained.

The native files are useful when you want to read, edit or remove a note directly. Choose them when your main need is transparent local notes in Claude Code. For context that follows you to another assistant, use a shared source that both clients can query.

What can a generic MCP memory server show?

MCP, the Model Context Protocol, gives an assistant callable tools; the server defines the saved evidence. Inspect its official tool reference and a real response before deciding what you can trace.

For example, the MCP reference memory server, accessed 2026-11-12, stores entities, observations and relations. Its read_graph reads the graph, search_nodes finds matching nodes and open_nodes reads named entities. That structure is useful for checking which observation is attached to which entity.

A generic memory server does not necessarily retain the original conversation or a source excerpt. If source tracing matters to your workflow, make it a selection criterion: look for source text, attribution and stable identifiers in the documented records. For your own structured notes, you can also maintain a link to the original decision in a reviewed document.

How do I start tracing sources with Cairn.ink Memory?

For private context that should travel between Claude Code and Codex, start with:

npx @cairn-ink/memory setup

Choose Cloud for automatic capture and prompt recall. The installer requires Node 22.16 or later and the selected CLIs on your path. Approve both detected tools, close them fully and wait for background work before confirming shared memory. One browser sign-in connects a first paired installation; a memory ID links the same project across tools. Reopen the clients and review the four Cairn.ink Memory hooks in Codex /hooks.

Choose Local for free, no-account explicit tools on one computer, without automatic capture or cross-computer sync. Both clients use the same local database and owner. The installer README describes both modes.

Cloud masks supported sensitive text locally on a best-effort basis before saving conversation text, and sends a masked, length-limited prompt copy for recall. Review the privacy controls before choosing which work to capture.

How do I read a hosted Source Receipt?

A Memory is private, user-owned context. Its Source Receipt is the redacted conversation excerpt and client metadata explaining why it exists. Ask the hosted assistant:

Use recall_memory to find the Memory about the Harbor prototype's storage decision.
Show each returned Memory ID, saved wording, origin and Source Receipt.
Keep your interpretation separate from the tool's source excerpt.

Read the tool response. Hosted results include the matching Memories and their receipts. Compare the excerpt with the saved wording: who said it, whether the wording was a decision or proposal, and which project it concerned. Read origin alongside the source to distinguish explicit saving from agent-inferred context.

A receipt shows origin, not current correctness. For the Harbor example, inspect today's maintained project files before treating the old storage decision as the current implementation. If you discover stale content, follow the linked guide on correcting outdated Memory rather than expanding a source check into an unreviewed rewrite.

How is Local source inspection different?

In Local mode, ask for inspect_memory on the returned Memory ID. It exposes the saved record, revision and receipts without needing a model key. The local walkthrough explains that the receipt is read through inspection rather than the save response.

For an explicit save, the receipt records the tool-supplied assertion; it does not authenticate human intent. Check the excerpt against what you deliberately asked to keep. This is especially useful when an assistant condensed several statements into one preference: you can compare the condensation with the source before using it again.

For either mode, finish with a compact record of the claim, its ID or path, the excerpt you checked and the maintained source you consulted. That makes the next review faster while keeping your private conversation separate from team documentation.

Use the connection guide to set up source-inspectable private memory.

Frequently asked questions

Where can I inspect Claude Code auto memory?
Open /memory and browse the auto memory folder. Read MEMORY.md and the relevant topic files, then compare the saved wording with the original conversation if you have it.
Does every MCP memory server keep conversation sources?
Inspect the server’s documented data model. The reference memory server exposes graph entities, observations and relations; Cairn.ink Memory adds Source Receipts for its Memories.
Which Cairn.ink Memory tool shows sources?
Hosted recall_memory returns matching Memories with IDs and Source Receipts. Local inspect_memory can inspect an exact ID, its revision and receipts.

Sources