Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Autonomous multi-agent task orchestration with dependency analysis, parallel tmux/Codex execution, and self-healing heartbeat monitoring. Use for large projects with multiple issues/tasks that need coordinated parallel execution.
.claude/skills/jdrhyne-task-orchestrator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-12 | ✗→✓ | ▲ Improved | 144% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 134% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 671% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 268% | 0% |
Autonomous orchestration of multi-agent builds using tmux + Codex with self-healing monitoring.
Load the senior-engineering skill alongside this one for engineering principles.
A JSON file defining all tasks, their dependencies, files touched, and status.
json{ "project": "project-name", "repo": "owner/repo", "workdir": "/path/to/worktrees", "created": "2026-01-17T00:00:00Z", "model": "gpt-5.2-codex", "modelTier": "high", "phases": [ { "name": "Phase 1: Critical", "tasks": [ { "id": "t1", "issue": 1, "title": "Fix X", "files": ["src/foo.js"], "dependsOn": [], "status": "pending", "worktree": null, "tmuxSession": null, "startedAt": null, "lastProgress": null, "completedAt": null, "prNumber": null } ] } ] }
dependsOn array enforces orderingbash# 1. Create working directory WORKDIR="${TMPDIR:-/tmp}/orchestrator-$(date +%s)" mkdir -p "$WORKDIR" # 2. Clone repo for worktrees git clone https://github.com/OWNER/REPO.git "$WORKDIR/repo" cd "$WORKDIR/repo" # 3. Create tmux socket SOCKET="$WORKDIR/orchestrator.sock" # 4. Initialize manifest cat > "$WORKDIR/manifest.json" << 'EOF' { "project": "PROJECT_NAME", "repo": "OWNER/REPO", "workdir": "WORKDIR_PATH", "socket": "SOCKET_PATH", "created": "TIMESTAMP", "model": "gpt-5.2-codex", "modelTier": "high", "phases": [] } EOF
bash# Fetch all open issues gh issue list --repo OWNER/REPO --state open --json number,title,body,labels > issues.json # Group by files mentioned in issue body # Tasks touching same files should serialize
bash# For each task, create isolated worktree cd "$WORKDIR/repo" git worktree add -b fix/issue-N "$WORKDIR/task-tN" main
bashSOCKET="$WORKDIR/orchestrator.sock" # Create session for task tmux -S "$SOCKET" new-session -d -s "task-tN" # Launch Codex (uses gpt-5.2-codex with reasoning_effort=high from ~/.codex/config.toml) # Note: Model config is in ~/.codex/config.toml, not CLI flag tmux -S "$SOCKET" send-keys -t "task-tN" \ "cd $WORKDIR/task-tN && codex --yolo 'Fix issue #N: DESCRIPTION. Run tests, commit with good message, push to origin.'" Enter
bash#!/bin/bash # check_progress.sh - Run via heartbeat WORKDIR="$1" SOCKET="$WORKDIR/orchestrator.sock" MANIFEST="$WORKDIR/manifest.json" STALL_THRESHOLD_MINS=20 check_session() { local session="$1" local task_id="$2" # Capture recent output local output=$(tmux -S "$SOCKET" capture-pane -p -t "$session" -S -50 2>/dev/null) # Check for completion indicators if echo "$output" | grep -qE "(All tests passed|Successfully pushed|❯ $)"; then echo "DONE:$task_id" return 0 fi # Check for errors if echo "$output" | grep -qiE "(error:|failed:|FATAL|panic)"; then echo "ERROR:$task_id" return 1 fi # Check for stall (prompt waiting for input) if echo "$output" | grep -qE "(\? |Continue\?|y/n|Press any key)"; then echo "STUCK:$task_id:waiting_for_input" return 2 fi echo "RUNNING:$task_id" return 0 } # Check all active sessions for session in $(tmux -S "$SOCKET" list-sessions -F "#{session_name}" 2>/dev/null); do check_session "$session" "$session" done
When a task is stuck, the orchestrator should:
bash tmux -S "$SOCKET" send-keys -t "$session" "y" Enter
bash # Capture error context tmux -S "$SOCKET" capture-pane -p -t "$session" -S -100 > "$WORKDIR/logs/$task_id-error.log"
# Kill and restart with error context tmux -S "$SOCKET" kill-session -t "$session" tmux -S "$SOCKET" new-session -d -s "$session" tmux -S "$SOCKET" send-keys -t "$session" \ "cd $WORKDIR/$task_id && codex --model gpt-5.2-codex-high --yolo 'Previous attempt failed with: $(cat error.log | tail -20). Fix the issue and retry.'" Enter
bash # Check git log for recent commits cd "$WORKDIR/$task_id" LAST_COMMIT=$(git log -1 --format="%ar" 2>/dev/null)
# If no commits in threshold, restart
bash# Add to cron (every 15 minutes) cron action:add job:{ "label": "orchestrator-heartbeat", "schedule": "*/15 * * * *", "prompt": "Check orchestration progress at WORKDIR. Read manifest, check all tmux sessions, self-heal any stuck tasks, advance to next phase if current is complete. Do NOT ping human - fix issues yourself." }
bash# 1. Fetch issues gh issue list --repo OWNER/REPO --state open --json number,title,body > /tmp/issues.json # 2. Analyze for dependencies (files mentioned, explicit deps) # Group into phases: # - Phase 1: Critical/blocking issues (no deps) # - Phase 2: High priority (may depend on Phase 1) # - Phase 3: Medium/low (depends on earlier phases) # 3. Within each phase, identify: # - Parallel batch: Different files, no deps → run simultaneously # - Serial batch: Same files or explicit deps → run in order
Write manifest.json with all tasks, dependencies, file mappings.
bash# Create worktrees for Phase 1 tasks for task in phase1_tasks; do git worktree add -b "fix/issue-$issue" "$WORKDIR/task-$id" main done # Launch tmux sessions for task in phase1_parallel_batch; do tmux -S "$SOCKET" new-session -d -s "task-$id" tmux -S "$SOCKET" send-keys -t "task-$id" \ "cd $WORKDIR/task-$id && codex --model gpt-5.2-codex-high --yolo '$PROMPT'" Enter done
Heartbeat checks every 15 mins:
bash# When task completes successfully cd "$WORKDIR/task-$id" git push -u origin "fix/issue-$issue" gh pr create --repo OWNER/REPO \ --head "fix/issue-$issue" \ --title "fix: Issue #$issue - $TITLE" \ --body "Closes #$issue ## Changes [Auto-generated by Codex orchestrator] ## Testing - [ ] Unit tests pass - [ ] Manual verification"
bash# After all PRs merged or work complete tmux -S "$SOCKET" kill-server cd "$WORKDIR/repo" for task in all_tasks; do git worktree remove "$WORKDIR/task-$id" --force done rm -rf "$WORKDIR"
| Status | Meaning | |--------|---------| | pending | Not started yet | | blocked | Waiting on dependency | | running | Codex session active | | stuck | Needs intervention (auto-heal) | | error | Failed, needs retry | | complete | Done, ready for PR | | pr_open | PR created | | merged | PR merged |
json{ "project": "nuri-security-framework", "repo": "jdrhyne/nuri-security-framework", "phases": [ { "name": "Phase 1: Critical", "tasks": [ {"id": "t1", "issue": 1, "files": ["ceo_root_manager.js"], "dependsOn": []}, {"id": "t2", "issue": 2, "files": ["ceo_root_manager.js"], "dependsOn": ["t1"]}, {"id": "t3", "issue": 3, "files": ["workspace_validator.js"], "dependsOn": []} ] }, { "name": "Phase 2: High", "tasks": [ {"id": "t4", "issue": 4, "files": ["kill_switch.js", "container_executor.js"], "dependsOn": []}, {"id": "t5", "issue": 5, "files": ["kill_switch.js"], "dependsOn": ["t4"]}, {"id": "t6", "issue": 6, "files": ["ceo_root_manager.js"], "dependsOn": ["t2"]}, {"id": "t7", "issue": 7, "files": ["container_executor.js"], "dependsOn": []}, {"id": "t8", "issue": 8, "files": ["container_executor.js", "egress_proxy.js"], "dependsOn": ["t7"]} ] } ] }
Parallel execution in Phase 1:
Parallel execution in Phase 2:
--model gpt-5.2-codex-highWhen using codex exec --full-auto, the sandbox:
git push fails with "Could not resolve host"~/nuri_workspaceThe heartbeat should check for:
username@hostname path %, worker is donegit log @{u}.. --oneline shows commits not on remoteWhen detected, the orchestrator (not the worker) should:
gh pr createbash# In heartbeat, for each task: cd /tmp/orchestrator-*/task-tN if tmux capture-pane shows shell prompt; then # Worker finished, check for unpushed work if git log @{u}.. --oneline | grep -q .; then git push -u origin HEAD gh pr create --title "$(git log --format=%s -1)" --body "Closes #N" --base main fi fi
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-12 | fail→pass | 14,238 | 10,769 | -24% | 1 | 1 | 0% | 2,193 | 5,358 | +144% | 0 | 0 | — |
case-01 | fail→fail | 5,251 | 6,796 | +29% | 1 | 1 | 0% | 614 | 3,819 | +522% | 0 | 0 | — |
case-02 | fail→pass | 27,562 | 31,620 | +15% | 1 | 1 | 0% | 5,272 | 9,555 | +81% | 0 | 0 | — |
case-03 | fail→pass | 21,572 | 31,346 | +45% | 1 | 1 | 0% | 4,113 | 9,639 | +134% | 0 | 0 | — |
case-04 | pass→pass | 12,549 | 7,084 | -44% | 1 | 1 | 0% | 1,679 | 4,564 | +172% | 0 | 0 | — |
case-05 | pass→pass | 9,249 | 4,006 | -57% | 1 | 1 | 0% | 1,351 | 4,061 | +201% | 0 | 0 | — |
case-06 | pass→pass | 11,812 | 7,475 | -37% | 1 | 1 | 0% | 1,844 | 4,626 | +151% | 0 | 0 | — |
case-07 | pass→pass | 7,356 | 5,798 | -21% | 1 | 1 | 0% | 1,248 | 4,606 | +269% | 0 | 0 | — |
case-08 | fail→pass | 2,623 | 3,538 | +35% | 1 | 1 | 0% | 545 | 4,203 | +671% | 0 | 0 | — |
case-09 | pass→pass | 4,539 | 2,869 | -37% | 1 | 1 | 0% | 859 | 4,024 | +368% | 0 | 0 | — |
case-10 | fail→pass | 5,962 | 5,087 | -15% | 1 | 1 | 0% | 1,209 | 4,455 | +268% | 0 | 0 | — |
case-11 | pass→pass | 8,068 | 3,578 | -56% | 1 | 1 | 0% | 1,306 | 4,003 | +207% | 0 | 0 | — |
case-13 | fail→pass | 10,597 | 5,623 | -47% | 1 | 1 | 0% | 1,656 | 4,307 | +160% | 0 | 0 | — |
case-14 | pass→pass | 16,799 | 10,551 | -37% | 1 | 1 | 0% | 2,594 | 5,402 | +108% | 0 | 0 | — |
case-15 | pass→pass | 14,635 | 3,932 | -73% | 1 | 1 | 0% | 2,081 | 4,105 | +97% | 0 | 0 | — |
case-16 | fail→pass | 10,223 | 2,656 | -74% | 1 | 1 | 0% | 1,582 | 3,876 | +145% | 0 | 0 | — |
case-17 | fail→pass | 14,032 | 5,760 | -59% | 1 | 1 | 0% | 2,137 | 4,414 | +107% | 0 | 0 | — |
case-18 | pass→pass | 12,745 | 9,432 | -26% | 1 | 1 | 0% | 1,896 | 4,928 | +160% | 0 | 0 | — |
case-19 | fail→pass | 7,147 | 6,387 | -11% | 1 | 1 | 0% | 1,167 | 3,952 | +239% | 0 | 0 | — |
case-20 | pass→pass | 11,345 | 4,792 | -58% | 1 | 1 | 0% | 1,581 | 4,289 | +171% | 0 | 0 | — |
case-21 | pass→fail | 12,604 | 6,016 | -52% | 1 | 1 | 0% | 1,938 | 4,511 | +133% | 0 | 0 | — |
case-22 | pass→pass | 9,117 | 6,964 | -24% | 1 | 1 | 0% | 1,441 | 4,575 | +217% | 0 | 0 | — |
case-23 | pass→pass | 4,711 | 4,816 | +2% | 1 | 1 | 0% | 647 | 4,143 | +540% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +35 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.