Cursor indexes your codebase by computing embeddings for each file. This improves AI-generated answers about your code. When you open a project, Cursor starts indexing automatically. New files are indexed incrementally. Check indexing status at: Cursor Settings > Indexing & Docs

Configuration

Cursor indexes all files except those in ignore files.

Click Show Settings to:

  • Enable automatic indexing for new repositories
  • Configure which files to ignore

Ignoring large content files improves answer accuracy.

View indexed files

To see indexed file paths: Cursor Settings > Indexing & Docs > View included files

This opens a .txt file listing all indexed files.

Multi-root workspaces

Cursor supports multi-root workspaces, letting you work with multiple codebases:

  • All codebases get indexed automatically
  • Each codebase’s context is available to AI
  • .cursor/rules work in all folders

PR search helps you understand your codebase’s evolution by making historical changes searchable and accessible through AI.

How it works

Cursor automatically indexes all merged PRs from your repository history. Summaries appear in semantic search results, with smart filtering to prioritize recent changes.

Agent can fetch PRs, commits, issues, or branches into context using @[PR number], @[commit hash], or @[branch name]. Includes GitHub comments and BugBot reviews when connected.

Platform support includes GitHub, GitHub Enterprise, and Bitbucket. GitLab is not currently supported.

GitHub Enterprise users: The fetch tool falls back to git commands due to VSCode auth limitations.

Ask questions like “How are services implemented in other PRs?” and Agent will automatically fetch relevant PRs into context to provide comprehensive answers based on your repository’s history.

FAQ