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 am trying to have an interactive conversation with an agent, which is triggered by a custom command, in a way that this agent's work is only done upon the user confirming so, something like:
[PLAN AGENT]
USER: /research "some topic"
[RESEARCHER AGENT]:
AGENT: Let me ask you some questions...
AGENT: Question 1
AGENT: Question 2
AGENT: Question 3
USER: Answer1
USER: Answer2
USER: Answer3
AGENT: Outputs result of research
AGENT: Are you satisfied with the results?
USER: Yes
AGENT: writes to file and terminates.
[PLAN AGENT]
But after issuing the first question, all remaining interactions fall back to the default PLAN agent.
Am I trying to do something that is not supported, or is there a way to make this flow work?
@ferrao is this specifically with a subagent? Currently you can't talk to subagents which imo is a poor ux and we should fix
is this specifically with a subagent
If so I will close and link the other issue that tracks talking to subagents
No, this is with a regular agent, I have tried it with a subagent first, but you told me I could not do it in another issue, so I tried it with an agent.
Ahh I think I follow then, when you trigger the command it sends it to a certain agent, but then it doesn't actually change your selected agent...
I see
Indeed... But it's even worse... Because If I change it manually, I can start to interact with the agent that work has been delegated to (RESEARCH), but each input that I provide, is also somehow fed back to the main agent (PLAN) and I end up with two sessions, one for each agent, with similar, but different state. A whole mess, that I can not get out of.
@ferrao in regards to point 2 thats because you cant talk to a subagent, and I dont like that either I think we need to allow
Not sure what you mean, I am getting very confused with how I am supposed to use the agents functionallity.
My workflow is never about giving AI a task and waiting for it's conclusion on it's own.
I always like to interact with AI to get to my end result. But still, I want to take advantage of having dedicated agents with different skills and commands that load appropriate context and trigger those conversations, but I am not able to do any of it.
Am I trying to do something that is just completely off how this is supposed to work?
If we change to that agent manually, interaction between user/agent somehow leaks to the main context
What I interpreted this as:
"When I try to talk to a subagent the conversation leaks to main context"
What I was saying:
Currently the primary agent or a command invokes a subagent, and you navigate to the child session, subsequent messages are sent to primary agent instead of the subagent. This is intentional, but i think it is confusing so it will likely be changed
If we change to that agent manually, interaction between user/agent somehow leaks to the main context
What I interpreted this as:
"When I try to talk to a subagent the conversation leaks to main context"
What I was saying:
Currently the primary agent or a command invokes a subagent, and you navigate to the child session, subsequent messages are sent to primary agent instead of the subagent. This is intentional, but i think it is confusing so it will likely be changed
You keep saying subagent. I am not using those anymore, as you stated that interactive conversations with subagents are not possible in #2352 . Everything that I am saying in this issue, is regarding agents, not subagents.
@ferrao but are you using subtask: true because that is a subagent, it was created so you could run things outside of primary context (ie: as a subagent)
@ferrao but are you using subtask: true because that is a subagent, it was created so you could run things outside of primary context (ie: as a subagent)
Sorry for any confusion
I am using:
"mode": "primary",
I would have to set mode to subagent for it to be a subagent, no?
I have tried both options and I hit different problems.
subtask=true, that session leaking thing happens. From your answers and latest comment, can I assume that this subtask option will override the agent configuration and make it work as a subagent, even if it is configured as a primary? If that is the case, can we update the docs, so that it becomes clear?
subtask=false, The researcher agent is triggered initially, but no separate session is created, so I can not interact with it. Somehow, then main agent know about the agent's response and picks up from there, and everything continues/happens on the main session, so I loose the agent specific capabilities.
If you can confirm that this command config option will make the agent run as subagent, no matter how it is configured, I'll be happy to submit a doc PR with this change.
Activity
github-actions commentedon Oct 16, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 16, 2025
@ferrao is this specifically with a subagent? Currently you can't talk to subagents which imo is a poor ux and we should fix
If so I will close and link the other issue that tracks talking to subagents
ferrao commentedon Oct 16, 2025
No, this is with a regular agent, I have tried it with a subagent first, but you told me I could not do it in another issue, so I tried it with an agent.
rekram1-node commentedon Oct 16, 2025
Ahh I think I follow then, when you trigger the command it sends it to a certain agent, but then it doesnt actually change your selected agent...
I see
ferrao commentedon Oct 19, 2025
Indeed... But it's even worse... Because If I change it manually, I can start to interact with the agent that work has been delegated to (RESEARCH), but each input that I provide, is also somehow fed back to the main agent (PLAN) and I end up with two sessions, one for each agent, with similar, but different state. A whole mess, that I can not get out of.
ferrao commentedon Oct 19, 2025
So, what I am saying is that I identify 2 problems:
rekram1-node commentedon Oct 19, 2025
@ferrao in regards to point 2 thats because you cant talk to a subagent, and I dont like that either I think we need to allow
ferrao commentedon Oct 19, 2025
Not sure what you mean, I am getting very confused with how I am supposed to use the agents functionallity.
My workflow is never about giving AI a task and waiting for it's conclusion on it's own.
I always like to interact with AI to get to my end result. But still, I want to take advantage of having dedicated agents with different skills and commands that load appropriate context and trigger those conversations, but I am not able to do any of it.
Am I trying to do something that is just completely off how this is supposed to work?
rekram1-node commentedon Oct 19, 2025
@ferrao You said:
What I interpreted this as:
"When I try to talk to a subagent the conversation leaks to main context"
What I was saying:
Currently the primary agent or a command invokes a subagent, and you navigate to the child session, subsequent messages are sent to primary agent instead of the subagent. This is intentional, but i think it is confusing so it will likely be changed
ferrao commentedon Oct 19, 2025
You keep saying subagent. I am not using those anymore, as you stated that interactive conversations with subagents are not possible in #2352 . Everything that I am saying in this issue, is regarding agents, not subagents.
rekram1-node commentedon Oct 19, 2025
@ferrao but are you using
subtask: truebecause that is a subagent, it was created so you could run things outside of primary context (ie: as a subagent)Sorry for any confusion
ferrao commentedon Oct 19, 2025
I am using:
I would have to set
modetosubagentfor it to be a subagent, no?rekram1-node commentedon Oct 19, 2025
Does your custom command have subtask in it?
ferrao commentedon Oct 19, 2025
I have tried both options and I hit different problems.
subtask=true, that session leaking thing happens. From your answers and latest comment, can I assume that thissubtaskoption will override the agent configuration and make it work as a subagent, even if it is configured as a primary? If that is the case, can we update the docs, so that it becomes clear?subtask=false, Theresearcheragent is triggered initially, but no separate session is created, so I can not interact with it. Somehow, then main agent know about the agent's response and picks up from there, and everything continues/happens on the main session, so I loose the agent specific capabilities.rekram1-node commentedon Oct 19, 2025
For subtask we do document this: https://opencode.ai/docs/commands/#subtask
But I suppose it needs to be more clear
ferrao commentedon Oct 20, 2025
If you can confirm that this command config option will make the agent run as subagent, no matter how it is configured, I'll be happy to submit a doc PR with this change.
rekram1-node commentedon Oct 20, 2025
@ferrao that is correct, sorry for the confusion
rekram1-node commentedon Oct 20, 2025
closing since this is now documented to remove confusion, I will publish updated docs soon