Local-first semantic indexing for CLI agents

Stop compaction drift. Keep the plan alive.

CodeFathom is a local semantic indexing service and MCP server that keeps CLI code agents coherent during long sessions by offloading repo context from the prompt into an on-device vector and symbol index.

Code stays on your machineWorks with Claude Code, Codex CLINo cloud storage fees
Terminalbash
$ codefathom index ./my-repo
✓ Indexed 1,247 files
✓ 3,892 symbols extracted
✓ Vector embeddings generated

Agent: codefathom.search_semantic("auth session schema")
→ 3 relevant snippets (2,100 tokens saved)

The problem

Context windows fill up. Compaction kicks in. Plans drift.

1

Serious development tasks require opening many files, tracing references, reading configs, and iterating on a plan—exactly what eats context.

2

To keep going, CLIs compact or summarize the conversation. This loses the nuanced constraints, earlier discoveries, and why the plan changed—especially in ideation-heavy sessions.

3

A large share of context budget is spent on raw code text, crowding out the thread's reasoning narrative—the plan itself.

The solution

Keep the thread. Offload the code.

CodeFathom prevents compaction drift by changing what goes into the prompt: vectorize and structure the repo locally, expose MCP tools so the agent retrieves only minimal necessary code slices, and keep the conversation about intent, constraints, and decisions—not pasted files.

Reduce raw file tokens by 80%
Delay context compaction
Preserve intent through long sessions

Developer experience

Before CodeFathom

Dev: "Let's explore 3 approaches to migrate auth and decide." Agent reads many files, traces references, proposes a plan. Session grows, compaction triggers. Agent after compaction loses nuanced constraints, drifts into a different plan.

Session lost. Start over.

After CodeFathom

Dev: "We're switching to approach #2." Agent calls codefathom.search_semantic, codefathom.find_references, codefathom.get_related. Agent: "Proceeding without re-reading whole files. Here's the updated plan."

Plan preserved. Context rehydrated on demand.

MCP tools

Agent-facing tools that reduce compaction drift

search_semantic

Finds relevant code by concept

Avoids loading whole folders or files

search_exact

AST-aware precise search

Avoids opening 10 files to find 1 symbol

find_references

Reference discovery

Prevents unseen usage breaks

get_related

Dependency and coupling neighborhood

Keeps retrieval targeted

describe_arch

Module-level summary

Structure without huge dumps

Every tool response is budgeted (bounded output) so the agent does not accidentally blow the window with overly large retrieval payloads.

Technical architecture

Local service that bridges disk to semantic index to MCP

1

AST and symbol graph (definitions, references, imports/exports)

2

Embeddings index for conceptual search

3

Chunking tuned for code (functions/classes, not naive paragraphs)

4

Incremental updates via file watch mode

Why not a cloud vector database?

Repo memory without pushing code to a managed DB

AspectCloud Vector DBsCodeFathom
StorageMetered cloud storage feesFree (local disk)
IngestionUpload pipeline requiredIndex locally
PrivacyCode leaves your machineCode stays local
InterfaceApp database APIsMCP-native agent tools
ContextGeneric vector retrievalCode-aware (symbols, refs)
Local-first privacy: repo stays on the machine by default
Faster time-to-value: install and index locally, no cloud provisioning
Lower total cost: no storage or backup line items
Better agent ergonomics: bounded, code-aware context retrieval

Who this is for

Built for engineers who feel compaction drift

CLI-First Agent Users

You use Claude Code, Codex CLI, or MCP-enabled agents for real work. Long sessions hit the context limit. You restart conversations too often.

Ideation-Heavy Engineers

You explore options, revise plans, and pivot mid-stream. Compaction loses the nuance of why decisions changed.

Security-Conscious Teams

You want semantic indexing for agents but cannot send repo contents to managed vector databases.

Common use cases

Large refactors with repeated reference tracing
Schema migrations spanning multiple modules
"Why is this broken?" investigations where the plan changes
Legacy codebases where understanding is the work

Pricing

Infrastructure-style pricing: base license plus metered usage

Indie

$15/user/month

+$10 CBC commit

For individual developers who want smarter agents with full codebase context.

Popular

Team

$29/seat/month

+$12 CBC commit

For teams that need shared context and pooled bandwidth.

Enterprise

Customannual

Committed volume

For organizations that need VPC deployment, audit logs, and committed volume.

CBC = Context Bandwidth Credits: 1 CBC = 1,000 tokens delivered via MCP

14-day trial with credit card required and full features

Newsletter

Product insight briefings, delivered weekly.

Get launch notes, product intelligence playbooks, and roadmap insights.

Join the beta

Keep the thread. Offload the code.

We are looking for beta testers: teams of 3-5 to validate pooled usage, shared index latency, and relevance quality in esoteric repos.

Feedback on retrieval quality in ideation-heavy workflows
Validation: does this measurably reduce compaction drift?
Teams using Claude Code, Codex CLI, or MCP clients