You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add a Refresh file index command that forces a search-index rescan #40392
I have verified this feature I'm about to request hasn't been suggested before.
Summary
The file search index is built once when a project opens; files added afterwards may not be discoverable. Add an explicit Refresh file index command that forces a rescan of the current project and rebuilds the search index, with progress feedback so the user knows it is running.
Server: add a location-scoped refresh endpoint that triggers a rescan and waits for it to finish before responding (not fire-and-forget — otherwise the user sees a success toast before the index is actually rebuilt).
Desktop app: add a Refresh file index command to the command palette; while it runs, show an indeterminate progress indicator (e.g. bottom of the window), then hide it.
TUI: add an fs.refresh command with a keybind (e.g. F5).
Implementation notes
ripgrep index layer: if refresh just forks a background scan and returns immediately, the user gets a false "done"; it should wait for the scan to complete.
fff index layer: waitForScan only waits for an already-started scan — it does not trigger a new one. A real rescan API (e.g. scanFiles) must be called, otherwise refresh is a no-op.
changed the title [-]Feature: add a Refresh file index command that forces a search-index rescan[/-][+][FEATURE]: Add a Refresh file index command that forces a search-index rescan[/+]on Aug 4, 2026
To restate it: you'd like an explicit Refresh file index action that forces a rescan of the current project. It would come with a server endpoint that only responds once the rescan has finished, a desktop command-palette entry with a progress indicator, and a TUI fs.refresh command with a keybind. Maintainers will consider it.
For context, in v2 the file search index already refreshes itself: the ripgrep backend rescans in the background (at most every 10 seconds) when you search, and the fff backend relies on its file watcher. There is currently no way to trigger a rescan manually, and a plugin can't do it either, because plugins have no access to the search index.
Activity
[-]Feature: add a Refresh file index command that forces a search-index rescan[/-][+][FEATURE]: Add a Refresh file index command that forces a search-index rescan[/+]github-actions commentedon Aug 4, 2026
Thanks for updating the issue! The title and template are now in order. We appreciate the detailed write-up and the references to related issues.
wshRepo commentedon Sep 21, 2026
same request.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed request, @clx828!
To restate it: you'd like an explicit Refresh file index action that forces a rescan of the current project. It would come with a server endpoint that only responds once the rescan has finished, a desktop command-palette entry with a progress indicator, and a TUI
fs.refreshcommand with a keybind. Maintainers will consider it.For context, in v2 the file search index already refreshes itself: the ripgrep backend rescans in the background (at most every 10 seconds) when you search, and the fff backend relies on its file watcher. There is currently no way to trigger a rescan manually, and a plugin can't do it either, because plugins have no access to the search index.
Related issues and PRs:
@autocomplete does not detect newly created files until OpenCode is restarted #38065:@mentions missing newly created files (v1 reports)