From hydra
Starts multiple AI agents in parallel across git worktrees from pipe-separated worktree:prompt args. Validates worktrees, creates missing ones, displays status table.
How this command is triggered — by the user, by Claude, or both
Slash command
/hydra:parallelThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Worktree Parallel You are executing the `/hydra:parallel` command. Start multiple agents simultaneously in different worktrees. ## Arguments `$ARGUMENTS` is parsed as a pipe-separated list of tasks: Example: ## Process ### 1. Parse Tasks Split `$ARGUMENTS` at `|` and parse each part: ### 2. Validate All Worktrees For each task: If a worktree is missing, offer to create it: If yes, create missing worktrees: ### 3. Start All Agents in Parallel **IMPORTANT:** Use a single response with multiple Task tool calls! For each task, call Task tool with: All Task calls mu...
You are executing the /hydra:parallel command. Start multiple agents simultaneously in different worktrees.
$ARGUMENTS is parsed as a pipe-separated list of tasks:
worktree1:prompt1 | worktree2:prompt2 | worktree3:prompt3
Example:
/hydra:parallel feature-a:Implement login | feature-b:Implement logout | feature-c:Write tests
Split $ARGUMENTS at | and parse each part:
# Example parsing
echo "$ARGUMENTS" | tr '|' '\n' | while read task; do
WORKTREE=$(echo "$task" | cut -d':' -f1 | xargs)
PROMPT=$(echo "$task" | cut -d':' -f2- | xargs)
echo "Worktree: $WORKTREE, Prompt: $PROMPT"
done
For each task:
git worktree list | grep -qE "$WORKTREE|hydra/$WORKTREE"
If a worktree is missing, offer to create it:
The following worktrees do not exist:
- feature-x
- feature-y
Should I create them? (Branches will be forked from main)
If yes, create missing worktrees:
# Determine paths (always relative to repo root, not CWD)
REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$REPO_ROOT")
WORKTREES_DIR="$(dirname "$REPO_ROOT")/${REPO_NAME}-worktrees"
for WT in feature-x feature-y; do
git worktree add -b "hydra/$WT" "$WORKTREES_DIR/$WT"
done
IMPORTANT: Use a single response with multiple Task tool calls!
For each task, call Task tool with:
subagent_type: general-purpose
run_in_background: true
prompt: [like in /hydra:spawn]
All Task calls must be in ONE response for true parallelism.
After starting all agents:
Parallel agents started:
Worktree | Agent ID | Task
--------------|-----------------|---------------------------
feature-a | agent-abc123 | Implement login
feature-b | agent-def456 | Implement logout
feature-c | agent-ghi789 | Write tests
All agents running in background.
Next steps:
- /hydra:status # Progress of all worktrees
- TaskOutput agent-abc123 # Result of one agent
- /hydra:merge feature-a # When done: merge individually
If JSON preferred:
[
{"worktree": "feature-a", "prompt": "Implement login"},
{"worktree": "feature-b", "prompt": "Implement logout"}
]
If line breaks:
feature-a: Implement login
feature-b: Implement logout
feature-c: Write tests
Detect the format automatically and parse accordingly.
npx claudepluginhub marcel-bich/marcel-bich-claude-marketplace --plugin hydra/sc-parallel-worktree-teamDecomposes specified work into parallel streams, creates isolated git worktrees per stream, symlinks dependencies, and spawns agent teams in tmux for simultaneous execution.
/parallelProvides guide to set up parallel Claude Code sessions using git worktrees, covering native claude -w support, manual setup, subagent isolation, usage patterns, and cleanup.
/worktreeManages git worktrees for parallel agent isolation: spin up isolated worktrees on new branches, merge them back, or clean up. Supports spin, merge, clean modes.
/parallelDecomposes compound tasks into independent work packages and delegates each to a separate Claude process for parallel execution with full plugin capabilities.
/parallelOrchestrates parallel execution of 2+ independent tasks by analyzing dependencies, grouping them, and dispatching subagents for faster completion.