Is there a way to have instructions in the global configuration? #6769

Closed
opened 2026-02-16 18:05:13 -05:00 by yindo · 2 comments
Owner

Originally created by @berenar on GitHub (Jan 19, 2026).

Originally assigned to: @jayair on GitHub.

Question

I was using instructions: ["/instructions/*.md"] in my global config referencing multiple instruction files for testing, general coding, etc. right there on my global config, but I realised that when running opencode (on any project) it was trying to load the instructions array paths from the local project, not from the global config where those files where.

I've moved those instructions files to a global AGENTS.md as a workaround, but I would like to have different files for different kind of instructions.

In the docs, it says that the recommended way is to use this instructions field, but at least for me that was not clear.

Am I missing something? Are skills meant to solve this?

Originally created by @berenar on GitHub (Jan 19, 2026). Originally assigned to: @jayair on GitHub. ### Question I was using `instructions: ["/instructions/*.md"]` in my global config referencing multiple instruction files for testing, general coding, etc. right there on my global config, but I realised that when running opencode (on any project) it was trying to load the `instructions` array paths from the local project, not from the global config where those files where. I've moved those instructions files to a global `AGENTS.md` as a workaround, but I would like to have different files for different kind of instructions. In the docs, it [says](https://opencode.ai/docs/rules/#using-opencodejson) that the recommended way is to use this `instructions` field, but at least for me that was not clear. Am I missing something? Are [skills](https://opencode.ai/docs/skills/) meant to solve this?
yindo added the docs label 2026-02-16 18:05:13 -05:00
yindo closed this issue 2026-02-16 18:05:13 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 19, 2026):

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

  • #4758: Custom instruction files in opencode.jsonc not being loaded - Same issue where instructions array is defined in global config but files are not actually loaded
  • #8892: Anthropic models ignore Custom Instructions - Related issue with instructions array functionality

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 19, 2026): This issue might be a duplicate of existing issues. Please check: - #4758: Custom instruction files in `opencode.jsonc` not being loaded - Same issue where `instructions` array is defined in global config but files are not actually loaded - #8892: Anthropic models ignore Custom Instructions - Related issue with `instructions` array functionality Feel free to ignore if none of these address your specific case.
Author
Owner

@berenar commented on GitHub (Jan 19, 2026):

Actually https://github.com/anomalyco/opencode/issues/4758 is exactly the issue I had, and https://github.com/anomalyco/opencode/issues/4758#issuecomment-3578270468 is the solution to it. This definitely should be in the docs

@berenar commented on GitHub (Jan 19, 2026): Actually https://github.com/anomalyco/opencode/issues/4758 is exactly the issue I had, and https://github.com/anomalyco/opencode/issues/4758#issuecomment-3578270468 is the solution to it. This definitely should be in the docs
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6769