General-purpose coding agents are already good. Claude Code and Codex can grep, open files, and keep going. The part they do not have is my memory. This is a personal memory layer that works with whichever agent I point at a repo, and the index never leaves the machine.
I wrote before about the kinds of memory an agent needs, and about OpenClaw’s file-based memory. This is a different system: searchable session notes, built for the coding-agent loop.
Why bother
Two things kept showing up.
The context graph of a project matters more than swapping the agent. As the work accumulates, accuracy depends on the agent being able to find what we already decided. Grep and “open the file” work, and they also burn tokens. A search tool over memory is cheaper than making the model reread the repo.
The other lesson, which matches what Codex and the other coding agents already push: if the folder stays the source of truth, the agent gets better over time. Memory should be files in that folder, not a side database I cannot open.
Writing the memory
I use the compound-engineering plugin plus a bit of my own tooling. A project already has the code, and a docs folder for brainstorms and plans. Next to that, a sessions folder.
At the end of a session I run a /summarize skill. It writes a structured markdown file: date, title, a short summary, and a longer one. The short summary is what keyword search should hit. There is no hook that knows I am about to close the session, so this is still manual. I do it before I stop.
When the file lands, the skill calls a CLI I named sift (sift index and sift embed). Agents are good at CLIs, so the search surface is a CLI rather than a library only I can call.
How sift searches
sift keeps a SQLite database on disk.
- Keyword search is full-text, ranked with BM25 (TF-IDF style).
- Semantic search is a vector index, via the SQLite vector extension.
- Embeddings come from a local Gemma embedding model, about 300M parameters, through Ollama. It has seen both text and code. No embedding API.
In the demo, sift list showed the sessions already indexed. sift index had nothing new. sift embed reported 35 chunks across five sessions. sift search for the local embedding model I had used returned those chunks. That query is for the agent, not for me. The agent gets a handful of passages and can open the file if it needs more. The search itself did not spend model tokens.
On other projects I have had on the order of a hundred sessions. At that size, asking the agent to explore is how the context window disappears.
How the agent is told to use it
I put the instructions in the Codex AGENTS.md for the repo. The agent is told it can search session summaries, fetch one file, list recent sessions, and run /summarize to write the current session. It should call sift search when I ask what we already decided.
I checked that on a fresh Codex session, one that had never seen the earlier conversation. I asked which embedding model we had picked. It called sift several times (search, then a more specific get, then a list) and answered with the local Gemma model on Ollama, including which session summary the decision lived in. A broader question, “what have we built here”, took more tool calls, and it still got there from the short summaries instead of reading every file.
I plan to open source the /summarize skill and the sift CLI, alongside the other skills I keep reusing. The index stays local. For embeddings, nothing is sent out.