Skip to content

feat(tool): add experimental team tool for parallel subagents#20152

Open
AndresCdo wants to merge 1 commit intoanomalyco:devfrom
AndresCdo:feat/ephemeral-team-tool-19999
Open

feat(tool): add experimental team tool for parallel subagents#20152
AndresCdo wants to merge 1 commit intoanomalyco:devfrom
AndresCdo:feat/ephemeral-team-tool-19999

Conversation

@AndresCdo
Copy link
Copy Markdown

Issue for this PR

Closes #19999

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Introduces an experimental team tool for ephemeral parallel sub-agent orchestration.

MVP scope in this PR:

  • Adds new team tool (packages/opencode/src/tool/team.ts) and usage guidance (team.txt).
  • Supports executing multiple sub-agent tasks in parallel with bounded concurrency.
  • Uses collect-all behavior: child failures do not cancel sibling tasks.
  • Preserves child task_id values in aggregated output (prefers structured metadata, falls back to output parsing).
  • Implements per-subagent permission preflight while preserving collect-all semantics when one subagent is denied.
  • Adds config gate experimental.team_tool and registers tool only when enabled.
  • Adds tests for:
    • tool execution + aggregation,
    • collect-all on child failure,
    • collect-all when one subagent permission is denied,
    • registry gating behind experimental.team_tool.

How did you verify your code works?

From packages/opencode:

  • bun test test/tool/team.test.ts
  • bun test test/tool/registry.test.ts
  • bun typecheck

Additionally, push hook ran workspace typecheck successfully (bun turbo typecheck).

Screenshots / recordings

N/A (tool/runtime feature).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Ephemeral Sub-Agent Teams (parallel multi-agent orchestration)

1 participant