GPT-5 not able to trigger subagents consistently #1411

Closed
opened 2026-02-16 17:30:51 -05:00 by yindo · 8 comments
Owner

Originally created by @static-var on GitHub (Aug 21, 2025).

Originally assigned to: @thdxr on GitHub.

I’ve been experimenting with using GPT-5 as my primary agent for the past few days, and I’ve noticed that it can successfully trigger the sub-agent call when instructed to do so immediately.

However, when I asked it to collaborate with a sub-agent in a feedback loop (where GPT-5 provides feedback and instructions, and the sub-agent (sonnet/opus) implements the feedback), it fails to call them properly in subsequent iterations.

It ends up responding like this.

... (copilot summarizing things for my context)
Action for @engineer: Please revise the plan accordingly

• Update constants and mapping as per points 1 and 3.
• Clarify TerminalIO boundary and ensure handle actuals do not live in platform modules, or switch to API-constructed handles with TerminalIO only writing sequences.
• Adjust FocusEvent to minimal shape unless hierarchy requires rawBytes.
• Fix debug hook signature to carry structured fields.
• Trim constants to only those used now.
• Expand doc diffs with explicit mapping table and gating policy.

Once you return with the corrected plan, I’ll re-review. If it passes, we greenlight implementation of P0/P1 and then move to the next task (P2 cursor style).

I am not sure if its a GPT-5 problem or if it has anything to do with Opencode at all, but just wanted to get some clarity if I am doing something wrong or is it a known problem.

Note: I am using GPT-5 from GitHub Copilot.

Originally created by @static-var on GitHub (Aug 21, 2025). Originally assigned to: @thdxr on GitHub. I’ve been experimenting with using GPT-5 as my primary agent for the past few days, and I’ve noticed that it can successfully trigger the sub-agent call when instructed to do so immediately. However, when I asked it to collaborate with a sub-agent in a feedback loop (where GPT-5 provides feedback and instructions, and the sub-agent (sonnet/opus) implements the feedback), it fails to call them properly in subsequent iterations. It ends up responding like this. ``` ... (copilot summarizing things for my context) Action for @engineer: Please revise the plan accordingly • Update constants and mapping as per points 1 and 3. • Clarify TerminalIO boundary and ensure handle actuals do not live in platform modules, or switch to API-constructed handles with TerminalIO only writing sequences. • Adjust FocusEvent to minimal shape unless hierarchy requires rawBytes. • Fix debug hook signature to carry structured fields. • Trim constants to only those used now. • Expand doc diffs with explicit mapping table and gating policy. Once you return with the corrected plan, I’ll re-review. If it passes, we greenlight implementation of P0/P1 and then move to the next task (P2 cursor style). ``` I am not sure if its a GPT-5 problem or if it has anything to do with Opencode at all, but just wanted to get some clarity if I am doing something wrong or is it a known problem. Note: I am using GPT-5 from GitHub Copilot.
yindo closed this issue 2026-02-16 17:30:51 -05:00
Author
Owner

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

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

  • #2052: Subagents often getting stuck into tool usage loops - similar issue where subagents fail to work properly in subsequent calls
  • #1578: [Feature Request] Validation of sub-agent unsuccessful end - discusses issues with sub-agent recognition and unsuccessful termination
  • #1047: automatize [ review -> fix -> review -> n -> finish] workflow stuff with subagents - mentions automating feedback loops with subagents similar to your use case

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

@github-actions[bot] commented on GitHub (Aug 21, 2025): This issue might be a duplicate of existing issues. Please check: - #2052: Subagents often getting stuck into tool usage loops - similar issue where subagents fail to work properly in subsequent calls - #1578: [Feature Request] Validation of sub-agent unsuccessful end - discusses issues with sub-agent recognition and unsuccessful termination - #1047: automatize [ review -> fix -> review -> n -> finish] workflow stuff with subagents - mentions automating feedback loops with subagents similar to your use case Feel free to ignore if none of these address your specific case.
Author
Owner

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

this is basically a prompting issue, can you share some of your subagent names / descriptions?

We can try to solve on our end but I think you will have best results if you prompt more specifically for your use case. If you drop your agents here I can help w/ prompting potentially

@rekram1-node commented on GitHub (Aug 21, 2025): this is basically a prompting issue, can you share some of your subagent names / descriptions? We can try to solve on our end but I think you will have best results if you prompt more specifically for your use case. If you drop your agents here I can help w/ prompting potentially
Author
Owner

@static-var commented on GitHub (Aug 21, 2025):

@rekram1-node the main agent is called chef, the subagent name is engineer I usually address it as @engineer. I have tried it with another agent named @kotlin-engineer as well.

I was getting issue with prompts like this.

- Check the current state of task-<ID> from tasks.md
- Identify gaps in implementation and instruct @engineer to complete the task.

Once done, review the changes, if not satisfied instruct @engineer again with next set of instructions - repeat this process until the implementation is satisfactory.
Follow the rule.md handbook for best practices, adhere by it.
@static-var commented on GitHub (Aug 21, 2025): @rekram1-node the main agent is called `chef`, the subagent name is `engineer` I usually address it as `@engineer`. I have tried it with another agent named `@kotlin-engineer` as well. I was getting issue with prompts like this. ``` - Check the current state of task-<ID> from tasks.md - Identify gaps in implementation and instruct @engineer to complete the task. Once done, review the changes, if not satisfied instruct @engineer again with next set of instructions - repeat this process until the implementation is satisfactory. Follow the rule.md handbook for best practices, adhere by it. ```
Author
Owner

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

interesting, I will try to play around w/ it more haven't used the subagents heavily yet

@rekram1-node commented on GitHub (Aug 21, 2025): interesting, I will try to play around w/ it more haven't used the subagents heavily yet
Author
Owner

@static-var commented on GitHub (Aug 21, 2025):

Awesome, let me know if you need any more info or context around this.

@static-var commented on GitHub (Aug 21, 2025): Awesome, let me know if you need any more info or context around this.
Author
Owner

@Cyb3rDudu commented on GitHub (Aug 31, 2025):

I have similar issues with my orchestrator agent running with gemini 2.5 pro (openrouter)
sometimes it is not able to spawn my coder agents (antropic/claude or opencode/grok)
what kind of info can I provide to debug this problem

@Cyb3rDudu commented on GitHub (Aug 31, 2025): I have similar issues with my orchestrator agent running with gemini 2.5 pro (openrouter) sometimes it is not able to spawn my coder agents (antropic/claude or opencode/grok) what kind of info can I provide to debug this problem
Author
Owner

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

well what do you mean by not able to spawn subagents?

for starters Id say gemini model’s arent the best at tool calling so they may need special prompting to behave better

@rekram1-node commented on GitHub (Aug 31, 2025): well what do you mean by not able to spawn subagents? for starters Id say gemini model’s arent the best at tool calling so they may need special prompting to behave better
Author
Owner

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

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1411