Searching your whole AI chat history without a vector database — approach, research, and results A developer built a local, dependency-free system for searching AI coding-assistant chat transcripts without a vector database, using compact per-chat extracts, IDF keyword ranking with first-message and term-frequency topical boosts, and model-driven query expansion to bridge vocabulary gaps. In a test run, the tool surfaced the correct conversations about a dead-letter-queue fix and returned a cited answer that explicitly flagged what the excerpts did not contain, with only the query expansion and final answer requiring model calls. AI coding assistants Claude Code, and similar save every conversation as a transcript on disk. Over months that becomes a big, unsearchable pile: "how did we fix that dead-letter-queue issue three weeks ago?" is effectively unanswerable. The obvious answer is "embed everything into a vector DB" — but that adds a model, a store, a key, and a network dependency. This is a write-up of a local, dependency-free alternative that gets most of the benefit, the research it draws on, and measured results versus the naïve baseline. Assistant transcripts are large JSONL files tens of MB each , keyed by opaque UUIDs, scattered across a projects directory. The content that matters — decisions, the exact command that fixed something — is buried under ~97% tool-call/metadata noise. The naïve fix, "full fetch": hand whole transcripts to the model , is slow multi-MB prompts , expensive cost scales with input , lossy the model skims , and doesn't scale past one or two chats. 1. Find the right conversation s among dozens — including ones that used different words than the question. 2. Compress transcripts to signal without losing intricate detail commands, IDs, decisions . 3. Rank by genuine relevance — not size or recency alone; handle chats that drifted into a topic. 4. Answer with citations and an honest "I don't know", not a hallucination. 5. Stay fast, cheap, offline, and dependency-free must run anywhere a shell does . | Task | Technique | Research basis | |---|---|---| | Compress | A compact extract per chat — message text + tool-call inputs + head/tail of long results + reasoning — cached, ~100× smaller than raw. | Mem0 — extract salient content, don't store raw | | Rank | IDF keyword + first-message topical boost + term-frequency topicality many mentions = "about it" — catches mid-chat drift + recency × importance tie-breakers. | Generative Agents — recency × importance × relevance ; RAG — retrieve then generate | | Find vocabulary gap | Query expansion instead of embeddings : one cheap model call expands dead-letter queue → dlq, redrive, sqs, reprocess , then feed those into the local keyword ranker. | see §5 | | Answer | Retrieve top-K, round-robin turn-selection into a small budget, one model call with strict cite-or-say-"CANNOT ANSWER" instructions. | MemGPT — page in only what's needed ; RAG | The pipeline steps 1–4 are local/offline/instant; only step 5 calls a model : tokenize the question → build the corpus skip throwaway sessions → rank locally → extract + select the most relevant turns into a small budget → one model call that answers with citations. A real run identifiers lightly redacted . Note the query never used the words "dlq" or "redrive" — the synonym expansion bridged the gap and surfaced the right chats, and the model cited each source and was honest about what the excerpts did not contain: bash $ ccask "how did we fix the dead-letter queue backup?" expanding query synonyms … Searching 23 chats for: fix, dead, letter, queue, backup + synonyms: dlq, redrive, sqs, reprocess, poison, retry, unprocessed, lambda … Most relevant: Payments Backend, Data Pipeline Ops, Release Runbook, Onboarding, Newsletter The dead-letter queue was cleared by adding the missing routing-map entry, then redriving: • "77 of 96 messages cleared after adding the