AI sometimes believes a deleted file still exists

In a prior chat, I was using the AI to create a design document for a feature. I saw it referenced PopupBase in the document as if it existed.

In a new chat, I then asked about PopupBase as it doesn’t exist.

I see it was indeed included in the file search:

Clicking on it shows an error as expected:

It could be potentially related to git revert feature that deletes created file. I think PopupBase did exist at some point, but I rolled back my working changes by reverting git changes, which deleted the PopupBase file.

That point was quite a while ago, several hours at the least. So I feel like the search indexing should of caught up.

Request ID: ef08c9fa-4e72-4e4d-9bfa-bec43ca8e2e0


Version: 0.45.11
VSCode Version: 1.96.2
Commit: f5f18731406b73244e0558ee7716d77c8096d150
Date: 2025-02-07T09:43:58.555Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Looks like there’s a small delay in the codebase indexing picking up the deleted file. This can happen sometimes, especially after git operations

You can try manually triggering a reindex from Settings > Features > Codebase Indexing to speed things up!

I experienced the issue again in 0.47.8, the AI picking up deleted files in codebase search. When I clicked on the result, VS Code shows me the file but in a red name striked out to indicate it’s deleted.

I don’t know if this is partially an issue with VS Code, especially when using Git revert that deletes a created file, which causes AI to still pick it up.

I would love a setting to force reindexing each message I send, or at least for each new chat conversation, because it completely confused the AI thinking a deleted file is existence and the AI implemented a non-working solution.