Skip to content

@ file mention never shows project files on Windows — only agents (general/explore) appear #28824

Closed as not planned

Description

@diamondjmd2

[BUG] @ file mention never shows project files on Windows — only agents (general/explore) appear
OpenCode version: 1.15.7
Platform: Windows (win32, Windows 10/11)
Shell: PowerShell 7.6.1 (pwsh)
Terminal: VS Code integrated terminal + standalone PowerShell (both affected)

Summary

Typing @ in the TUI prompt only shows agent suggestions (@general, @explore). Project files never appear, regardless of whether I type just @ or @ followed by search text. The opencode debug file tree command fails with "Unexpected error".

Environment

  • Project size: 18,103 files
  • Key directories: build/ (10,607 files), .git/ (4,759 files), src/ (769 files), external/ (888 files)
  • File watcher: platform=win32 backend=windows

Steps to Reproduce

  1. Navigate to a project with 18,000+ files
  2. Run opencode
  3. Type @ in the prompt
  4. Only agents appear — no file suggestions

What I've Tried

  1. Cleared OpenCode cache (%USERPROFILE%\.cache\opencode) — no change
  2. Added watcher.ignore to opencode.json excluding build/**, .git/**, .cache/**, .vs/** — no change
  3. Restarted OpenCode multiple times — no change
  4. Tried opencode --log-level DEBUG --pure — same result
  5. Tried both just @ and @ followed by filename text — neither shows files
  6. Tried VS Code extension AND standalone PowerShell terminal — both affected

Diagnostic Evidence

Log confirms watcher initializes but never publishes file tree:

file.watcher directory=C:\...\project init
file.watcher platform=win32 backend=windows watcher backend

No file.tree.updated, mention, or autocomplete events appear in logs.
opencode debug file tree fails:

Error: Unexpected error, check log file at ...

opencode debug file list works — server CAN see files, but TUI mention system doesn't receive them.
opencode debug file status works — returns git file status correctly.
Resolved config shows watcher ignore patterns are applied:

{
  "watcher": {
    "ignore": ["build/**", "build-serena/**", ".git/**", ".cache/**", ".vs/**"]
  }
}

Expected Behavior

@ should fuzzy-search project files and show them alongside agents in the mention dropdown.

Actual Behavior

Only agents appear. File index/tree is never populated.

Activity

  1. github-actions commented on May 22, 2026

    @github-actions
    Contributor

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

    Your issue provides additional diagnostic detail (watcher initializes but never publishes a file tree, opencode debug file tree failing) which may be helpful context even if the root cause overlaps.

  2. LOYINuts commented on Jun 11, 2026

    @LOYINuts

    same

  3. adeelrehmancs commented on Jun 16, 2026

    @adeelrehmancs

    same

  4. wuhao2343 commented on Jun 19, 2026

    @wuhao2343

    I have found a solution:

    1. Find rg.exe (many development software come with this tool, such as VSCode. You can use a global search tool like Everything to search for it. If you can't find it, download one)
    2. Copy rg.exe to the directory %USERPROFILE%\.local\share\opencode\bin, and set this directory in the environment variables
    3. Restarting opencode will solve the problem
    Image
  5. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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