feat(agent): add orchestrate subagent for task decomposition#24450
Open
kuro-toji wants to merge 1 commit intoanomalyco:2.0from
Open
feat(agent): add orchestrate subagent for task decomposition#24450kuro-toji wants to merge 1 commit intoanomalyco:2.0from
kuro-toji wants to merge 1 commit intoanomalyco:2.0from
Conversation
Add a new 'orchestrate' subagent type that specializes in breaking down complex multi-step tasks into smaller, manageable subtasks that can be executed in parallel by specialized agents. Key changes: - packages/opencode/src/agent/prompt/orchestrate.txt: New prompt defining the orchestrator's role and workflow - packages/opencode/src/agent/agent.ts: Register the new orchestrate agent with task permissions - packages/opencode/src/tool/task.txt: Document orchestrate agent usage The orchestrate agent: 1. Analyzes complex tasks 2. Breaks them into 2-5 focused subtasks 3. Executes subtasks in parallel via Task tool calls 4. Synthesizes results into cohesive solutions This enables efficient handling of large tasks by parallelizing work across multiple specialized agents (explore, general, build, plan).
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on my search results, I found one potentially related PR: Related PR:
The other results (PRs #7156, #17210, #18528) are about general subagent features but less directly related to the task decomposition and parallel execution pattern introduced in PR #24450. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
Thanks for the context! I see there's related work in PR #20152 ( My orchestrate agent approach is different - it's a prompt-based subagent that does task decomposition, rather than a new tool. Should I:
Let me know which direction makes sense! |
Bojun-Vvibe
added a commit
to Bojun-Vvibe/oss-contributions
that referenced
this pull request
Apr 26, 2026
…ate subagent, litellm chatgpt-responses SSE non-stream output synthesis - anomalyco/opencode#24459 merge-after-nits: 204-fast async command endpoint, drive-by import migration to split out - anomalyco/opencode#24450 needs-discussion: orchestrate subagent semantics overlap with direct Task fanout - BerriAI/litellm#26549 request-changes: 80-line transformation.py fix bundled with 31 _experimental/out HTML files + next bump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #24447 (partially - addresses need for better task decomposition)
Type of change
What does this PR do?
Add a new
orchestratesubagent that breaks down complex multi-step tasks into parallel subtasks executed by specialized agents.Problem: Large tasks require manual decomposition and coordination of multiple Task calls.
Solution: Automate task breakdown with an orchestrator that:
Files Changed
packages/opencode/src/agent/prompt/orchestrate.txtpackages/opencode/src/agent/agent.tspackages/opencode/src/tool/task.txtHow did you verify your code works?
Checklist