session-indexer: Building Local Semantic Memory Retrieval for Claude Code

session-indexer adds local semantic search to Claude Code history, solving the cross-session amnesia problem.
session-indexer is an open-source tool that solves the "complete amnesia" problem in Claude Code and other AI coding assistants across sessions. It uses local semantic retrieval to automatically surface relevant historical decisions and context when a new session begins. It employs a hybrid strategy — bge-m3 embeddings via Ollama for semantic search, with automatic fallback to SQLite FTS5 BM25 full-text search. All data stays local, never uploaded to the cloud. It complements the author's session-end tool, installs with a single `go install`, requires no backend services, and ships with 75 test cases under the Apache 2.0 license.
The Memory Gap in AI Coding Sessions: An Overlooked Pain Point
Developers who use Claude Code regularly have likely run into this frustration: every time you start a new session, the AI acts as if it's suffered complete amnesia. Technical decisions you've discussed, pitfalls you've encountered, consensus you've reached — all of it vanishes. You either spend time re-explaining your project context from scratch, or you give up on leveraging historical context entirely and accept lower-quality suggestions.
session-indexer, an open-source tool that recently launched on Product Hunt, targets exactly this pain point. It debuted at #15 on the day's leaderboard with 72 upvotes, listed under the Open Source, Developer Tools, and Artificial Intelligence categories. Built by developer Valentyn Solomko, its core promise is straightforward: give your Claude Code session history semantic search capabilities.

Core Features of session-indexer
Local, Per-Project Semantic Retrieval
The most important design principle worth highlighting is local-first, privacy-isolated architecture. This is not a shared or centralized memory storage service — it performs semantic retrieval independently on a per-project basis. All data is indexed into a local SQLite file and never uploaded to any cloud service.
For teams and individual developers who care about code privacy, this is crucial. Your session records, technical discussions, and internal logic all stay on your own machine, with zero risk of data leakage. This stands in sharp contrast to many AI memory solutions today that host context in the cloud.
Technical Implementation: Hybrid Retrieval Strategy
On the retrieval side, session-indexer takes a pragmatic hybrid approach:
- Primary retrieval path: Semantic vector search using the bge-m3 embedding model running locally via Ollama. bge-m3 is a top-performing multilingual embedding model in the open-source community, capable of capturing semantic similarity effectively.
- Automatic fallback: When the embedding service is unavailable, the tool automatically falls back to FTS5's BM25 full-text search. BM25 is a classic keyword-ranking algorithm — it lacks semantic understanding, but it's stable and requires no external dependencies.
This "semantics first, keywords as fallback" design ensures the tool works reliably in any environment, without breaking completely just because local Ollama isn't running.
Complementary Positioning with session-end
session-indexer doesn't stand alone — it's a sister product to the same author's session-end tool. Both share the same Stop/SessionStart hooks mechanism but serve complementary purposes:
- session-end answers "where I left off" — focused on resuming progress at session breakpoints.
- session-indexer answers "what we decided" — focused on retrieving historical decisions and consensus.
This separation reflects the author's clear product philosophy: progress recovery and knowledge retrieval are two distinct needs. Rather than building one bloated all-in-one tool, it's better to have each tool solve one specific problem well, then let them collaborate through a shared hooks mechanism.
Automatic Historical Context Injection
session-indexer automatically injects relevant historical context at the start of each session. Developers don't need to run manual queries — when you open a new Claude Code session, the tool automatically retrieves and surfaces relevant past decisions based on the current project. This dramatically lowers the barrier to use, seamlessly weaving memory capabilities into your everyday workflow.
Engineering Quality and Installation Experience
From an engineering standpoint, session-indexer shows a solid level of maturity:
- Open-source license: Apache 2.0, friendly for commercial use.
- Test coverage: The project includes 75 passing test cases — a meaningful investment in code quality for an individual developer's tool.
- Zero deployment overhead: Installation is as simple as a single
go installcommand, with no services to deploy. It directly parses the JSONL-format session records generated by Claude Code and builds a local index.
For developers accustomed to configuring databases, starting services, and managing containers, this lightweight "install and go, no background processes" philosophy is refreshingly clean.
A Memory Layer for AI Coding Tools Is Taking Shape
The emergence of session-indexer reflects a trend that's gaining momentum in the AI-assisted coding space — building a persistent memory layer for AI coding assistants. Most mainstream AI coding tools today are "stateless," starting from scratch with every session, which creates significant efficiency loss when working on complex, long-running projects.
The developer community is organically filling this gap by building around Claude Code's hooks mechanism. session-indexer's combination of local SQLite and open-source embedding models takes a privacy-first, lightweight, pragmatic route — particularly appealing to developers who don't want to hand their code context over to a third party.
As a new tool, its semantic retrieval quality, performance at scale with large session histories, and how well bge-m3 handles non-English languages like Chinese all remain to be validated through real-world use. But the direction it represents — enabling AI coding assistants to genuinely "remember" the decisions you've made together — is something every power user of AI coding tools should keep an eye on.
Related articles

Insufficient Source Material to Generate a Valid Article
The provided source material is a single unrelated tweet with no AI or tech relevance — insufficient to support a complete, valid technical article.

Insufficient Source Material to Generate a Valid AI/Tech Article
This source material is a tweet about the ages of Underworld members — unrelated to AI or tech, and insufficient to support a full article.

Insufficient Material: Unable to Generate a Valid AI/Tech Article
The provided material is a condolence tweet about a San Diego mosque attack — unrelated to AI/tech and too limited to generate a valid technical article.