anomalyco / anomalyco/opencode

[FEATURE]: add task-parallel tool to fan out independent subtasks concurrently

Open
#47,105 0 comments 1 reaction 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Sep 3, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Long-running agent tasks are slow in wall-clock time because independent subtasks run sequentially. The task tool already supports background=true for async subagents, and the BackgroundJob registry forks each job into its own scope, so parallel execution is already possible — but the model has to orchestrate it manually by issuing multiple task calls with background=true in one message, and then collect each background notification. That's error-prone: the model often forgets to wait, or polls, or duplicates work.

What I'd like to see: a task-parallel tool that takes a list of 2-5 independent subtasks (each with its own description, prompt, and subagent type), launches them all concurrently, waits for every one to finish, and returns a single combined summary. Each subtask runs in its own subagent session (reusing the existing deriveSubagentSessionPermission + sessions.create + ops.prompt machinery from the task tool), so the wall-clock time is roughly the longest subtask instead of the sum.

Benefits:

  • Turns a "run N independent things" task from N sequential subagent runs into one parallel fan-out with a single result.
  • Reuses the existing subagent/permission/background infrastructure instead of inventing new execution logic.
  • Fails gracefully per-subtask: a failing subtask is reported as error in the summary, the others still complete.

I have a working implementation with unit tests in PR #46990 (opened separately).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.