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

Why does Cursor use a Merkle tree to keep the index synchronized instead of just re-scanning changed files?

A Merkle tree lets the client and server each maintain a hash of their view of the project's file state, structured so that comparing two trees quickly identifies exactly which subset of files differ, without transmitting or hashing every file's full content on every check. This makes periodic sync cheap even on large codebases — the comparison cost scales with what actually changed, not with total project size.

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.