How I Got Claude to Actually Remember Stuff
Every Claude Code session starts with amnesia. I got tired of re-explaining decisions, so I wired up automatic session export, semantic search, and a /recall command. Now I type `/recall yesterday` and pick up exactly where I left off. It took an a few hours to build.
The other day I started a new Claude Code session and typed /recall topic auth middleware. Within seconds I had the full context from a conversation I'd had three days earlier - the approach we'd agreed on, the edge cases we'd discussed, even the specific files we'd touched. No copy-pasting from old chats. No re-explaining the problem.
It took an afternoon to set up. Here's how it works.
The Problem
Claude Code is great at what it does. It reads your codebase, writes code, runs tests. But every session starts fresh. That conversation you had last Tuesday about your deployment pipeline? Gone. The architectural decision you talked through together? You'll need to explain it again.
For quick, one-off tasks this doesn't matter much. But I've been spending hours a day in Claude Code across multiple projects, and I kept finding myself doing the same thing: pasting in chunks of previous conversations, re-explaining decisions, or just accepting that context was lost and starting over.
I was essentially doing manual memory management for an AI. The irony wasn't lost on me.
The Tools That Got Me There
I didn't come up with this from scratch. A few projects pointed me in the right direction:
Artem Zhutov's Personal OS Skills is a collection of Claude Code skills that integrate with Obsidian. His recall skill and sync skill showed me what was possible - that you could wire up Claude to search its own past conversations and export them to a note-taking app. The concept clicked immediately. His YouTube channel and Discord are worth checking out if you're interested in this kind of thing.
QMD by Tobi is an on-device search engine for markdown files. It does BM25 full-text search, vector semantic search, and LLM re-ranking, all locally. No cloud APIs, no data leaving your machine. This was the piece I was missing - I already had notes in Obsidian, I just needed a way to search them that understood meaning, not just keywords.
And then there's Obsidian CLI, Obsidian's official command-line interface. It lets you create notes, append to daily notes, and query backlinks straight from the terminal. That's what ties Claude Code to my vault.
How It's Wired Together
The setup has three parts. None of them are complicated on their own - the value is in how they connect.
1. Automatic Session Export
Claude Code supports hooks, which are basically shell commands that fire on specific events. I set up a SessionEnd hook that calls a Python script every time a session closes. The script reads the session transcript (Claude stores these as JSONL files), pulls out the messages, and does two things:
- Creates a formatted note in my Obsidian vault under
Claude Sessions/2026/03/(year/month structure, because you end up with a lot of these) - Appends a summary line to today's daily note with a wikilink back to the full transcript
Each note gets YAML frontmatter with the session ID, date, project name, and message count. Nothing fancy, but it makes them filterable and searchable.
2. Semantic Search
QMD indexes my vault into two collections: claude-sessions for the exported conversations, and obsidian-vault for everything else - my own notes, meeting transcripts, documentation, whatever's in there.
So when I search for "kubernetes deployment," I get results from past Claude conversations and my own writing. The hybrid search is nice too - keyword matching for when I know the exact terms, vector search for when I vaguely remember discussing something but can't recall the specific words.
3. The /recall Skill
I wrote a Claude Code skill that wraps all of this into a /recall command. It has three modes:
- Temporal:
/recall yesterdayor/recall last week- pulls up sessions by date - Topic:
/recall topic kubernetes- runs a semantic search across sessions and vault notes - Graph:
/recall graph "Auth System"- uses Obsidian's backlinks to show how notes connect
The temporal mode is what I use most. Starting a morning session with /recall yesterday gives me instant context on where I left off.
Daily Notes Got Better Too
I didn't plan for this, but the system ended up improving my daily notes. The export script creates sections automatically - Claude Sessions, Work, Personal, Journal - and session entries slot themselves under the right heading.
I started opening my daily note at the end of the day and there's this chronological log of every Claude conversation, with summaries and links. Last Friday I used it to write my weekly update because I could literally see everything I'd worked on. That wasn't the goal, but it's probably the feature I'd miss most if I had to give something up.
Rough Edges
Some things to know if you're thinking about setting this up:
Summaries depend on your first message. The script uses your opening message as the session summary. If you start with "hey can you help me with something," your daily note will be useless. I've gotten into the habit of writing more descriptive opening messages, which honestly has made the conversations themselves better too.
QMD falls back to CPU without Vulkan headers. It still works fine, just slower during the initial embedding pass when you first index your vault. After that, incremental updates are fast regardless.
Obsidian needs to be running. The CLI talks to the desktop app. If Obsidian's closed, exports fail silently - no crashes, but you'll have gaps. I just keep Obsidian open, which I was doing anyway.
Portability
The whole setup lives in my dotfiles repo. Export script, recall skill, hook config — all symlinked into place. On a fresh machine it's two commands: ./install.sh to link everything, then ./memory-setup.sh /path/to/vault to set up the QMD collections. That's it.
If You Want to Try This
You need four things:
- Obsidian with the CLI enabled
- QMD (
npm install -g @tobilu/qmd) - A SessionEnd hook in
~/.claude/settings.jsonpointing to an export script - A recall skill in
~/.claude/skills/recall/
The export script is about 300 lines of Python, standard library only. The recall skill is just a markdown file. If you want to see the full implementation, it's in my dotfiles repo under config/claude/ and bin/.
I should say - I built this with Claude's help. The whole system, including the script, the skill, and the hook configuration, came together in a single afternoon session. There's something satisfying about using Claude to build the thing that makes Claude more useful. And now that session is itself searchable, which means if I ever need to modify the setup, I can /recall topic memory system and get back the full conversation where we built it.
Anyway, if you're using Claude Code regularly and you keep wishing it could just remember, give this a shot. It's not a big project and the payoff is immediate.