| namespace | aiwg |
| name | rlm-status |
| platforms | ["all"] |
| description | Show status of RLM task tree execution |
| commandHint | {"category":"rlm"} |
RLM Status Command
Display current status of RLM (Recursive Language Model) task tree execution, including decomposition hierarchy, sub-call progress, cost tracking, and completion estimates.
Instructions
When invoked, analyze RLM task tree state and present comprehensive status:
-
Load Task Tree State
- Load task tree from
.aiwg/rlm/trees/{tree_id}/state.json
- Load all sub-call states
- Load cost tracking data
- Load trajectory history
-
Display Tree Structure
- Show task decomposition hierarchy
- Mark active vs completed vs failed sub-calls
- Display depth distribution
- Show parallelization status
-
Calculate Progress Metrics
- Completion rate: % of sub-calls completed
- Active sub-calls: Currently executing tasks
- Failed sub-calls: Tasks that encountered errors
- Total cost: Cumulative token/USD cost
- Cost by depth: Cost breakdown by tree level
- Time estimates: Predicted completion time
-
Present Status Dashboard
- Tree visualization (if
--tree flag)
- Cost summary (if
--cost flag)
- JSON export (if
--json flag)
- Default: condensed summary
Arguments
--tree - Show full task decomposition tree visualization
--cost - Show detailed cost breakdown by sub-call
--depth [N] - Limit tree display to depth N (default: all)
--json - Output machine-readable JSON
--export [path] - Export detailed report to file
[tree_id] - Specific tree ID (default: most recent active tree)
Default Output Format
╭─────────────────────────────────────────────────────────╮
│ RLM Task Tree Status │
│ Tree ID: rlm-analyze-codebase-a1b2c3d4 │
├─────────────────────────────────────────────────────────┤
│ Task: Analyze authentication module for security issues │
│ Status: RUNNING │
│ Started: 2026-02-09 11:30:00 │
│ Duration: 5m 23s │
├─────────────────────────────────────────────────────────┤
│ Progress │
│ Total Sub-Calls: 15 │
│ ✓ Completed: 8 (53%) │
│ ⚙ Active: 4 (27%) │
│ ⏸ Pending: 2 (13%) │
│ ✗ Failed: 1 (7%) │
│ │
│ Depth Distribution │
│ Root (depth 0): 1 │
│ Level 1: 5 │
│ Level 2: 9 │
│ │
│ Cost │
│ Input Tokens: 125,430 │
│ Output Tokens: 42,156 │
│ Total Cost: $0.84 │
│ │
│ Est. Completion: 2026-02-09 11:40:00 (9m 37s remaining) │
╰─────────────────────────────────────────────────────────╯
Active Sub-Calls:
[1.2] Analyze token validation logic (80% complete)
[1.3] Review password hashing implementation (45% complete)
[2.1] Check JWT expiration handling (30% complete)
[2.4] Audit session management (15% complete)
Recent Completion:
✓ [1.1] Parse authentication module structure
✓ [1.4] Identify security-relevant functions
Failed:
✗ [2.2] Analyze OAuth flow (error: file not found)
Use --tree for full decomposition hierarchy
Use --cost for detailed cost breakdown
Tree Visualization Format (--tree)
╭─────────────────────────────────────────────────────────╮
│ RLM Task Tree: rlm-analyze-codebase-a1b2c3d4 │
├─────────────────────────────────────────────────────────┤
│ │
│ [0] Root: Analyze authentication module │
│ │ Status: RUNNING | Cost: $0.12 | 2m 15s │
│ │ │
│ ├─ ✓ [1.1] Parse module structure │
│ │ │ Completed | Cost: $0.05 | 45s │
│ │ │ │
│ │ ├─ ✓ [2.1] Extract function signatures │
│ │ │ Completed | Cost: $0.02 | 18s │
│ │ └─ ✓ [2.2] Map dependencies │
│ │ Completed | Cost: $0.03 | 27s │
│ │ │
│ ├─ ⚙ [1.2] Analyze token validation │
│ │ │ ACTIVE (80%) | Cost: $0.08 | 1m 12s (running) │
│ │ │ │
│ │ ├─ ✓ [2.3] Check signature verification │
│ │ │ Completed | Cost: $0.03 | 22s │
│ │ ├─ ⚙ [2.4] Review expiration logic │
│ │ │ ACTIVE (60%) | Cost: $0.04 | 35s (running) │
│ │ └─ ⏸ [2.5] Audit token refresh │
│ │ PENDING │
│ │ │
│ ├─ ⚙ [1.3] Review password hashing │
│ │ │ ACTIVE (45%) | Cost: $0.06 | 58s (running) │
│ │ │ │
│ │ ├─ ✓ [2.6] Identify hash algorithm │
│ │ │ Completed | Cost: $0.02 | 15s │
│ │ └─ ⚙ [2.7] Check salt usage │
│ │ ACTIVE (30%) | Cost: $0.04 | 43s (running) │
│ │ │
│ ├─ ⏸ [1.4] Audit session management │
│ │ PENDING │
│ │ │
│ └─ ✗ [1.5] Analyze OAuth flow │
│ FAILED | Cost: $0.01 | 8s │
│ Error: Required file oauth.ts not found │
│ │
╰─────────────────────────────────────────────────────────╯
Legend:
✓ Completed ⚙ Active ⏸ Pending ✗ Failed
Cost Breakdown Format (--cost)
╭─────────────────────────────────────────────────────────╮
│ RLM Cost Analysis │
│ Tree ID: rlm-analyze-codebase-a1b2c3d4 │
├─────────────────────────────────────────────────────────┤
│ │
│ Cost by Depth │
│ ┌──────┬────────────┬─────────────┬──────────┐ │
│ │ Lvl │ Sub-Calls │ Tokens │ Cost │ │
│ ├──────┼────────────┼─────────────┼──────────┤ │
│ │ 0 │ 1 │ 12,450 │ $0.12 │ │
│ │ 1 │ 5 │ 78,320 │ $0.39 │ │
│ │ 2 │ 9 │ 76,816 │ $0.33 │ │
│ │ TOTAL│ 15 │ 167,586 │ $0.84 │ │
│ └──────┴────────────┴─────────────┴──────────┘ │
│ │
│ Cost by Model │
│ ┌──────────────┬────────────┬──────────┐ │
│ │ Model │ Tokens │ Cost │ │
│ ├──────────────┼────────────┼──────────┤ │
│ │ opus │ 12,450 │ $0.12 │ (root) │
│ │ sonnet │ 122,890 │ $0.61 │ (sub-calls) │
│ │ haiku │ 32,246 │ $0.11 │ (leaf tasks) │
│ │ TOTAL │ 167,586 │ $0.84 │ │
│ └──────────────┴────────────┴──────────┘ │
│ │
│ Top 5 Most Expensive Sub-Calls │
│ 1. [1.2] Analyze token validation $0.08 (9.5%) │
│ 2. [0] Root task $0.12 (14.3%) │
│ 3. [1.3] Review password hashing $0.06 (7.1%) │
│ 4. [1.1] Parse module structure $0.05 (6.0%) │
│ 5. [2.7] Check salt usage $0.04 (4.8%) │
│ │
│ Budget Status │
│ Budget: 500,000 tokens ($2.50 target) │
│ Used: 167,586 tokens ($0.84) │
│ Remaining: 332,414 tokens ($1.66) │
│ Utilization: 33.5% │
│ │
│ Projected Final Cost: $1.12 (based on current rate) │
╰─────────────────────────────────────────────────────────╯
JSON Output Format (--json)
{
"tree_id": "rlm-analyze-codebase-a1b2c3d4",
"task": "Analyze authentication module for security issues",
"status": "RUNNING",
"started_at": "2026-02-09T11:30:00Z",
"duration_seconds": 323,
"progress": {
"total_sub_calls": 15,
"completed": 8,
"active": 4,
"pending": 2,
"failed": 1,
"completion_rate": 0.53
},
"depth_distribution": {
"0": 1,
"1":
State File Integration
The command reads from these RLM state files:
Primary State
.aiwg/rlm/
├── registry.json # Active trees registry
└── trees/
├── rlm-analyze-codebase-a1b2c3d4/
│ ├── state.json # Main state (RLM task tree schema)
│ ├── trajectory.json # Execution trajectory
│ ├── cost.json # Detailed cost tracking
│ └── sub-calls/
│ ├── 1.1-state.json # Sub-call 1.1 state
│ ├── 1.2-state.json # Sub-call 1.2 state
│ └── ...
└── rlm-refactor-module-b2c3d4e5/
└── ...
State Schema Fields Used
From rlm-state.yaml:
tree_id: string
status: enum
root_task: string
started_at: datetime
last_updated: datetime
completed_at: datetime | null
configuration:
max_depth: integer
max_sub_calls: integer
budget_tokens: integer
parallel_sub_calls: boolean
sub_calls:
- id: string
depth: integer
task: string
status: enum
parent_id: string
Usage Examples
Basic Status Check
/rlm-status
/rlm-status rlm-analyze-codebase-a1b2c3d4
Full Tree Visualization
/rlm-status --tree
/rlm-status --tree --depth 2
Cost Analysis
/rlm-status --cost
/rlm-status rlm-analyze-codebase-a1b2c3d4 --cost
Export Reports
/rlm-status --json > rlm-report.json
/rlm-status --export .aiwg/rlm/reports/status-$(date +%Y%m%d).md
Monitoring Active Execution
watch -n 5 'aiwg rlm-status --tree'
while true; do
clear
aiwg rlm-status
sleep 5
done
Progress Calculation
Progress for ACTIVE sub-calls is estimated based on:
- Token consumption:
used_tokens / estimated_total_tokens
- Depth completion:
completed_children / total_children (if sub-call has children)
- Time elapsed:
elapsed_time / estimated_duration (based on similar tasks)
The displayed progress percentage is a weighted average:
- 50% token consumption
- 30% child completion (if applicable)
- 20% time-based estimate
Completion Time Estimates
Estimated completion time is calculated using:
- Average sub-call duration: Mean duration of completed sub-calls at each depth
- Remaining sub-calls: Count of PENDING and ACTIVE sub-calls
- Parallelization factor: Adjust for parallel execution (if enabled)
- Current rate: Tokens/second consumption rate
Formula:
estimated_remaining = (
(pending_sub_calls * avg_duration_by_depth) / parallelization_factor
+ sum(active_sub_call.estimated_remaining)
)
completion_time = current_time + estimated_remaining
Confidence level indicates reliability:
- High (>0.8): >50% sub-calls completed, stable rate
- Medium (0.5-0.8): 20-50% completed
- Low (<0.5): <20% completed, rate unstable
Error Handling
No Active Trees
No active RLM trees found.
Use /rlm-query to start a new task tree.
Tree Not Found
Error: Tree 'rlm-nonexistent-a1b2c3d4' not found.
Active trees:
- rlm-analyze-codebase-a1b2c3d4 (running)
- rlm-refactor-module-b2c3d4e5 (completed)
Use /rlm-status [tree_id] to view specific tree.
Corrupted State
Warning: State file for tree 'rlm-analyze-codebase-a1b2c3d4' is corrupted.
Attempting recovery from last checkpoint...
- Checkpoint found: iteration 12
- Recovered state up to sub-call 1.3
- 2 recent sub-calls may need re-execution
Recovered state displayed below. To resume, restart the originating
RLM command and pass the recovered task tree ID. To discard the recovered
state and start fresh, delete the state file under `.aiwg/rlm-runs/`.
Integration Points
With RLM Query Command
tree_id=$(aiwg rlm-query "Analyze auth module" --return-id)
watch -n 5 "aiwg rlm-status $tree_id"
With RLM Batch Command
aiwg rlm-batch --tasks batch-config.yaml
aiwg rlm-status --tree
With Agent Loops
aiwg ralph-status && aiwg rlm-status
Performance Considerations
For large trees (>100 sub-calls):
- Default view: Shows summary only (fast)
- Tree view: Lazy-loads sub-call details
- Cost view: Aggregates at depth level first
- JSON export: Full detail (may take several seconds)
Use --depth N to limit tree display for very deep hierarchies.
Configuration
Override display settings in .aiwg/config.yml:
rlm:
status:
default_view: summary
max_tree_depth: 5
refresh_interval: 5
show_estimates: true
show_budget: true
cost_precision: 2
References
- @$AIWG_ROOT/agentic/code/addons/rlm/schemas/rlm-state.yaml - RLM state schema
- @$AIWG_ROOT/agentic/code/addons/rlm/schemas/rlm-task-tree.yaml - Task tree structure
- @$AIWG_ROOT/agentic/code/addons/rlm/schemas/rlm-cost.yaml - Cost tracking schema
- @$AIWG_ROOT/agentic/code/addons/rlm/schemas/rlm-trajectory.yaml - Execution trajectory
- @$AIWG_ROOT/agentic/code/addons/ralph/schemas/loop-state.yaml - agent loop state reference
- @$AIWG_ROOT/agentic/code/addons/ralph/commands/ralph-status.md - Al status command
- @.aiwg/research/findings/REF-089-recursive-language-models.md - RLM research foundation
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/tao-loop.md - TAO loop structure underlying RLM