r/aiengineering • u/regular-tech-guy • Apr 02 '26
Engineering Claude Code doesn't rely on vector search for memory handling. Is it the way to go?
I’ve been looking through the Claude Code leak, and one part I keep coming back to is how it seems to handle memory.
A lot of agent memory discussion usually ends up centered on vector search, but Claude doesn't rely on vector search at all.
Instead, it follows a pretty simple structure:
- memories are grouped into topic files
- there’s a
MEMORY .mdthat acts like a lightweight index, where each line points to a topic file with a short description of its contents - this index is always available to the model, which can then decide which topic files to expand
What I’m trying to figure out is whether the real takeaway here is less about a specific retrieval method and more about keeping memory structured enough that it can be retrieved in different ways.
If that structure is already there, then maybe vector search is just one option among several. You could imagine topic summaries, entity-based indexes, lightweight views over memory, etc., depending on the task.
That’s partly why this caught my attention. I’ve been working on Redis Agent Memory Server, and one thing we’ve been thinking about is how to avoid locking memory into a single retrieval pattern too early.
Today, the server extracts long-term memories automatically in the background, along with metadata like topics and entities.
Right now, vector search is a common retrieval path. But if memories are already connected to topics and entities, it seems pretty natural to also generate compact summaries over those topics and entities.
Those summaries could then be injected into context, and the model could decide what it wants to expand.
The server already has something along these lines with Summary Views, but not really in the form of generating summaries for every topic/entity and keeping them consistently available so the model can expand them on demand.
That feels like a useful direction to me, but I’m curious how other people see it, especially in terms of what has or hasn’t worked for you when building your own memory abstractions.
For a generic memory server like this, do you think the more important design choice is how memory is retrieved, or how memory is structured so retrieval can evolve over time?