Subagents cannot interact normally #1554

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

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

Originally assigned to: @thdxr on GitHub.

I created 5 subagents, and during actual use, they behave completely unpredictably. Here are several problems:

  • sometimes the agent doesn't do anything, just creates a plan, but the orchestrator thinks everything is already done and the entire workflow breaks
  • sometimes an agent, on the contrary, makes changes that nobody asked for, and the following points in the plan break (maybe it's my side problem, but I can't control permissions for different subsessions clearly)
  • often many subagents start up, and then it's impossible to make sense of these 10 subsessions, although actually only 2-3 subsessions are needed to complete the plan

There is no ability to see a tree of the sessions, their status (running, finished, waiting for the permissions). For now it's a hell. But it looks exciting and promising. Claude Code natively with the same configs works without these issues, but selecting subagent is always unpredictable. Most of the time it selects one agent and completes all points with it. Opencode has more granular control for selecting agents, and it's much more similar to "team".

Maybe one of the problems in this place in CLAUDE.md:

## Task Planning and Execution
You are just an orchestrator. **Do not edit any files directly**. Your responsibility is to delegate tasks to appropriate agents.
Agents can delegate tasks to others. You **should** follow these rules:

- Create comprehensive plans for complex tasks before implementation
- Break large tasks into smaller, manageable steps
- Use TodoWrite tool for task tracking
- Delegate tasks to appropriate agents. Agents can delegate tasks to others.
- **MANDATORY**: Task must be done by an team of agents. They MUST work as a team. Agents can communicate with each other.

I think ClaudeCode uses this for the main orchestrator but Opencode also uses it for every single subagent. So every subagent tried to spawn other subagents and sometimes works in "readonly" mode as requested in CLAUDE.md.

Originally created by @NaikSoftware on GitHub (Sep 1, 2025). Originally assigned to: @thdxr on GitHub. I created 5 subagents, and during actual use, they behave completely unpredictably. Here are several problems: - sometimes the agent doesn't do anything, just creates a plan, but the orchestrator thinks everything is already done and the entire workflow breaks - sometimes an agent, on the contrary, makes changes that nobody asked for, and the following points in the plan break (maybe it's my side problem, but I can't control permissions for different subsessions clearly) - often many subagents start up, and then it's impossible to make sense of these 10 subsessions, although actually only 2-3 subsessions are needed to complete the plan There is no ability to see a tree of the sessions, their status (running, finished, waiting for the permissions). For now it's a hell. But it looks exciting and promising. Claude Code natively with the same configs works without these issues, but selecting subagent is always unpredictable. Most of the time it selects one agent and completes all points with it. Opencode has more granular control for selecting agents, and it's much more similar to "team". Maybe one of the problems in this place in CLAUDE.md: ```markdown ## Task Planning and Execution You are just an orchestrator. **Do not edit any files directly**. Your responsibility is to delegate tasks to appropriate agents. Agents can delegate tasks to others. You **should** follow these rules: - Create comprehensive plans for complex tasks before implementation - Break large tasks into smaller, manageable steps - Use TodoWrite tool for task tracking - Delegate tasks to appropriate agents. Agents can delegate tasks to others. - **MANDATORY**: Task must be done by an team of agents. They MUST work as a team. Agents can communicate with each other. ``` I think ClaudeCode uses this for the main orchestrator but Opencode also uses it for every single subagent. So every subagent tried to spawn other subagents and sometimes works in "readonly" mode as requested in CLAUDE.md.
yindo closed this issue 2026-02-16 17:31:30 -05:00
Author
Owner

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

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

  • #2130: Similar issue with GPT-5 not triggering subagents consistently in feedback loops
  • #2052: Subagents getting stuck in tool usage loops, causing unpredictable behavior
  • #1047: Request for workflow automation with subagents, mentions need for better orchestration

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

@github-actions[bot] commented on GitHub (Sep 1, 2025): This issue might be a duplicate of existing issues. Please check: - #2130: Similar issue with GPT-5 not triggering subagents consistently in feedback loops - #2052: Subagents getting stuck in tool usage loops, causing unpredictable behavior - #1047: Request for workflow automation with subagents, mentions need for better orchestration Feel free to ignore if none of these address your specific case.
Author
Owner

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

hm interesting, yeah your claude.md is passed to every agent so that could definitely stir up an issue here

@rekram1-node commented on GitHub (Sep 1, 2025): hm interesting, yeah your claude.md is passed to every agent so that could definitely stir up an issue here
Author
Owner

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

Can we disable reading of Claude.md? I would like to create instructions especially for Opencode and in the same time don't break integration with CC

@NaikSoftware commented on GitHub (Sep 1, 2025): Can we disable reading of Claude.md? I would like to create instructions especially for Opencode and in the same time don't break integration with CC
Author
Owner

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

not an option to disable currently but if you create an AGENTS.md it will read that instead

@rekram1-node commented on GitHub (Sep 1, 2025): not an option to disable currently but if you create an AGENTS.md it will read that instead
Author
Owner

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

Thank you, now results much better

@NaikSoftware commented on GitHub (Sep 1, 2025): Thank you, now results much better
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1554