/hub:spawn — Launch Parallel Agents
Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.
Usage
Templates
When --template <name> is provided, use the dispatch prompt from ../agenthub/references/agent-templates.md instead of the default prompt below. Available templates:
When using a template, replace all {variables} with values from the session config. Assign each agent a different strategy appropriate to the template and task — diverse strategies maximize the value of parallel exploration.
What It Does
- Load session config from
.agenthub/sessions/{session-id}/config.yaml - For each agent 1..N:
- Write task assignment to
.agenthub/board/dispatch/ - Build agent prompt with task, constraints, and board write instructions
- Write task assignment to
- Launch ALL agents in a single message with multiple Agent tool calls:
- Update session state to
runningvia:
Critical Rules
- All agents in ONE message — spawn all Agent tool calls simultaneously for true parallelism
- isolation: "worktree" is mandatory — each agent needs its own filesystem
- Never modify session config after spawn — agents rely on stable configuration
- Each agent gets a unique board post — dispatch posts are numbered sequentially
After Spawn
Tell the user:
- {N} agents launched in parallel
- Each working in an isolated worktree
- Monitor with
/hub:hub-status - Evaluate when done with
/hub:eval


