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
Separate instructions for the “main” agent vs. sub-agents #1668
If I understand correctly, these instructions are passed to every new session. And since sub-agents are really just “invisible sessions” they also receive all the same instructions as the “main” session.
Sub-agents receive additional custom instructions as configured.
There seems to be no way to give specialized instructions ONLY to the “main session”.
Does that make sense?
The reason I want something like this is because I’m attempting to implement a workflow where the “main session” becomes “the orchestrator”. I’m giving it very strict instructions about the steps it should follow to drive a change through to completion. Right now I’m putting these instructions in AGENTS.md and it’s confusing (+ polluting the context of) the sub-agents.
In this context each agent takes on a “role”. The current sub-agents have roles like “test writer”, “linter fixer”. I want the main session to also take on a specialized role: “the orchestrator”.
Perhaps custom slash commands (#299) would be an OK fit for this? At least as a workaround. It would give me a way to easily insert a prompt into the main session to get it to take on the role of a specialized agent.
That does mean that this prompt isn't going into the system messages. Would that make a big difference?
I still think that the concept of "choosing an agent" (or personality?) to chat with is pretty cool and could be useful.
I've seen others ask about getting to "control" the sub-agents and chat with them. To use them more as separate agents that "hand off" to each other with the human still in the mix. (I'll search for and link to an issue if it exists.)
Perhaps this concept of "choosing an agent" (/personality) for the main chat combines nicely with that?
Are subagents provided with a fresh context / prompt, which is constructed dynamically, on the fly, by the primary agent which spawned them? Thank you to the team for such an amazing tool!
Activity
jessevdp commentedon Aug 8, 2025
Perhaps custom slash commands (#299) would be an OK fit for this? At least as a workaround. It would give me a way to easily insert a prompt into the main session to get it to take on the role of a specialized agent.
That does mean that this prompt isn't going into the
systemmessages. Would that make a big difference?I still think that the concept of "choosing an agent" (or personality?) to chat with is pretty cool and could be useful.
I've seen others ask about getting to "control" the sub-agents and chat with them. To use them more as separate agents that "hand off" to each other with the human still in the mix. (I'll search for and link to an issue if it exists.)
Perhaps this concept of "choosing an agent" (/personality) for the main chat combines nicely with that?
jessevdp commentedon Aug 8, 2025
LMAO here I am pondering about this, and you already shipped this exact fucking thing. (#1689) Way to go!
Thx @thdxr ❤️
JamesJosephFinn commentedon Aug 31, 2025
Are subagents provided with a fresh context / prompt, which is constructed dynamically, on the fly, by the primary agent which spawned them? Thank you to the team for such an amazing tool!
rekram1-node commentedon Aug 31, 2025
yes thats correct
bogorad commentedon Jan 16, 2026
maybe this should be reflected in the docs?
https://opencode.ai/docs/agents/#subagents
chore(aur): switch AUR to Electron Linux builds, drop Tauri Linux tar…