/exp-status
Unified experiment status monitoring entry point.
Scans all running experiments, performs a live status check on each (screen session / SSH),
and outputs a status table (alive / anomaly / completed) to guide the user's next actions.
When used with /research --auto, acts as a periodic checker scheduled by CronCreate:
when all experiments in a pipeline are completed, automatically triggers /research --start-from stage4.
Inputs
- No arguments (default): check all
running experiments, print status table
--pipeline <slug> (optional): check only experiments belonging to the specified pipeline; additionally print overall pipeline progress
--collect-ready (optional): auto-call /exp-run --collect for all experiments whose session has already ended
--auto-advance (optional, requires --pipeline <slug>): if all pipeline experiments are completed,
automatically trigger /research --start-from stage4 without waiting for the user
Outputs
- Status report (terminal output, all modes): list of experiments in running/anomaly/completed states
wiki/experiments/{slug}.md — updated (outcome/key_result/status) when --collect-ready triggers Phase 4
wiki/outputs/pipeline-progress.md — --auto-advance updates current_stage → stage4 (done internally by /research --start-from stage4)
wiki/log.md — appended status check log
Wiki Interaction
Reads
wiki/experiments/*.md — status, remote frontmatter (server/session/started), date_planned
wiki/outputs/pipeline-progress.md — in --pipeline mode, identifies target experiments and monitoring_cron_id
Writes
wiki/experiments/{slug}.md — updated via /exp-run --collect in --collect-ready mode
wiki/outputs/pipeline-progress.md — updated by /research when --auto-advance triggers Stage 4
wiki/log.md — appended status check log
Graph edges created
- None (result writes triggered indirectly via /exp-run --collect do not produce new edges)
Workflow
Precondition: confirm working directory is the wiki project root (directory containing wiki/, raw/, tools/).
Step 1: Collect Target Experiment List
Determine check scope:
- If
--pipeline <slug> is specified:
- Read
wiki/outputs/pipeline-progress.md, extract the slug list from the stage3a_deployed field
- If the file does not exist or slug does not match: report error, suggest running
/research first or specifying manually
- Otherwise:
- Use Glob to scan
wiki/experiments/*.md, filter for status == running
If no running experiments:
Step 2: Check Status of Each Experiment
For each target experiment, execute in parallel (or sequentially):
Read experiment page: from wiki/experiments/{slug}.md get:
remote block (if present, this is a remote experiment)
run_log path
started (from remote.started or date_planned, used to compute elapsed time)
- Deployment environment (has remote block → remote, otherwise → local)
Check process status:
- Local:
screen -ls | grep "exp-{slug}"
- Has output →
alive: true
- No output →
alive: false (session is gone)
- Remote:
python3 tools/remote.py check --name "exp-{slug}"
- Parse JSON:
alive, last_lines, anomalies
If alive == true:
- Fetch recent logs (at most 20 lines):
- Local:
tail -20 {run_log}
- Remote: use
last_lines from the check command response
- Extract latest metric (loss, accuracy, step, etc. — grep the last metric line)
- Detect anomalies (NaN/OOM/Traceback/Inf): use
anomalies field from remote.py check (remote), or manual grep (local)
- Compute elapsed time (current time − started)
- Classify as:
running or anomaly
If alive == false:
- Classify as:
completed_pending_collect (session gone but wiki status is still running)
- If wiki status is already
completed: classify as collected
Aggregate results: build status dict {slug: {state, elapsed, latest_metric, anomalies}}
Step 3: Print Status Report
# Experiment Status — {YYYY-MM-DD HH:MM}
### 🔄 Running ({N})
| Experiment | Elapsed | Latest | Env |
|-----------|---------|--------|-----|
| [[exp-foo-baseline]] | 2.3h | loss: 0.42 | local |
| [[exp-foo-validation]] | 1.1h | step: 1200 | remote (gpu1) |
### ⚠️ Anomaly Detected ({N})
| Experiment | Elapsed | Issue | Action |
|-----------|---------|-------|--------|
| [[exp-foo-ablation]] | 0.8h | NaN loss at step 500 | Run `/exp-run exp-foo-ablation --collect` to inspect |
### ✅ Completed — Pending Collect ({N})
| Experiment | Finished (estimate) |
|-----------|---------------------|
| [[exp-foo-sanity]] | session gone |
### 📦 Already Collected ({N})
| Experiment | Outcome |
|-----------|---------|
| [[exp-foo-old]] | succeeded |
---
### Actions
```bash
# Collect all completed experiments at once:
/exp-status --collect-ready
# Collect a specific experiment:
/exp-run exp-foo-sanity --collect
# Pipeline progress (if in /research):
/exp-status --pipeline {pipeline-slug}
Append log:
```bash
python3 tools/research_wiki.py log wiki/ \
"exp-status | running: {N}, anomaly: {M}, pending-collect: {K}"
Step 4: --collect-ready Auto-Collect (if specified)
For each completed_pending_collect experiment, call /exp-run --collect:
Skill: exp-run
Args: "{slug} --collect"
Collect each completed experiment sequentially (not in parallel, to avoid concurrent wiki writes).
After all collections are done, re-print the updated status report.
Step 5: --auto-advance Pipeline Advance (if both --pipeline and --auto-advance are specified)
Check pipeline completion condition:
- Read
stage3a_deployed list from wiki/outputs/pipeline-progress.md
- Check the status of each slug's
wiki/experiments/{slug}.md
- Condition met: all experiments have status ==
completed
If condition is not met (some experiments still running or pending collect):
- Print current progress:
Pipeline {slug}: {M}/{N} experiments completed
- Return (do not advance)
- Cron will trigger again in 30 minutes
If condition is met (all experiments completed):
a. Print notification and trigger Stage 4:
- Print:
✅ All experiments completed for pipeline {slug}!
Advancing to Stage 4 (Verdict & Iteration)...
- Append log:
python3 tools/research_wiki.py log wiki/ \
"exp-status | pipeline {slug}: all experiments done, advancing to stage4"
- Trigger next stage:
Skill: research
Args: "--start-from stage4"
Constraints
- Read-only in non --collect-ready mode: without
--collect-ready, do not modify any wiki files
--auto-advance requires --pipeline: using --auto-advance alone is invalid, report an error
- Status checks must be non-blocking: each experiment check should complete quickly (single SSH check or screen -ls)
- Anomalies are not auto-fixed:
/exp-status only reports anomalies; fixes require the user to manually call /exp-run --collect
- pipeline-progress.md must exist: in
--pipeline mode, if the file is missing, report an error
Error Handling
- No running experiments: print friendly message, not an error; provide next step suggestions
--pipeline but pipeline-progress.md does not exist: report error "Pipeline progress file not found. Run /research <direction> first or check wiki/outputs/"
--auto-advance without --pipeline: report error "--auto-advance requires --pipeline "
- SSH connection fails (remote experiment): mark that experiment as
check_failed, note it in the report, continue checking other experiments
- screen -ls returns nothing: does not mean the experiment failed — may be a brief delay; mark as
completed_pending_collect
/exp-run --collect fails (--collect-ready mode): record the failure, continue collecting other experiments, report all failures at the end
Dependencies
Skills(via Skill tool)
/exp-run — call collect phase in --collect-ready mode
/research — trigger Stage 4 via --auto-advance
Tools(via Bash)
python3 tools/remote.py check --name "exp-{slug}" — remote experiment status check
python3 tools/remote.py tail-log --name "exp-{slug}" --lines 20 — fetch remote logs
python3 tools/research_wiki.py set-meta <path> <field> <value> — update pipeline-progress
python3 tools/research_wiki.py log wiki/ "<message>" — append log
screen -ls — local process status
tail -20 {log} — fetch local logs
Claude Code Native
Read — read experiment pages and pipeline-progress
Write — update pipeline-progress status
Glob — scan wiki/experiments/*.md
Bash — screen/tail and other system commands
Skill — call /exp-run --collect and /research
Called by
- CronCreate schedule (created by
/research --auto Stage 3b: triggers every 30 minutes)
- User directly
/research Stage 3b (in interactive mode, suggested to user)
1---2name: exp-status3description: View the status of all running experiments; optionally auto-collect completed experiments and advance the pipeline4---56# /exp-status78> Unified experiment status monitoring entry point.9> Scans all `running` experiments, performs a live status check on each (screen session / SSH),10> and outputs a status table (alive / anomaly / completed) to guide the user's next actions.11>12> When used with `/research --auto`, acts as a periodic checker scheduled by CronCreate:13> when all experiments in a pipeline are completed, automatically triggers `/research --start-from stage4`.1415## Inputs1617- No arguments (default): check all `running` experiments, print status table18- `--pipeline <slug>` (optional): check only experiments belonging to the specified pipeline; additionally print overall pipeline progress19- `--collect-ready` (optional): auto-call `/exp-run --collect` for all experiments whose session has already ended20- `--auto-advance` (optional, requires `--pipeline <slug>`): if all pipeline experiments are `completed`,21 automatically trigger `/research --start-from stage4` without waiting for the user2223## Outputs2425- **Status report** (terminal output, all modes): list of experiments in running/anomaly/completed states26- `wiki/experiments/{slug}.md` — updated (outcome/key_result/status) when `--collect-ready` triggers Phase 427- `wiki/outputs/pipeline-progress.md` — `--auto-advance` updates current_stage → stage4 (done internally by /research --start-from stage4)28- `wiki/log.md` — appended status check log2930## Wiki Interaction3132### Reads33- `wiki/experiments/*.md` — status, remote frontmatter (server/session/started), date_planned34- `wiki/outputs/pipeline-progress.md` — in `--pipeline` mode, identifies target experiments and monitoring_cron_id3536### Writes37- `wiki/experiments/{slug}.md` — updated via /exp-run --collect in `--collect-ready` mode38- `wiki/outputs/pipeline-progress.md` — updated by /research when `--auto-advance` triggers Stage 439- `wiki/log.md` — appended status check log4041### Graph edges created42- None (result writes triggered indirectly via /exp-run --collect do not produce new edges)4344## Workflow4546**Precondition**: confirm working directory is the wiki project root (directory containing `wiki/`, `raw/`, `tools/`).4748### Step 1: Collect Target Experiment List49501. **Determine check scope**:51 - If `--pipeline <slug>` is specified:52 - Read `wiki/outputs/pipeline-progress.md`, extract the slug list from the `stage3a_deployed` field53 - If the file does not exist or slug does not match: report error, suggest running `/research` first or specifying manually54 - Otherwise:55 - Use Glob to scan `wiki/experiments/*.md`, filter for `status == running`56572. **If no running experiments**:58 - Print a friendly message:59 ```60 No running experiments found.61 - To start an experiment: /exp-run <slug>62 - To see all experiments: check wiki/experiments/63 ```64 - Return6566### Step 2: Check Status of Each Experiment6768For each target experiment, execute in parallel (or sequentially):69701. **Read experiment page**: from `wiki/experiments/{slug}.md` get:71 - `remote` block (if present, this is a remote experiment)72 - `run_log` path73 - `started` (from `remote.started` or `date_planned`, used to compute elapsed time)74 - Deployment environment (has remote block → remote, otherwise → local)75762. **Check process status**:77 - **Local**: `screen -ls | grep "exp-{slug}"`78 - Has output → `alive: true`79 - No output → `alive: false` (session is gone)80 - **Remote**: `python3 tools/remote.py check --name "exp-{slug}"`81 - Parse JSON: `alive`, `last_lines`, `anomalies`82833. **If alive == true**:84 - Fetch recent logs (at most 20 lines):85 - Local: `tail -20 {run_log}`86 - Remote: use `last_lines` from the `check` command response87 - Extract latest metric (loss, accuracy, step, etc. — grep the last metric line)88 - Detect anomalies (NaN/OOM/Traceback/Inf): use `anomalies` field from `remote.py check` (remote), or manual grep (local)89 - Compute elapsed time (current time − started)90 - Classify as: `running` or `anomaly`91924. **If alive == false**:93 - Classify as: `completed_pending_collect` (session gone but wiki status is still running)94 - If wiki status is already `completed`: classify as `collected`95965. **Aggregate results**: build status dict `{slug: {state, elapsed, latest_metric, anomalies}}`9798### Step 3: Print Status Report99100```markdown101# Experiment Status — {YYYY-MM-DD HH:MM}102103### 🔄 Running ({N})104| Experiment | Elapsed | Latest | Env |105|-----------|---------|--------|-----|106| [[exp-foo-baseline]] | 2.3h | loss: 0.42 | local |107| [[exp-foo-validation]] | 1.1h | step: 1200 | remote (gpu1) |108109### ⚠️ Anomaly Detected ({N})110| Experiment | Elapsed | Issue | Action |111|-----------|---------|-------|--------|112| [[exp-foo-ablation]] | 0.8h | NaN loss at step 500 | Run `/exp-run exp-foo-ablation --collect` to inspect |113114### ✅ Completed — Pending Collect ({N})115| Experiment | Finished (estimate) |116|-----------|---------------------|117| [[exp-foo-sanity]] | session gone |118119### 📦 Already Collected ({N})120| Experiment | Outcome |121|-----------|---------|122| [[exp-foo-old]] | succeeded |123124---125### Actions126```bash127# Collect all completed experiments at once:128/exp-status --collect-ready129130# Collect a specific experiment:131/exp-run exp-foo-sanity --collect132133# Pipeline progress (if in /research):134/exp-status --pipeline {pipeline-slug}135```136```137138Append log:139```bash140python3 tools/research_wiki.py log wiki/ \141 "exp-status | running: {N}, anomaly: {M}, pending-collect: {K}"142```143144### Step 4: --collect-ready Auto-Collect (if specified)145146For each `completed_pending_collect` experiment, call `/exp-run --collect`:147148```149Skill: exp-run150Args: "{slug} --collect"151```152153Collect each completed experiment sequentially (not in parallel, to avoid concurrent wiki writes).154155After all collections are done, re-print the updated status report.156157### Step 5: --auto-advance Pipeline Advance (if both --pipeline and --auto-advance are specified)1581591. **Check pipeline completion condition**:160 - Read `stage3a_deployed` list from `wiki/outputs/pipeline-progress.md`161 - Check the status of each slug's `wiki/experiments/{slug}.md`162 - **Condition met**: all experiments have status == `completed`1631642. **If condition is not met** (some experiments still running or pending collect):165 - Print current progress: `Pipeline {slug}: {M}/{N} experiments completed`166 - Return (do not advance)167 - Cron will trigger again in 30 minutes1681693. **If condition is met (all experiments completed)**:170171 a. **Print notification and trigger Stage 4**:172 - Print:173 ```174 ✅ All experiments completed for pipeline {slug}!175 Advancing to Stage 4 (Verdict & Iteration)...176 ```177 - Append log:178 ```bash179 python3 tools/research_wiki.py log wiki/ \180 "exp-status | pipeline {slug}: all experiments done, advancing to stage4"181 ```182 - Trigger next stage:183 ```184 Skill: research185 Args: "--start-from stage4"186 ```187188## Constraints189190- **Read-only in non --collect-ready mode**: without `--collect-ready`, do not modify any wiki files191- **`--auto-advance` requires `--pipeline`**: using `--auto-advance` alone is invalid, report an error192- **Status checks must be non-blocking**: each experiment check should complete quickly (single SSH check or screen -ls)193- **Anomalies are not auto-fixed**: `/exp-status` only reports anomalies; fixes require the user to manually call `/exp-run --collect`194- **pipeline-progress.md must exist**: in `--pipeline` mode, if the file is missing, report an error195196## Error Handling197198- **No running experiments**: print friendly message, not an error; provide next step suggestions199- **`--pipeline` but pipeline-progress.md does not exist**: report error "Pipeline progress file not found. Run `/research <direction>` first or check wiki/outputs/"200- **`--auto-advance` without `--pipeline`**: report error "--auto-advance requires --pipeline <slug>"201- **SSH connection fails** (remote experiment): mark that experiment as `check_failed`, note it in the report, continue checking other experiments202- **screen -ls returns nothing**: does not mean the experiment failed — may be a brief delay; mark as `completed_pending_collect`203- **`/exp-run --collect` fails** (`--collect-ready` mode): record the failure, continue collecting other experiments, report all failures at the end204205## Dependencies206207### Skills(via Skill tool)208- `/exp-run` — call collect phase in `--collect-ready` mode209- `/research` — trigger Stage 4 via `--auto-advance`210211### Tools(via Bash)212- `python3 tools/remote.py check --name "exp-{slug}"` — remote experiment status check213- `python3 tools/remote.py tail-log --name "exp-{slug}" --lines 20` — fetch remote logs214- `python3 tools/research_wiki.py set-meta <path> <field> <value>` — update pipeline-progress215- `python3 tools/research_wiki.py log wiki/ "<message>"` — append log216- `screen -ls` — local process status217- `tail -20 {log}` — fetch local logs218219### Claude Code Native220- `Read` — read experiment pages and pipeline-progress221- `Write` — update pipeline-progress status222- `Glob` — scan wiki/experiments/*.md223- `Bash` — screen/tail and other system commands224- `Skill` — call /exp-run --collect and /research225226### Called by227- CronCreate schedule (created by `/research --auto` Stage 3b: triggers every 30 minutes)228- User directly229- `/research` Stage 3b (in interactive mode, suggested to user)