---
answer: direct
beat: ai-technology
source: 1 article · updated: November 17, 2026
---

How can Cursor answer questions about an entire codebase without storing the code?

It doesn't search the code directly — it searches embeddings, numerical vectors that represent each code chunk's meaning. The server computes these vectors once during indexing, stores only the vectors (not the source), and discards the actual code and file names immediately after. A semantic search matches the query's embedding against stored vectors, and only if a specific matching chunk is actually needed does the server request that one piece of source from the client on demand.

Answered in

How Cursor Indexes Your Entire Codebase Without Ever Storing Your Code

Cursor's semantic search runs on embeddings, not source. The server never persists a line, and a Merkle tree keeps the index in sync as you type.

Crashtech Editorial November 17, 2026 How AI Actually Works

Read the full analysis

Other questions this article answers

More how ai actually works questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the How AI Actually Works beat.