OpenCode Ensemble
Use OpenCode Ensemble as a coordination system, not a shortcut for avoiding judgment. Parallel agents work best when the lead owns decomposition, sequencing, review, merge, and verification.
Core Principle
Spawn teammates only for independent, verifiable work. A good Ensemble team has narrow task ownership, clear dependencies, and a lead that integrates results deliberately.
Use Ensemble When
- Work can be split into independent research, implementation, test, or review slices.
- A read-only scout can map unfamiliar code before edits begin.
- Multiple files or subsystems can be changed without overlapping ownership.
- A risky change benefits from
plan_approval: true before edits.
- A final reviewer can inspect merged changes without creating another branch.
Do Not Use Ensemble When
- The task is small enough for one agent to finish quickly.
- The work is tightly coupled and every teammate would need the same files.
- The lead cannot describe each teammate's output and success criteria.
- The user needs one coherent design decision rather than parallel exploration.
- You are tempted to spawn agents because the task feels hard but not divisible.
Lead Workflow
- Decide whether parallelism is justified.
- Create a team with
team_create.
- Add tasks with
team_tasks_add; use depends_on for sequencing.
- Spawn teammates one at a time with
team_spawn.
- Use
worktree: false for read-only explore teammates.
- Use
plan_approval: true for risky implementation work.
- Wait for teammate messages instead of polling status repeatedly.
- Read full results with
team_results when messages are truncated or consequential.
- Shut down completed teammates with
team_shutdown.
- Merge branches with
team_merge; inspect the diff before trusting it.
- Run project verification before
team_cleanup and before claiming done.
Role Defaults
| Role |
Agent |
Worktree |
Model guidance |
Use for |
| Scout |
explore |
false |
openai/gpt-5.3-codex-spark |
Codebase mapping, risk discovery, file ownership plan |
| Builder |
build |
true |
anthropic/claude-opus-4-7 |
Narrow implementation slice |
| QA |
build |
true |
strong balanced model |
Tests, fixtures, regression coverage |
| Reviewer |
explore |
false |
openai/gpt-5.3-codex-spark |
Diff review, risk review, missed-test review |
Start with two or three teammates. Add more only when the work has more independent slices than active teammates.
Load References As Needed
- Need a team shape? Read
references/coordination-patterns.md.
- Need prompts? Read
references/prompt-recipes.md.
- Need a pre-spawn, merge, cleanup, or verification gate? Read
references/lead-checklists.md.
- Something feels off or too chatty? Read
references/anti-patterns.md.
- Creating or improving this skill? Read
references/eval-scenarios.md.
Hard Rules
- Do not invent task IDs.
team_tasks_add generates IDs; use the IDs returned by earlier calls when setting depends_on or claim_task.
- Keep teammate prompts short. The plugin already injects team role, allowed tools, worktree context, and the required task-result format.
- Do not give teammates vague prompts like "fix the bug" or "work on tests".
- Do not ask teammates to use lead-only tools such as
team_spawn, team_shutdown, team_merge, team_cleanup, or team_view.
- Do not tell teammates to report only in plain text. They must use
team_message.
- Do not merge a teammate branch without reading its result and inspecting the diff.
- Do not call the work complete until the repository's verification commands pass or you have clearly reported the blocker.
Minimal Example
team_create({ name: "checkout-idempotency" })
team_tasks_add({
tasks: [
{ content: "Map checkout webhook flow and risky files", priority: "high" },
{ content: "Implement duplicate-webhook idempotency guard", priority: "high" },
],
})
// Record returned IDs, for example: task_abc123 for scout and task_def456 for builder.
team_tasks_add({
tasks: [
{ content: "Add duplicate-webhook regression tests", priority: "high", depends_on: ["task_def456"] },
],
})
// Record returned QA task ID, for example: task_ghi789.
team_tasks_add({
tasks: [
{ content: "Review merged diff for correctness and missed tests", priority: "medium", depends_on: ["task_def456", "task_ghi789"] },
],
})
team_spawn({
name: "scout",
agent: "explore",
worktree: false,
model: "openai/gpt-5.3-codex-spark",
claim_task: "task_abc123",
prompt: "Trace the checkout webhook flow. Report files, data model, existing tests, risks, and a smallest-safe-change plan. Do not edit files.",
})
team_spawn({
name: "api-dev",
agent: "build",
model: "anthropic/claude-opus-4-7",
plan_approval: true,
claim_task: "task_def456",
prompt: "Use scout's findings to implement only the idempotency guard. Commit your work and send a task-result message with files changed and tests run.",
})
Source: hueyexe/opencode-ensemble — distributed by TomeVault.
1---2name: opencode-ensemble3description: Use when coordinating multiple coding agents, delegating independent software work, managing OpenCode Ensemble teams, choosing teammate roles or models, reviewing teammate output, or deciding whether parallel execution is appropriate.4license: MIT5---67# OpenCode Ensemble89Use OpenCode Ensemble as a coordination system, not a shortcut for avoiding judgment. Parallel agents work best when the lead owns decomposition, sequencing, review, merge, and verification.1011## Core Principle1213Spawn teammates only for independent, verifiable work. A good Ensemble team has narrow task ownership, clear dependencies, and a lead that integrates results deliberately.1415## Use Ensemble When1617- Work can be split into independent research, implementation, test, or review slices.18- A read-only scout can map unfamiliar code before edits begin.19- Multiple files or subsystems can be changed without overlapping ownership.20- A risky change benefits from `plan_approval: true` before edits.21- A final reviewer can inspect merged changes without creating another branch.2223## Do Not Use Ensemble When2425- The task is small enough for one agent to finish quickly.26- The work is tightly coupled and every teammate would need the same files.27- The lead cannot describe each teammate's output and success criteria.28- The user needs one coherent design decision rather than parallel exploration.29- You are tempted to spawn agents because the task feels hard but not divisible.3031## Lead Workflow32331. Decide whether parallelism is justified.342. Create a team with `team_create`.353. Add tasks with `team_tasks_add`; use `depends_on` for sequencing.364. Spawn teammates one at a time with `team_spawn`.375. Use `worktree: false` for read-only `explore` teammates.386. Use `plan_approval: true` for risky implementation work.397. Wait for teammate messages instead of polling status repeatedly.408. Read full results with `team_results` when messages are truncated or consequential.419. Shut down completed teammates with `team_shutdown`.4210. Merge branches with `team_merge`; inspect the diff before trusting it.4311. Run project verification before `team_cleanup` and before claiming done.4445## Role Defaults4647| Role | Agent | Worktree | Model guidance | Use for |48|---|---|---:|---|---|49| Scout | `explore` | `false` | `openai/gpt-5.3-codex-spark` | Codebase mapping, risk discovery, file ownership plan |50| Builder | `build` | `true` | `anthropic/claude-opus-4-7` | Narrow implementation slice |51| QA | `build` | `true` | strong balanced model | Tests, fixtures, regression coverage |52| Reviewer | `explore` | `false` | `openai/gpt-5.3-codex-spark` | Diff review, risk review, missed-test review |5354Start with two or three teammates. Add more only when the work has more independent slices than active teammates.5556## Load References As Needed5758- Need a team shape? Read `references/coordination-patterns.md`.59- Need prompts? Read `references/prompt-recipes.md`.60- Need a pre-spawn, merge, cleanup, or verification gate? Read `references/lead-checklists.md`.61- Something feels off or too chatty? Read `references/anti-patterns.md`.62- Creating or improving this skill? Read `references/eval-scenarios.md`.6364## Hard Rules6566- Do not invent task IDs. `team_tasks_add` generates IDs; use the IDs returned by earlier calls when setting `depends_on` or `claim_task`.67- Keep teammate prompts short. The plugin already injects team role, allowed tools, worktree context, and the required task-result format.68- Do not give teammates vague prompts like "fix the bug" or "work on tests".69- Do not ask teammates to use lead-only tools such as `team_spawn`, `team_shutdown`, `team_merge`, `team_cleanup`, or `team_view`.70- Do not tell teammates to report only in plain text. They must use `team_message`.71- Do not merge a teammate branch without reading its result and inspecting the diff.72- Do not call the work complete until the repository's verification commands pass or you have clearly reported the blocker.7374## Minimal Example7576```ts77team_create({ name: "checkout-idempotency" })7879team_tasks_add({80 tasks: [81 { content: "Map checkout webhook flow and risky files", priority: "high" },82 { content: "Implement duplicate-webhook idempotency guard", priority: "high" },83 ],84})85// Record returned IDs, for example: task_abc123 for scout and task_def456 for builder.8687team_tasks_add({88 tasks: [89 { content: "Add duplicate-webhook regression tests", priority: "high", depends_on: ["task_def456"] },90 ],91})92// Record returned QA task ID, for example: task_ghi789.9394team_tasks_add({95 tasks: [96 { content: "Review merged diff for correctness and missed tests", priority: "medium", depends_on: ["task_def456", "task_ghi789"] },97 ],98})99100team_spawn({101 name: "scout",102 agent: "explore",103 worktree: false,104 model: "openai/gpt-5.3-codex-spark",105 claim_task: "task_abc123",106 prompt: "Trace the checkout webhook flow. Report files, data model, existing tests, risks, and a smallest-safe-change plan. Do not edit files.",107})108109team_spawn({110 name: "api-dev",111 agent: "build",112 model: "anthropic/claude-opus-4-7",113 plan_approval: true,114 claim_task: "task_def456",115 prompt: "Use scout's findings to implement only the idempotency guard. Commit your work and send a task-result message with files changed and tests run.",116})117```118119---120> Source: [hueyexe/opencode-ensemble](https://github.com/hueyexe/opencode-ensemble) — distributed by [TomeVault](https://tomevault.io).121<!-- tomevault:4.0:skill_md:2026-06-19 -->