Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Is your feature request related to a problem? Please describe.
When using OpenCode in TUI (terminal) mode, the file index is built once at startup and will not auto‑update during the active session.
If new files are created outside OpenCode (via native terminal, VS Code or other editors) while a conversation is ongoing, these newly‑created files will not show up in the @‑triggered file autocompletion list.
Users are forced to either manually input full file paths in prompts, or fully restart the TUI session to trigger a fresh project directory scan.
Describe the solution you'd like
Add a new TUI built‑in command such as /refresh or /sync to manually trigger project filesystem rescan and refresh the in‑session file index.
Expected behaviors for this command:
- Rebuild file autocompletion list for
@file mentions - Refresh working context so the AI can recognize newly‑created files without restarting the whole TUI session
Describe alternatives you've considered
Two existing workarounds, both have obvious drawbacks:
- Restart TUI session: Exit with
/exitand relaunch OpenCode. Works reliably but disruptive, especially for long‑running conversations or ongoing background tasks. - Manually pass full file path: Write complete file path in prompt (e.g.
Please check the file I just created at src/utils/helper.ts). The AI may read the target file, yet the autocompletion list still stays stale.
Additional context
- OpenCode currently uses a startup‑time snapshot‑based file index.
- There is an experimental env flag
OPENCODE_EXPERIMENTAL_HOT_RELOAD, but it targets configs, skills and commands, not filesystem file rescanning for TUI. - Similar community requests for
/reload//synccommand have been raised before; this capability is still unimplemented as of now.
Use case example
- Launch OpenCode TUI session.
- Within an active conversation, create a new file externally:
src/utils/api-client.ts. - Try referencing this file via
@— it is missing from autocomplete suggestions. - Run
/refresh(new command) → file index gets updated, new file appears in the@completion list.
Platform
- OpenCode version:
1.18.25 - OS: Windows
- Installation method: npm
- Related community note: Community users confirmed
/refreshcommand does not exist inside TUI; session restart remains the only stable workaround.
Reacted by Anton Novikov and wshRepo
Metadata
Metadata
Assignees
Labels
No labels
Activity
neriousy commentedon Oct 20, 2026
Thanks for the request. We're tracking this same file-index refresh capability, including a TUI command, in #40392, so I'm closing this as a duplicate. Please follow that issue for updates.