[Improvement] The ability to guide subagents on the right path #1568

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

Originally created by @NaikSoftware on GitHub (Sep 2, 2025).

Originally assigned to: @thdxr on GitHub.

Currently, if a subagent stops at a request for permission to make edits and you press Esc, or any other case where you need to pause a subagent, it completely stops and execution proceeds to the main agent.
That means it's impossible to guide the subagent on the right path.

It would be good if there was an ability to write to the subagent and have it continue working. And if it's necessary to completely interrupt it, then enter for example a command /finish, /back or something similar.

Originally created by @NaikSoftware on GitHub (Sep 2, 2025). Originally assigned to: @thdxr on GitHub. Currently, if a subagent stops at a request for permission to make edits and you press Esc, or any other case where you need to pause a subagent, it completely stops and execution proceeds to the main agent. That means it's impossible to guide the subagent on the right path. It would be good if there was an ability to write to the subagent and have it continue working. And if it's necessary to completely interrupt it, then enter for example a command /finish, /back or something similar.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 2, 2025):

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

Feel free to ignore if none of these address your specific case of wanting to guide subagents that stop at permission requests.

@github-actions[bot] commented on GitHub (Sep 2, 2025): This issue might be a duplicate of existing issues. Please check: - #2324: [Cancelling causes context loss](https://github.com/sst/opencode/issues/2324) - Describes similar interruption behavior where cancelling operations causes loss of context and the ability to continue guidance - #1734: [Esc not working on agent hangs](https://github.com/sst/opencode/issues/1734) - Reports that ESC interruption doesn't work properly when agents hang, similar to your permission request scenario - #2315: [Custom commands with agents should(?) run in isolated sessions](https://github.com/sst/opencode/issues/2315) - Discusses agent execution context and control issues - #2052: [Subagents often getting stuck into tool usage loops](https://github.com/sst/opencode/issues/2052) - Related to subagent control and getting stuck in operations Feel free to ignore if none of these address your specific case of wanting to guide subagents that stop at permission requests.
Author
Owner

@rekram1-node commented on GitHub (Sep 2, 2025):

makes sense

@rekram1-node commented on GitHub (Sep 2, 2025): makes sense
Author
Owner

@NaikSoftware commented on GitHub (Dec 10, 2025):

Any progress on it. Project migrated to new TUI, implemented web client and other stuff. But basic things ignored. Subagents absolutely useless without fixing this issue. When user wants to change something (direct subagent in the right path) all flow just stops. And you just open ClaudeCode and it works as expected. Without web client and super feature - TUI, of course ))

@NaikSoftware commented on GitHub (Dec 10, 2025): Any progress on it. Project migrated to new TUI, implemented web client and other stuff. But basic things ignored. Subagents absolutely useless without fixing this issue. When user wants to change something (direct subagent in the right path) all flow just stops. And you just open ClaudeCode and it works as expected. Without web client and super feature - TUI, of course ))
Author
Owner

@rekram1-node commented on GitHub (Dec 10, 2025):

some improvements to subagents should ship this week

@rekram1-node commented on GitHub (Dec 10, 2025): some improvements to subagents should ship this week
Author
Owner

@mikekelly commented on GitHub (Jan 5, 2026):

@rekram1-node any luck with this? flexible subagent handling (introspection, context injection, interruption, resuming) would be a killer feature for opencode

@mikekelly commented on GitHub (Jan 5, 2026): @rekram1-node any luck with this? flexible subagent handling (introspection, context injection, interruption, resuming) would be a killer feature for opencode
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1568