anomalyco / anomalyco/opencode

`@` autocomplete does not detect newly created files until OpenCode is restarted

Open
#38,065 2 comments 1 reaction 1 assignee View on GitHub

@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:

  1. Launch OpenCode.
  2. Keep the session running.
  3. Create a new file.
    • This happens whether:
      • the AI agent creates it, or
      • I manually create it in VS Code Explorer.
  4. Type @ followed by the new filename.
  5. The file is not suggested.
  6. Press Ctrl+C to exit OpenCode.
  7. Start OpenCode again.
  8. Type @ again.
  9. 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
  1. Launch OpenCode.
  2. Keep the session running.
  3. Create a new file.
    • This happens whether:
      • the AI agent creates it, or
      • I manually create it in VS Code Explorer.
  4. Type @ followed by the new filename.
  5. The file is not suggested.
  6. Press Ctrl+C to exit OpenCode.
  7. Start OpenCode again.
  8. Type @ again.
  9. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.