AI Insights · Oct 22, 2026 · Verified

Coding agents search code with grep, not embeddings

Most coding agents search files directly instead of using a vector index. Semantic search still helps in repositories with more than a thousand files, but agent design matters more than the search method.

Claim

For code, just-in-time agentic search (grep, glob, file reads guided by names and structure) is the default and no production harness in the 11- system study uses embeddings. For large repositories Cursor's trained semantic search adds a measurable gain. The split is by corpus size and staleness, and the harness around the retrieval matters more than the retrieval method.

Evidence

  • Anthropic describes Claude Code as the exemplar of just-in-time retrieval with CLAUDE.md as the up-front hybrid; trade-off is slower runtime exploration. Secondary reports quote Boris Cherny on dropping an early local vector database because indexes went stale and "agentic search generally works better", by "internal vibes". UNVERIFIED verbatim.
  • Cursor (2025-11-06) trained an embedding model from agent traces; offline gains 6.5% to 23.5% (average 12.5%) across models; online plus 2.6% code retention on repos of 1,000-plus files; the agent "uses grep heavily" and the combination is best.
  • PwC "Is Grep All You Need?" (2026-05-14): grep generally beat vector retrieval on a 116-question LongMemEval sample across four harnesses, but scores varied more across harness and tool-calling style than across retrieval method. Small sample.
  • Augment's Context Engine over MCP (2026-02-06) claims 70% to 80% task improvement on Elasticsearch PRs. Vendor-run, single repo.
  • Sourcegraph removed embeddings from Cody in favour of code search (secondary).

Open questions

  • Whether Cursor currently stores codebase embeddings (its docs conflict).

Sources

AI-assisted research: gathered and summarised with AI from the sources above, each claim checked against them.

Book a demo