search_conversations
BM25F + semantic search over past AI coding sessions. Find solutions discussed yesterday without re-debugging today.
What It Does
search_conversations searches through indexed AI coding session histories using BM25F ranking with optional semantic search. It turns ephemeral conversation context into searchable institutional knowledge.
Every Claude Code session produces a JSONL file containing the full dialogue: questions asked, code discussed, errors encountered, solutions found. Without indexing, that knowledge disappears the moment the session ends. search_conversations makes it retrievable.
No Native Equivalent
There is no grep-based workflow that achieves this. The raw JSONL files contain tool_result dumps, base64 images, and multi-thousand-line tool outputs mixed in with the actual conversation. Grep against these files returns overwhelmingly noisy results. search_conversations strips this noise during indexing — tool results are truncated, images are replaced with [image] placeholders, and compact summaries are skipped in favor of the actual turn-pair content.
What Gets Indexed
Each conversation is decomposed into turn-pairs: a user question and the assistant’s response. The indexer extracts:
- User question — the actual question or instruction, stripped of system context
- Assistant answer — the substantive response, with tool outputs truncated
- Session metadata — session ID, timestamp, project path
- Conversation summaries — the final summary of a compacted session is indexed as a
conversation_summarytype
Tool use blocks are included but truncated to prevent grep-style noise. The full conversation is searchable by concept, not just by keyword.
When to Use
“We solved this before.” You encounter an EMFILE error or a Prisma migration failure. Before spending 30 minutes debugging, search your conversation history:
search_conversations("EMFILE error fix")
If a past session solved this exact problem, you get the solution in seconds.
“Why is the code like this?” You encounter a non-obvious pattern in the codebase — a manual SQL query where Prisma would work, or a seemingly unnecessary abstraction layer. The answer is often in a past conversation where the decision was made:
search_conversations("why manual SQL instead of Prisma for reports")
“Continue from yesterday.” A session was interrupted or compacted. Instead of re-reading the entire codebase to regain context:
search_conversations("auth refactor progress")
Onboarding. New to a project? Past conversations contain design decisions, rejected approaches, and architectural rationale that never made it into documentation:
search_conversations("architecture decisions", project="local/my-project")
Integration with codebase_retrieval
Conversation search is available as a query type in codebase_retrieval:
{
"type": "conversation",
"query": "why did we choose Redis for caching"
}
This lets you batch conversation search alongside code search in a single call — find the code and the discussion about it at the same time.
Key Parameters
query(required) — natural language search queryproject— filter to a specific project. Defaults to the current project.limit— max results. Default 10.
Auto-Indexing
Conversations are indexed automatically. When CodeSift starts, it indexes conversations for the current project. A session-end hook re-indexes after each session completes, so new conversations are searchable in the next session without manual intervention.
Benchmark note
This benchmark compares CodeSift against the closest practical native workflow an agent would use for the same task.
For some tools, that baseline is a direct shell equivalent such as rg or find.
For AST-aware, graph-aware, and LSP-backed tools, the baseline is a multi-step workflow rather than a strictly identical command.
Results should be read as agent-workflow comparisons: token cost, call count, and practical context efficiency.