Automatically detect and execute parallel development tasks
I automatically orchestrate parallel Claude Code sessions when tasks can be executed concurrently.
On every session start, I check for an active plan:
# Check for existing plan
if [[ -f ".claude/parallel-plan.json" ]]; then
status=$(jq -r '.status' .claude/parallel-plan.json)
if [[ "$status" == "in_progress" || "$status" == "planning" ]]; then
# Report to user about existing plan
.claude/skills/parallel-executor/plan.sh status
fi
fi
When an active plan is detected, I:
/cpt:continue to spawn agents for pending tasksThis enables cross-session and cross-machine continuity - pull the repo on any machine and Claude knows exactly where the project left off.
Only spawn agents when there are truly independent tasks. Single tasks or tightly coupled work stay in the current session. Spawning is not the default - it's an optimization for genuinely parallel work.
[P] or (P) parallel markersTasks are INDEPENDENT (can spawn) if:
Tasks are COUPLED (stay in session) if:
I examine the work to identify:
Important: I always ask for confirmation before spawning agents.
Task A [P] โโโ
Task B [P] โโโผโโ> Task E [depends: A,B,C]
Task C [P] โโโ
Task D [P] โโโโ> Task F [depends: D]
For parallel tasks, I use the spawn script:
.claude/skills/parallel-executor/spawn.sh "task1" "task2" "task3"
For sequential tasks, I queue them after dependencies complete.
I provide real-time status commands:
# Live logs
tail -f ../logs/*.log
# Process status
ps aux | grep "claude -p"
# Completion check
.claude/skills/parallel-executor/status.sh
When all parallel tasks complete:
Plans are stored in git for cross-session/cross-machine continuity:
.claude/
โโโ parallel-plan.json # Committed to git - persists across sessions
Plan Lifecycle:
/cpt:quick "goal" creates plan with tasksin_progress, branch recordedmerged after successful mergecompleted when all tasks mergedKey Commands:
/cpt:plan-status - View current plan progress/cpt:continue - Spawn agents for ready tasks/cpt:quick "goal" - Create new plan and spawnspawn.sh - Creates worktrees and spawns agentsstatus.sh - Checks agent completion statusmerge.sh - Merges all completed worktreesplan.sh - Persistent plan management functionsresume.sh - Resume interrupted sessionscheckpoint.sh - Record progress checkpointsorchestrate.sh - Monitor agents and handle interruptsIf an agent fails: