You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm coming back to opencode after a few weeks. @ used to autocomplete available files in the dir. It's not doing that anymore. It's only showing available agents.
In my dir, I have .ai/prompts/init.md. I am not able to lookup that filepath in the tui input.
OpenCode version
1.0.223
Operating System
macOS 26.1
Terminal
Ghostty
Reacted by Volodymyr Zahorniak, Björn-Eric Abr., Wiktor Golicz, Matthieu Talbot, rl, Drew Harris, Jakub Kolar, jtaub, Peer Xu and Adam Żbikowski
I just checked in other projects. @ works and shows up file path suggestions in other projects. For some reason it's not working in this particular project. If it helps, this project has not be initialised as a git repo yet.
It could be a side-effect of the mechanism to ignore files in .gitignore. You could argue it's a security feature as well since typically, .env files are git-ignored.
Try it your self. Add a file to .gitignore and it will no longer show in the suggested files.
@abeisleem how can i fix this side effect while keeping the .gitignore file unchanged? I hope to have the ability to @ all files.
It could be a side-effect of the mechanism to ignore files in .gitignore. You could argue it's a security feature as well since typically, .env files are git-ignored.
Try it your self. Add a file to .gitignore and it will no longer show in the suggested files.
The file system is designed to work with version-controlled projects and expects ignore patterns to be present.
A workaround would be to create a minimal .gitignore/.ignore in the root dir
touch .gitignore
# OR
touch .ignore
More technical details:
In packages/opencode/src/file/index.ts, the list() function checks if the project is a git repository and loads .gitignore/.ignore files to filter results packages/opencode/src/file/index.ts. When no .gitignore exists, the ignore logic may not be handling the empty case properly.
And I'm not sure how the maintainers feel about not following this pattern for security (and maybe even context bloating) purposes. Naively tagging: @rekram1-node? I'd be happy to work a PR for this if you deem this behavior is worth supporting.
I've encountered the same issue when working in a git repo with a defined .gitignore. If I delete it, the autocompletion suddenly starts working and keeps working for a short while after reverting the file. Then it stops working again.
It may not be related to the Git repository. I am on another computer and have not installed Git, so naturally I do not have a Git repository. However, I can still use @ to query all files in the current working directory.
On this computer, it was initialized as a Git repository and a. gitignore file was created, but no files could be searched; Of course, I deleted the Git repository, but the problem still persists
I also encountered the same problem, and now the issue has been resolved.
There is a problem with a tool called ripgrep (i.e. rg. exe)
This is a high-performance text search tool that not only affects @ search for the current file, but also affects loading skills
Rg.exe is located in the "%USERPROFILE%.local\share\opencode\bin" directory
OpenCode should be able to find it, but I don't know why it can't be found. Just add this path to the system PATH environment variable
The problem has been solved, but I still don't know why OpenCode can't find this program
This is mentioned in docs already https://opencode.ai/docs/tools/#ignore-patterns
I had .gitignore and since ripgrep respects it, it won't autocomplete files. Workaround is to create .ignore too with content !*.
Activity
github-actions commentedon Jan 2, 2026
This issue might be a duplicate of existing issues. Please check:
@mentions #3734: CJK characters break some features like@mentionsFeel free to ignore if none of these address your specific case.
flexdinesh commentedon Jan 2, 2026
I just checked in other projects.
@works and shows up file path suggestions in other projects. For some reason it's not working in this particular project. If it helps, this project has not be initialised as a git repo yet.flexdinesh commentedon Jan 5, 2026
I initialised the project into a git repo and now the files autocomplete when using
@. Is this by design?abeisleem commentedon Jan 10, 2026
It could be a side-effect of the mechanism to ignore files in .gitignore. You could argue it's a security feature as well since typically,
.envfiles are git-ignored.Try it your self. Add a file to
.gitignoreand it will no longer show in the suggested files.flexdinesh commentedon Jan 12, 2026
But non git repos don't have a
.gitignoreright? Should the harness still ignore all files if the dir is not a git repo?Yimi81 commentedon Jan 22, 2026
@abeisleem how can i fix this side effect while keeping the .gitignore file unchanged? I hope to have the ability to @ all files.
edward821220 commentedon Jan 28, 2026
same issue
I can't mention files
Adding a .gitignore file still achieves the same result.
abeisleem commentedon Jan 28, 2026
The file system is designed to work with version-controlled projects and expects ignore patterns to be present.
A workaround would be to create a minimal
.gitignore/.ignorein the root dirtouch .gitignore # OR touch .ignoreMore technical details:
In
packages/opencode/src/file/index.ts, thelist()function checks if the project is a git repository and loads.gitignore/.ignorefiles to filter results packages/opencode/src/file/index.ts. When no.gitignoreexists, the ignore logic may not be handling the empty case properly.Tangentially, there's also:
And I'm not sure how the maintainers feel about not following this pattern for security (and maybe even context bloating) purposes. Naively tagging: @rekram1-node? I'd be happy to work a PR for this if you deem this behavior is worth supporting.
edward821220 commentedon Jan 30, 2026
I resoved it by
brew install ripgrepWiktor102 commentedon Feb 27, 2026
I've encountered the same issue when working in a git repo with a defined
.gitignore. If I delete it, the autocompletion suddenly starts working and keeps working for a short while after reverting the file. Then it stops working again.cyf007-lab commentedon Mar 24, 2026
It may not be related to the Git repository. I am on another computer and have not installed Git, so naturally I do not have a Git repository. However, I can still use @ to query all files in the current working directory.
On this computer, it was initialized as a Git repository and a. gitignore file was created, but no files could be searched; Of course, I deleted the Git repository, but the problem still persists
MartyLake commentedon Mar 24, 2026
Hey, I wished on non-git repos, that opencode
@just list all files.cyf007-lab commentedon Mar 28, 2026
I also encountered the same problem, and now the issue has been resolved.
There is a problem with a tool called ripgrep (i.e. rg. exe)
This is a high-performance text search tool that not only affects @ search for the current file, but also affects loading skills
Rg.exe is located in the "%USERPROFILE%.local\share\opencode\bin" directory
OpenCode should be able to find it, but I don't know why it can't be found. Just add this path to the system PATH environment variable
The problem has been solved, but I still don't know why OpenCode can't find this program
LOYINuts commentedon Jun 11, 2026
same
darukutsu commentedon Jun 13, 2026
This is mentioned in docs already https://opencode.ai/docs/tools/#ignore-patterns
I had
.gitignoreand since ripgrep respects it, it won't autocomplete files. Workaround is to create.ignoretoo with content!*.