Switching to a child session doesn't send subsequent messages to that session but to the parent one #1581

Open
opened 2026-02-16 17:31:38 -05:00 by yindo · 6 comments
Owner

Originally created by @anhhct on GitHub (Sep 3, 2025).

Originally assigned to: @thdxr on GitHub.

Pardon me if this is a stupid question. From the docs, agent can spin up a child session when mentioned using the @ sign, and that child session can be switched into using Ctrl + right arrow. That works and it displays the child sessions. Problem is if I type in a new message, it automatically switches back to the parent session and continue from there. How do I talk to the child agent/session then?

Originally created by @anhhct on GitHub (Sep 3, 2025). Originally assigned to: @thdxr on GitHub. Pardon me if this is a stupid question. From the docs, agent can spin up a child session when mentioned using the @ sign, and that child session can be switched into using Ctrl + right arrow. That works and it displays the child sessions. Problem is if I type in a new message, it automatically switches back to the parent session and continue from there. How do I talk to the child agent/session then?
Author
Owner

@NaikSoftware commented on GitHub (Sep 3, 2025):

Yes, it's not implemented for now, similar issue: https://github.com/sst/opencode/issues/2378

Subagents only able to get some context, do some work and return results. Without any way to interact with them

@NaikSoftware commented on GitHub (Sep 3, 2025): Yes, it's not implemented for now, similar issue: https://github.com/sst/opencode/issues/2378 Subagents only able to get some context, do some work and return results. Without any way to interact with them
Author
Owner

@hashangit commented on GitHub (Sep 26, 2025):

but you can @ tag the sub agent for each follow up prompt and it continues context I think (at least it looked like it does. I haven't checked the code)

@hashangit commented on GitHub (Sep 26, 2025): but you can @ tag the sub agent for each follow up prompt and it continues context I think (at least it looked like it does. I haven't checked the code)
Author
Owner

@NaikSoftware commented on GitHub (Sep 26, 2025):

but you can @ tag the sub agent for each follow up prompt and it continues context I think (at least it looked like it does. I haven't checked the code)

It adds follow up message to the previous and start subagent again. Looks like it continues, but actually starting from the scratch.

@NaikSoftware commented on GitHub (Sep 26, 2025): > but you can @ tag the sub agent for each follow up prompt and it continues context I think (at least it looked like it does. I haven't checked the code) It adds follow up message to the previous and start subagent again. Looks like it continues, but actually starting from the scratch.
Author
Owner

@hashangit commented on GitHub (Sep 26, 2025):

It adds follow up message to the previous and start subagent again. Looks like it continues, but actually starting from the scratch.

Oh. Didn't check the code myself. its works good enough for my usage (except for I can't see child sessions in MacOs because of keybindings)

If the chat history of the child session is passed on from the previous child session along with the new prompt, would it matter if its a new chat?

@hashangit commented on GitHub (Sep 26, 2025): > It adds follow up message to the previous and start subagent again. Looks like it continues, but actually starting from the scratch. Oh. Didn't check the code myself. its works good enough for my usage (except for I can't see child sessions in MacOs because of keybindings) If the chat history of the child session is passed on from the previous child session along with the new prompt, would it matter if its a new chat?
Author
Owner

@NaikSoftware commented on GitHub (Sep 26, 2025):

@hashangit new chat with history from previous means waste of time and tokens. We already have chat and should be able to refine task, add additional info, direct to the right direction.

P.S. you can change keybinding for navigation between sessions. I changed to Shift+Arrow Left/Right

P.P.S. navigating to the child session sometimes very helpful. In the child session you can see all results of the task. In the main session you see only summarisation of the results. Sometimes important details are missing. The same issue with Claude Code. You can try to press Ctrl + O and see difference between results in the child and parent sessions

@NaikSoftware commented on GitHub (Sep 26, 2025): @hashangit new chat with history from previous means waste of time and tokens. We already have chat and should be able to refine task, add additional info, direct to the right direction. P.S. you can change keybinding for navigation between sessions. I changed to Shift+Arrow Left/Right P.P.S. navigating to the child session sometimes very helpful. In the child session you can see all results of the task. In the main session you see only summarisation of the results. Sometimes important details are missing. The same issue with Claude Code. You can try to press Ctrl + O and see difference between results in the child and parent sessions
Author
Owner

@taqtiqa-mark commented on GitHub (Nov 18, 2025):

but you can @ tag the sub agent for each follow up prompt and it continues context I think (at least it looked like it does. I haven't checked the code)

It adds follow up message to the previous and start subagent again. Looks like it continues, but actually starting from the scratch.

This is related to the Q of whether OC should follow the A2A protocol for these interactions, or if the Agent-2-Sub-Agent is sufficiently distinct that A2A doesn't help.
See #3023

@taqtiqa-mark commented on GitHub (Nov 18, 2025): > > but you can @ tag the sub agent for each follow up prompt and it continues context I think (at least it looked like it does. I haven't checked the code) > > It adds follow up message to the previous and start subagent again. Looks like it continues, but actually starting from the scratch. This is related to the Q of whether OC should follow the A2A protocol for these interactions, or if the Agent-2-Sub-Agent is sufficiently distinct that A2A doesn't help. See #3023
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1581