Practical guides to AI coding memory
Claude Code memory across sessions
A long chat can hold a useful preference today and lose it when the session ends. Cairn.ink Memory's Claude Code setup recalls and remembers on its own. This walkthrough installs it and shows how to check what it kept.
Install once, then let it remember
Repository instructions such as CLAUDE.md are useful for rules that belong in the project. A personal preference can belong somewhere else: for example, how you want an assistant to approach tests across every repository you work in.
In a terminal, run npx @cairn-ink/memory setup. It opens a Cairn approval page in your browser, where you sign in and confirm the connection; you do not create or paste a token. Setup then installs the Cairn.ink Memory plugin into Claude Code. From the next session, the plugin recalls related Memories before your prompts and saves new ones when a turn ends.
Try the same question in a fresh session
1. Run setup and check the connection
Run npx @cairn-ink/memory setup and approve it in the browser. Start a new Claude Code session and run /cairn-memory:status; it should show active and credential: configured. If setup cannot open a browser, the connection guide has the manual token steps.
2. Save one durable instruction
Use a short, non-sensitive preference. Let the plugin capture it, or ask the assistant to call
remember_memoryand inspect the result for the private scope and receipt.3. Ask for it in a fresh session
In a new session, ask “What test-first preference did I ask you to remember?” The plugin may already have recalled it; you can also ask the assistant to call
recall_memory. Read the returned text and receipt before using it.
What you should see
A successful save reports a private Memory and its id. A matching recall can show the saved wording and the source receipt. The receipt helps you check why the note exists; it does not prove that the note still fits today's code.
If you need a Memory limited to one project, project scope requires an opaque project_id supplied by a supported setup. Do not substitute a repository name or path. Without that id, keep the example personal or store project rules in the repository itself.
Limits to keep in mind
- Automatic recall and capture belong to the Claude Code plugin. Recall can return nothing or miss a relevant note; check the result and receipt, and restate current instructions when they differ.
- Because the plugin captures turns on its own, do not type credentials or private conversation dumps into a session. You can pause recording in Settings → Connections.
- Memory is private to your account and does not become a shared Knowledge Card.