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
I have 2 agents that have the same scope of work, they basicaly have the same prompt but they defer in other parts like, model, permissions, etc. I have these two defined under .opencode/agent/lite.md and .opencode/agent/heavy.md. The only difference between the two is in the frontmater of the file.
My issue is that I want to have a single file used as prompt for both agents.
I saw that I can use the prompt:, but this seems to only be working if the agents are defined under opencode.json
I really like the freedom that I have by specifying the agents under .opencode/agent and would like to keep them there
Both issues relate to the core request of reusing prompt/content across multiple agent definitions in markdown files. Feel free to ignore if none of these address your specific case.
Sorry if the description was not good enough. I imagine having 2 agent definitions, something similar to the following in <project_path>/.opencode/agent directory
Instead of the [include] it can be a @ notation like in claudecode, prompt in frontmatter or anything else. I don't really care about the actual syntax. The point is that I would have a 3th file shared_promped.md in my project dir that will have the prompt for both agents and that can be included in both agent's md definitions under .opencode/agent
Activity
[-]Shared prompt in agent yaml definition[/-][+]Shared prompt in agent markdown definition[/+]github-actions commentedon Jan 8, 2026
This issue might be a duplicate of existing issues. Please check:
Both issues relate to the core request of reusing prompt/content across multiple agent definitions in markdown files. Feel free to ignore if none of these address your specific case.
ariane-emory commentedon Jan 9, 2026
What do you imagine this looking like in the Markdown file? Would it reuse the
{file:somefile.md}syntax used in the JSON configuration files?Adding some of these details might make it easier to try to come up with a resolution.
atanasna commentedon Jan 9, 2026
Sorry if the description was not good enough. I imagine having 2 agent definitions, something similar to the following in
<project_path>/.opencode/agentdirectoryInstead of the
[include]it can be a @ notation like in claudecode,promptin frontmatter or anything else. I don't really care about the actual syntax. The point is that I would have a 3th fileshared_promped.mdin my project dir that will have the prompt for both agents and that can be included in both agent's md definitions under .opencode/agentgithub-actions 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.