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
When using opencode with things you would not want in a repo you would add to .gitignore but if you want to use @ to flag a file it will not let you having a file if its just .opencodenotignore or a more complex config file would allow for users still not have the file sent to the code repo but still be able to reference it when using opencode.
A readonly permission to allow the model to read important docs specs etc but not be allowed to edit them
going to close I think we solved your issue, if you want an agent to be able to only read files but not edit you can try using permissions: https://opencode.ai/docs/permissions/#_top
The plan agent could prolly also get used out of the box for that as well
Activity
github-actions commentedon Oct 9, 2025
This issue might be a duplicate of existing issues. Please check:
listtool #2517: Requests a way to disable .gitignore-based filtering for the list tool, addressing similar use case of needing files that are gitignored but still accessible to opencodeFeel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 9, 2025
@wojons opencode uses ripgrep so you can make a:
.ignore
.rgignore
and specify the rules you want opencode to respect.
Example:
local.txt is in gitignore but I want to be able to @ reference it
in .ignore or .rgignore put:
!local.txt
and then it will respect that
wojons commentedon Oct 9, 2025
This is great :) it worked exactly how do we add this to the docs so that others can get access to this information
rekram1-node commentedon Oct 9, 2025
https://opencode.ai/docs/tools/#ignore-patterns << this was added today
rekram1-node commentedon Oct 14, 2025
going to close I think we solved your issue, if you want an agent to be able to only read files but not edit you can try using permissions: https://opencode.ai/docs/permissions/#_top
The plan agent could prolly also get used out of the box for that as well