Indexing
Learn how Agent finds code now, how to ask so it finds the right files, and how to keep files out with .cursorignore.
-
How Do You Ask Questions So Cursor Finds the Right Code? Match the question to what you know. Level 2: ContextYou know the nameYou know the behavior
- Exact symbol, for grep
- One flow, start to end
- Large search, in a subagent
-
How Do You Keep Files Out of Cursor With .cursorignore? Create a .cursorignore file in your project root, using .gitignore syntax. Level 3: WorkflowsBlockedby .cursorignore
- Agent
- Tab
- @ mentions
Not blockedstill able to read files- Terminal tools
- MCP tools
-
How Does Cursor Search Your Codebase Now? Agent finds code itself, using its search tools. Level 3: Workflows
- 1Your question
- 2Search by meaning
- 3Instant Grep for exact matches
- 4Reads the files
There's less to set up than guides suggest
Many tutorials describe tuning an index and typing @Codebase. Today, Agent searches by itself with its own tools, and Instant Grep needs no configuration. The 3.19 release removed the Index New Folders setting altogether. What's left for you is mostly choosing what to exclude and how to phrase your questions.
Where the sources disagree
Cursor's Search docs say it doesn't store embeddings of your codebase for search. Its course says Agent can search by meaning, and the 3.27 release notes mention semantic search. These pages were all live on 6 November 2026, so if the difference matters for compliance, ask Cursor directly and read its data-use page.
How does Cursor search my codebase?
Agent uses Instant Grep for exact matches and regex, and Cursor's course says it can also search by meaning. For wide searches, it can start an Explore subagent that runs many searches in its own context.
How do I reindex a project in Cursor?
Open the command palette and search for Reindex. Cursor's troubleshooting page suggests this when Agent doesn't pick up your files, after you've checked .cursorignore and .gitignore.
Does Cursor upload my code to build an index?
Cursor's Search docs say Instant Grep builds and queries its index on your machine, without uploading file paths or code for it. Files Agent opens can still be included in the request sent to the model.
What does .cursorignore do?
It blocks listed files from Agent, Tab and @ mentions, using .gitignore syntax. Cursor's docs say terminal and MCP tools aren't blocked by it, and that complete protection isn't guaranteed.