What they did
Di Lauro was tired of a coding assistant starting every session with no idea of past decisions, so the Obsidian vault of Markdown notes became its long-term memory, following the shape of Karpathy's LLM wiki idea. Five Claude Code hooks do the moving. At session start one injects the vault's operating manual and folder map. On every prompt another embeds the message with a local nomic-embed-text model through Ollama, compares it with a SQLite index of note chunks and adds up to three matching snippets. A write hook checks each note against the vault's note format and exits with code 2 so the model sees and fixes problems. After a compaction an opt-in headless agent copies decisions and tasks into the vault. When a turn stops, a headless Claude run on a cheap model saves anything worth keeping, and changed notes are re-embedded.
How it went
The author says recall questions now go in plain words and the assistant answers from the project history with nothing pasted in. On a 155-note test vault the prompt hook averaged about 124 ms and a full injection cost about 283 tokens; the session-start manual costs about 2.3k tokens once. In a five-prompt smoke test, vector search found the right note where keyword grep missed or ranked it lower in most cases. The author estimates 5,000 to 15,000 tokens saved per session but calls it a guess, not a measured bill.
Worth knowing
Similarity scores for unrelated prose all sat in a narrow band, so the setup uses two cutoffs: a loose one when the prompt sounds like a recall question and a strict one otherwise, or every prompt fills up with noise. The save agent runs on every Stop event and is the main running cost. The author warns that the upstream plugin's compaction hook has used the skip-permissions flag; their own scripts use an allowlist instead.