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
OpenCode doesn't respect external instructions files when added to opencode.json #4553
Both the opencode.json and the external files are in the same directory (both are in the global directory). Everything else in the global opencode.json (for example the MCP servers) work as expected. I will re-try this later with the newest opencode version and share my exact opencode.json file.
After thorough testing I see how it works! After adding "instructions": ["ultracite.md"] to my global opencode.json, it does not follow the rules in ultracite.md, but, when I add "instructions": ["ultracite.md"] to a project's opencode.json, it does follow the rules in ultracite.md. Is it on purpose that "instructions": ["ultracite.md"] doesn't work globally or a bug? @rekram1-node ?
I see now that after adding "instructions": ["ultracite.md"] to my global directory it also includes my local directory's ultracite.md in the custom instructions. Is there any way to be able to add my ultracite.md to my global directory and add something to my global opencode.json for it to include my global ultracite.md in the custom instructions or only AGENTS.md can work globally but all external custom instructions files (even those mentioned in the global opencode.json) has to be added in every project directory?
to my global opencode.json, even if I have a file named "ultracite.md" in my global directory (the same directory where the global opencode.json file lives) it will not include it into its custom instructions. In order for me to be able to have my "ultracite.md" work as custom instructions globally, I have to add it (ultracite.md) in every single project directory. Is that on purpose or a bug?
Activity
rekram1-node commentedon Nov 20, 2025
@Salloxy where are those files that it references located? They are resolved relative to ur cwd
Salloxy commentedon Nov 21, 2025
Both the opencode.json and the external files are in the same directory (both are in the global directory). Everything else in the global opencode.json (for example the MCP servers) work as expected. I will re-try this later with the newest opencode version and share my exact opencode.json file.
Salloxy commentedon Nov 21, 2025
After thorough testing I see how it works! After adding "instructions": ["ultracite.md"] to my global opencode.json, it does not follow the rules in ultracite.md, but, when I add "instructions": ["ultracite.md"] to a project's opencode.json, it does follow the rules in ultracite.md. Is it on purpose that "instructions": ["ultracite.md"] doesn't work globally or a bug? @rekram1-node ?
Salloxy commentedon Nov 21, 2025
I see now that after adding "instructions": ["ultracite.md"] to my global directory it also includes my local directory's ultracite.md in the custom instructions. Is there any way to be able to add my ultracite.md to my global directory and add something to my global opencode.json for it to include my global ultracite.md in the custom instructions or only AGENTS.md can work globally but all external custom instructions files (even those mentioned in the global opencode.json) has to be added in every project directory?
rekram1-node commentedon Nov 21, 2025
im not sure im following
Salloxy commentedon Nov 21, 2025
Haha sorry for the confusion, when I add
"instructions": ["ultracite.md"]
to my global opencode.json, even if I have a file named "ultracite.md" in my global directory (the same directory where the global opencode.json file lives) it will not include it into its custom instructions. In order for me to be able to have my "ultracite.md" work as custom instructions globally, I have to add it (ultracite.md) in every single project directory. Is that on purpose or a bug?
rekram1-node commentedon Nov 22, 2025
that’s on purpose, it is resolved relative to where opencode runs, use an absolute path if u dont want that
Salloxy commentedon Nov 22, 2025
Makes sense, will close the issue.