Skip to content

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

Closed as duplicate

Description

@MaxYap23

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

Activity

  1. github-actions commented on Jul 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. lakshayofficial commented on Aug 22, 2026

    @lakshayofficial

    also facing similar issue

  3. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Closing as a duplicate of #32747. Same bug: @ mentions don't see files created after startup until restart. Tracking in #32747.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions