Subagent messages are sent to main chat instead of subagent chat, breaking flow #1521

Closed
opened 2026-02-16 17:31:22 -05:00 by yindo · 10 comments
Owner

Originally created by @ak127a on GitHub (Aug 28, 2025).

Originally assigned to: @thdxr on GitHub.

When invoking a subagent, if it performs an action, the resulting message is not sent in the subagent chat. Instead, it appears in the main chat, disrupting the intended conversational flow.

Originally created by @ak127a on GitHub (Aug 28, 2025). Originally assigned to: @thdxr on GitHub. When invoking a subagent, if it performs an action, the resulting message is not sent in the subagent chat. Instead, it appears in the main chat, disrupting the intended conversational flow.
yindo closed this issue 2026-02-16 17:31:22 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 28, 2025):

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

  • #1832: Similar subagent chat communication flow issues where messages don't appear in the correct chat context

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

@github-actions[bot] commented on GitHub (Aug 28, 2025): This issue might be a duplicate of existing issues. Please check: - #1832: Similar subagent chat communication flow issues where messages don't appear in the correct chat context Feel free to ignore if none of these address your specific case.
Author
Owner

@ak127a commented on GitHub (Aug 28, 2025):

Looks like I should be using a primary agent and not a subagent.. closing the issue

@ak127a commented on GitHub (Aug 28, 2025): Looks like I should be using a primary agent and not a subagent.. closing the issue
Author
Owner

@ak127a commented on GitHub (Aug 28, 2025):

Just realised I have a few of these setup and cycling them TAB isn't gonna be easy..
Any way to directly invoke an agent?

@ak127a commented on GitHub (Aug 28, 2025): Just realised I have a few of these setup and cycling them TAB isn't gonna be easy.. Any way to directly invoke an agent?
Author
Owner

@rekram1-node commented on GitHub (Aug 28, 2025):

@ak127a just do an "@" reference to agent

ex: agent is called docs-agent

type into input:

@docs-agent please write docs on redis

@rekram1-node commented on GitHub (Aug 28, 2025): @ak127a just do an "@" reference to agent ex: agent is called docs-agent type into input: @docs-agent please write docs on redis
Author
Owner

@rekram1-node commented on GitHub (Aug 28, 2025):

you can also use the /agents slash command to open a dialog to select your primary agent from instead of tabbing

@rekram1-node commented on GitHub (Aug 28, 2025): you can also use the /agents slash command to open a dialog to select your primary agent from instead of tabbing
Author
Owner

@ak127a commented on GitHub (Aug 28, 2025):

@ only lists the subagents, not the primary agents.

@ak127a commented on GitHub (Aug 28, 2025): @ only lists the subagents, not the primary agents.
Author
Owner

@rekram1-node commented on GitHub (Aug 28, 2025):

you can make an agent be both if you want to do that, but a primary agent is one that you specifically talk to, a subagent is one that the primary agent can call

@rekram1-node commented on GitHub (Aug 28, 2025): you can make an agent be both if you want to do that, but a primary agent is one that you specifically talk to, a subagent is one that the primary agent can call
Author
Owner

@rekram1-node commented on GitHub (Aug 28, 2025):

you could also write slash commands for your agents and trigger them that way

@rekram1-node commented on GitHub (Aug 28, 2025): you could also write slash commands for your agents and trigger them that way
Author
Owner

@gimbo commented on GitHub (Oct 1, 2025):

... but a primary agent is one that you specifically talk to, a subagent is one that the primary agent can call

@rekram1-node — I think the docs aren't clear on this point. In particular, in the Subagents section of the Agents page we have:

Subagents are specialized assistants that primary agents can invoke for specific tasks. You can also manually invoke them by @ mentioning them in your messages.

My initial reading of that final sentence was that I could directly interact with a subagent, but AFAICS that's not the case (and your comment suggests that too).

E.g. if I do this:

@general What is your name?

I might (from the docs) expect that question to be answered by the general agent (subagent), perhaps replying with its model name, or agent name. In fact, it seems it's handled by whatever primary agent is active. (As it happens, when I did it, it triggered a task for the general agent, but that's different to directly interacting with the subagent, and the primary agent seems to have still been involved in the interaction.)

@gimbo commented on GitHub (Oct 1, 2025): > ... but a primary agent is one that you specifically talk to, a subagent is one that the primary agent can call @rekram1-node — I think the docs aren't clear on this point. In particular, [in the Subagents section of the Agents page](https://opencode.ai/docs/agents/#subagents) we have: > Subagents are specialized assistants that primary agents can invoke for specific tasks. You can also manually invoke them by `@ mentioning` them in your messages. My initial reading of that final sentence was that I could directly interact with a subagent, but AFAICS that's not the case (and your comment suggests that too). E.g. if I do this: ``` @general What is your name? ``` I might (from the docs) expect that question to be answered by the `general` agent (subagent), perhaps replying with its model name, or agent name. In fact, it seems it's handled by whatever primary agent is active. (As it happens, when I did it, it triggered a task for the `general` agent, but that's different to directly interacting with the subagent, and the primary agent seems to have still been involved in the interaction.)
Author
Owner

@rekram1-node commented on GitHub (Oct 1, 2025):

yes u are correct in your understanding, it does still involve the primary agent we should probably be more clear on that…

@rekram1-node commented on GitHub (Oct 1, 2025): yes u are correct in your understanding, it does still involve the primary agent we should probably be more clear on that…
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1521