[FEATURE]: Add instructions in docs for using a global AGENTS.md #4674

Closed
opened 2026-02-16 17:44:59 -05:00 by yindo · 4 comments
Owner

Originally created by @cdfuller on GitHub (Jan 10, 2026).

Originally assigned to: @jayair on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I'm new to the project and was unable to find the way to use my preexisting AGENTS.md from other coding agents with opencode. I was able to solve my issue with help from a user on the discord.

It would be helpful if the docs stated that AGENTS.md could be added at ~/.config/opencode/AGENTS.md

Originally created by @cdfuller on GitHub (Jan 10, 2026). Originally assigned to: @jayair on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I'm new to the project and was unable to find the way to use my preexisting AGENTS.md from other coding agents with opencode. I was able to solve my issue with help from a user on the discord. It would be helpful if the docs stated that `AGENTS.md` could be added at `~/.config/opencode/AGENTS.md`
yindo added the discussiondocs labels 2026-02-16 17:44:59 -05:00
yindo closed this issue 2026-02-16 17:44:59 -05:00
Author
Owner

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

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

  • #6156: Opencode doesn't know the location of its config file - Similar issue about documentation clarity on where config files are located
  • #6669: Docs miss mentioning XDG base directories for global configuration while already supporting them - About missing documentation for global configuration file locations, including global AGENTS.md
  • #4170: Reorganize and document dirs for config, agents, auth credentials, sessions - Related issue requesting comprehensive documentation of all configuration directories
  • #7160: v1.1.4 Global md files issue - Bug about AGENTS.md/CLAUDE.md files in ~/.config/opencode/ not being retrieved

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

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate of existing issues. Please check: - #6156: Opencode doesn't know the location of its config file - Similar issue about documentation clarity on where config files are located - #6669: Docs miss mentioning XDG base directories for global configuration while already supporting them - About missing documentation for global configuration file locations, including global AGENTS.md - #4170: Reorganize and document dirs for config, agents, auth credentials, sessions - Related issue requesting comprehensive documentation of all configuration directories - #7160: v1.1.4 Global md files issue - Bug about AGENTS.md/CLAUDE.md files in ~/.config/opencode/ not being retrieved Feel free to ignore if none of these address your specific case.
Author
Owner

@roboticarmgroup commented on GitHub (Jan 10, 2026):

You simply paste your AGENTS.md file into the opencode config file like you explained someone helped you do... Well also something to be aware of...

Project-Specific AGENTS.md
For rules that apply only to a specific project, the file should be in the root directory of that project. When you run opencode within that directory or its subdirectories, it will automatically look for and apply the instructions in this file

*This is better than sloppily adding a master agents.md because cache/memory/context lengths can be applied at a project level instead of broadly. This is something new and growing rapidly that the developers are aware of and building towards.

@roboticarmgroup commented on GitHub (Jan 10, 2026): You simply paste your AGENTS.md file into the opencode config file like you explained someone helped you do... Well also something to be aware of... Project-Specific AGENTS.md For rules that apply only to a specific project, the file should be in the root directory of that project. When you run opencode within that directory or its subdirectories, it will automatically look for and apply the instructions in this file *This is better than sloppily adding a master agents.md because cache/memory/context lengths can be applied at a project level instead of broadly. This is something new and growing rapidly that the developers are aware of and building towards.
Author
Owner

@rekram1-node commented on GitHub (Jan 10, 2026):

this is already documented?

https://opencode.ai/docs/rules#global

@rekram1-node commented on GitHub (Jan 10, 2026): this is already documented? https://opencode.ai/docs/rules#global
Author
Owner

@cdfuller commented on GitHub (Jan 10, 2026):

You're right. I guess I just missed it in the search.

@cdfuller commented on GitHub (Jan 10, 2026): You're right. I guess I just missed it in the search.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4674