Skip to main content

Command Palette

Search for a command to run...

Agent

Search

Instant Grep

The fastest way to find code is an exact match: a function name, variable, error string, or regex pattern. Agent uses grep automatically when you reference specific symbols.

Cursor ships with Instant Grep, a custom search engine that outperforms ripgrep on large codebases. It runs automatically; no configuration needed.

Instant Grep supports full regex and word-boundary matching, so Agent can construct patterns like import.*PaymentService or PaymentFailedError to trace references across files.

Privacy and security

Instant Grep builds and queries its index on your machine. Cursor does not upload file paths or code to build a search index, and it does not store embeddings of your codebase for search.

When Agent opens a match, that file content can still be included in the model request. Data Use describes how Cursor handles that data.

Explore subagent

Agent can spawn an Explore subagent that runs in its own context window with a faster model. It executes many parallel searches without bloating the main conversation, returning only the relevant findings.

Agent uses the Explore subagent automatically when it decides a task benefits from broad search. You can also request it directly: "use a subagent to find all the places we validate user input."

This is useful for context management. Searching through many files generates a lot of context. The subagent keeps the main conversation focused by summarizing results instead of dumping raw file contents.

FAQ

Yes. Cursor supports multi-root workspaces. Each workspace folder's context is available to Agent. Some features that rely on a single git root, like worktrees, are disabled for multi-root workspaces. Cloud Agents do not support multi-root workspaces.