Codebase indexing not updating after file changes

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’ve noticed that Cursor’s codebase search and “Ask about this file/repo” feature seem to be using an outdated index. When I rename files or move functions, the AI still references the old structure and gives suggestions that don’t match the current code. I’ve tried restarting and clearing the workspace, but the issue continues. Is there a way to force a full re-index, or is this a known limitation?

Steps to Reproduce

Create or open a file, then rename that file or move it to another directory within the project. Inside the renamed/moved file, modify or relocate a function, class, or important code block. Ask Cursor: “Where is the function defined?”. Observe that Cursor’s response references the old file name, the old directory, or the previous function location, even though the codebase has been updated. Restart Cursor and reopen the project to force a refresh. Repeat step 4 → see that Cursor still uses the outdated index.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.42
VSCode Version: 1.105.1
Commit: 2e353c5f5b30150ff7b874dee5a87660693d9de0
Date: 2025-12-01T02:18:26.377Z (1 day ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. The issue is with an outdated index after renaming files - the AI is referencing the old structure.

Try this:

  • Cursor Settings > Indexing & Docs > Delete Index > Compute index
  • Check .gitignore / .cursorignore - are the new paths excluded after renaming?
  • Make sure the repository root is open (not a nested folder)

Could you please share:

  • Request ID from the chat with incorrect info (chat menu > Copy Request ID, Privacy Mode should be off)
  • Screenshot of Cursor Settings > Indexing & Docs (index status, percentage)
  • Help > Toggle Developer Tools > Console - errors around the time of the request
  • Does it reproduce on a new empty project?

With all this data, I can quickly pass it to the engineers or suggest an exact fix.

I have the same issue even after reinstalling Cursor.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.