| name | opencode-parallel-agents |
|---|---|
| description | Run independent development tasks concurrently with the opencode-subagents MCP server, using isolated Git worktrees, bounded parallelism, explicit cancellation and verified output artifacts. |
| license | Apache-2.0 |
| compatibility | OpenCode with Node.js 22+, Git and the opencode-subagents MCP server. |
Use this skill when a task has independent parts that can be implemented or checked concurrently. Use the opencode-subagents MCP tools for child runs.
- Check the current Git branch and working tree. Each child receives a new worktree and branch from the current committed HEAD; uncommitted edits are not copied.
- Give each child a self-contained task: exact scope, expected files, acceptance command and output artifact.
- Keep at most four active runs. The model is selected by the server, never by a tool request.
- Use separate directories for non-Git tasks. The server prevents two active writers from sharing one such directory.
- Keep approvals, publishing and secrets with the coordinating agent unless the user explicitly delegated them.
- Call
spawnfor each independent task withprompt,directoryand a boundedtimeout_seconds. - Retain every returned run ID and workspace path.
- Call
waitwith that ID and at most 60 seconds. A timeout fromwaitmeans the task may still be running. - Call
resultafter completion. Inspect status, exit code, stdout, stderr and the requested output file. - Inspect each worktree's diff before integrating its commit. Run the relevant combined check after integration.
If the provider reports a terminal quota or API error, collect the failed run and stop dependent work. Do not treat empty output, a spawned process or a queued task as completion, and do not retry an ambiguous run blindly.
Use cancel with the exact ID for obsolete work. Wait for its terminal status before reusing a non-Git directory. Keep worktrees while their artifacts are needed; remove branches and directories only after checking integration and active references.
Run node examples/parallel-demo.mjs from the repository root. It submits two tasks before waiting: one writes a text artifact, the other a JSON artifact in another Git worktree. The command reports both run IDs, workspaces and artifact results. It requires a working OpenCode provider account and consumes two small model calls.