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
{{ message }}
Repository navigation
The Manual Instructions in AGENTS.md seems to only work for relative referecnes in the current project #1490
I've been experimenting with a set of rules primarily for use with Claude Code that I also want to try out with opencode.
I've relied on @file/references/like/this.md in Claude Code and it's worked pretty well, so when I saw the documentation on rules that alluded to similar functionality in opencode (https://opencode.ai/docs/rules/#manual-instructions-in-agentsmd), I was hoping I could use the same set of files as-is but that doesn't seem to be the case.
To clarify, I have my AGENTS.md and file references in ~/.config/opencode/AGENTS.md. Similar to my Claude Code setup, I have subfolders like standards/data.md referenced within AGENTS.md as @standards/data.md, but what I found is that when I ran prompts, it would try to read standards/data.md relative to the project directory I was in, not relative to the file that it was referenced from.
Perhaps this is by design, but the documentation on it is unclear. At a minimum, clarifying the documentation would be good to avoid confusion, but I would love for it to behave similar to Claude Code to make sharing system prompts with opencode trivial.
I've also been trying to use the instructions property in ~/.config/opencode.json and it seems like that isn't working either. I've tried with both relative and absolute paths and I haven't been able to verify that it's loading.
I've tried a cursory check of the context usage, but I've also asked the AI if a specific copy & pasted text showed up in my system prompt and it responded with no.
So maybe neither of these methods properly work from ~/.config?
changed the title [-]The Maanual Instructions in AGENTS.md seems to only work for relative referecnes in the current project[/-][+]The Manual Instructions in AGENTS.md seems to only work for relative referecnes in the current project[/+]on Aug 1, 2025
More context. I found some documentation about using {file:...} in the opencode.json file (https://opencode.ai/docs/config/#files). It DID seem to expand the file contents - I verified it by looking at the logs and found where the processed config gets output. I can see my file contents there, but it did not seem to have any effect on the system prompt or size of the context window, so it seems like there's either out of date documentation on how this all works or something is broken.
what I found is that when I ran prompts, it would try to read standards/data.md relative to the project directory I was in, not relative to the file that it was referenced from.
The overloading of @ and the merit of ahereing strictly to legacy apps like Claude Code is debated: #2965
Specifically, a claude_compat option has been suggested as a way to configure OC so that it resembles Claude behavior.
@nerdo, not sure if that issue addresses your itch enough the consider closing this and joining the discussion there?
Activity
JouckJack commentedon Aug 1, 2025
log.txt
nerdo commentedon Aug 1, 2025
I've also been trying to use the instructions property in ~/.config/opencode.json and it seems like that isn't working either. I've tried with both relative and absolute paths and I haven't been able to verify that it's loading.
I've tried a cursory check of the context usage, but I've also asked the AI if a specific copy & pasted text showed up in my system prompt and it responded with no.
So maybe neither of these methods properly work from ~/.config?
[-]The Maanual Instructions in AGENTS.md seems to only work for relative referecnes in the current project[/-][+]The Manual Instructions in AGENTS.md seems to only work for relative referecnes in the current project[/+]nerdo commentedon Aug 1, 2025
More context. I found some documentation about using {file:...} in the opencode.json file (https://opencode.ai/docs/config/#files). It DID seem to expand the file contents - I verified it by looking at the logs and found where the processed config gets output. I can see my file contents there, but it did not seem to have any effect on the system prompt or size of the context window, so it seems like there's either out of date documentation on how this all works or something is broken.
rekram1-node commentedon Aug 1, 2025
regarding your last comment, that is a separate issue: #1240 (just for context)
taqtiqa-mark commentedon Oct 14, 2025
The overloading of
@and the merit of ahereing strictly to legacy apps like Claude Code is debated: #2965Specifically, a
claude_compatoption has been suggested as a way to configure OC so that it resembles Claude behavior.@nerdo, not sure if that issue addresses your itch enough the consider closing this and joining the discussion there?
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
Fix/mac app closing onclose (anomalyco#1489) (anomalyco#1490)