anomalyco / anomalyco/opencode
`@` autocomplete does not detect newly created files until OpenCode is restarted
Open
@jlongster is already working on this.
Since Jul 21, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Steps to reproduce:
- Launch OpenCode.
- Keep the session running.
- Create a new file.
- This happens whether:
- the AI agent creates it, or
- I manually create it in VS Code Explorer.
- This happens whether:
- Type @ followed by the new filename.
- The file is not suggested.
- Press Ctrl+C to exit OpenCode.
- Start OpenCode again.
- Type @ again.
- The newly created file is immediately suggested.
Expected Behaviour:
The @ autocomplete should stay synchronized with the project and immediately suggest newly created files without requiring a restart.
Actual Behaviour:
The @ autocomplete appears to use a stale file index.
The filesystem itself is updated correctly, and the file exists on disk, but the autocomplete does not refresh until OpenCode is restarted.
Additional Observations:
- Happens for both manually created files and AI-created files.
- Existing files are suggested normally.
- Restarting OpenCode always fixes the problem temporarily.
- This is reproducible every time.
Plugins
No response
OpenCode version
1.18.4
Steps to reproduce
- Launch OpenCode.
- Keep the session running.
- Create a new file.
- This happens whether:
- the AI agent creates it, or
- I manually create it in VS Code Explorer.
- This happens whether:
- Type @ followed by the new filename.
- The file is not suggested.
- Press Ctrl+C to exit OpenCode.
- Start OpenCode again.
- Type @ again.
- The newly created file is immediately suggested.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
VS Code Integrated Terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.