---
name: multi-agent-status
description: "Show every multi-agent task's ID, phase, branch, and status. Use when asked what is running, or for an overview of every task."
user-invocable: true
metadata:
  language: en
---

# multi-agent status  -  Task Status Dashboard

Show every active and completed task as a table.

## Steps

1. **Ask the producer, do not go looking.** One command answers the whole
   question:

   ```bash
   node "$HOME/.claude/scripts/runs-index.mjs"          # grouped table
   node "$HOME/.claude/scripts/runs-index.mjs" --json   # the same records
   ```

   `runs-index.mjs` resolves through `lib/run-paths.sh` / `scripts/_run-paths.mjs`,
   so it sees both directory layouts (`<project>/<id>/` and the flat `<id>/`),
   the salvaged `artifacts/` copy Phase 4 leaves behind, and every spelling of a
   task id - and it counts a run that exists in both layouts once. Do NOT
   re-scan the tree by hand: fixed `.worktrees/` paths and a single `find`
   depth miss runs and double-count others, and `agent-state.json` never lives
   inside a worktree (`phases/phase-0-init.md`).

2. **Fields per run** (already in the output): `taskId`, `project`, `branch`,
   `currentPhase`, `status`, `startedAt`, `worktreePath`, `prUrl`, `autopilot`,
   `phases[]`, `tokens`, `estUsd`, `group`, plus `duplicateOf` when the run also
   exists in the other layout and `salvaged` when its state is the Phase 4 copy.

3. **Groups are computed, not judged.** Report the `group` the producer
   returns rather than re-deriving it.

   | Group | Test | Action offered |
   |---|---|---|
   | `waiting` - Waiting on you | `status == "awaiting_input"`, or `waitingFor` set, or a `pr.url`, or phase >= 4 | `resume #N` - the work landed, it needs your answer |
   | `stopped` - Stopped mid-development | anything else past phase 0 | `resume #N` or `kill #N` |
   | `question` - Left at a question | phase 0, nothing pending | `garbage-collect --abandoned` - nothing was built |
   | `unknown` - Status not recorded | no `status` field | say so; offer nothing |

   A run with no `status` is **not** placed in an actionable group. Unknown is
   not a finding, and calling it dead is the same false claim in the other
   direction.

4. **Show as a table**, grouped per step 3:
   ```
   🤖 Multi-Agent Tasks

   | ID | Jira/Task | Branch | Phase | Status | Duration |
   |----|-----------|--------|-------|--------|----------|
   | #1 | PROJ-133139 | feature/PROJ-133139-... | 5/5 DONE | ✅ Complete | 12m |
   | #3 | PROJ-133408 | feature/PROJ-133408-... | 5/5 DONE | ✅ Complete | 8m |

   💡 log #1 | resume #N | kill #N
   ```

6. **What is waiting to be learned** (one line, only when non-zero):

   ```bash
   node "$HOME/.claude/scripts/learn-from-transcripts.mjs" --json 2>/dev/null
   node "$HOME/.claude/scripts/observations.mjs" scan --status open --json 2>/dev/null
   ```

   Report `N lesson(s) minable from transcripts  -  /multi-agent:refactor to review` and `N open pipeline observation(s)` when either count is above zero, and print nothing when both are zero. Neither runs a model and neither writes: the miner is dry-run by default. Zero candidates with a non-zero `toolResultsExamined` means nothing to find; zero of both means the read is broken, which is worth saying rather than reporting a clean queue.

5. **Short command suggestions**  -  Based on state:
   - If there is a paused task → suggest `resume #N`
   - If there is a done task → suggest `log #N`
