agent-orchestrator-ts: Command for Claude Code

.claude/commands/auton.md

auton is a command for Claude Code from jleechanorg/agent-orchestrator-ts. It costs 0 tokens per session (4,273 once invoked), scanned A, original, MIT.

A diagnostic command for an automated coding system that is expected to move pull requests to passing checks and merge them without human help. It examines the system's settings, policies, sessions, and infrastructure to find why that process stopped working.

In plain words
What is it for?
Use it to run a full autonomy check or investigate a specific failure in the agent orchestrator, session state, repository checks, or pull-request workflow.
Why use it?
It gives a focused way to investigate stalled automated pull requests instead of guessing whether the problem is in the agent, its session, or the repository setup.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md; reads ~/.codex paths.

This is jleechanorg/agent-orchestrator-ts's own configuration. It tells Claude Code how to work on agent-orchestrator-ts itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-orchestrator-ts configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/jleechan/.openclaw/agent-orchestrator.yaml.

Reuse

Borrowing it

Nothing to install: this file belongs to jleechanorg/agent-orchestrator-ts. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jleechanorg/agent-orchestrator-ts/main/.claude/commands/auton.md
Clone the repo
git clone --depth 1 https://github.com/jleechanorg/agent-orchestrator-ts

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auton

README.md
[![agentmods](https://agentmods.dev/badge/commands/jleechanorg/agent-orchestrator-ts/auton/github.svg)](https://agentmods.dev/commands/jleechanorg/agent-orchestrator-ts/auton)
Your own site
<a href="https://agentmods.dev/commands/jleechanorg/agent-orchestrator-ts/auton"><img src="https://agentmods.dev/badge/commands/jleechanorg/agent-orchestrator-ts/auton/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auton

Your own site · 80×15
<a href="https://agentmods.dev/commands/jleechanorg/agent-orchestrator-ts/auton"><img src="https://agentmods.dev/badge/commands/jleechanorg/agent-orchestrator-ts/auton.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04273
Opus 5.5 $0.00000 $0.01709
Sonnet 5.5 $0.00000 $0.00855
Haiku 4.5 $0.00000 $0.00427

Measured 9d ago against content hash 451077dd5d5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

auton scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/auton.md · 332 lines

How it starts

The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/auton — Autonomy Diagnostic

Purpose

Diagnose WHY the jleechanclaw + AO system is NOT autonomously driving PRs to N-green and merged. The system is supposed to do this without human intervention — if it isn't, something is broken.

Skill reference: .claude/skills/auton.md Session monitor skill: .claude/skills/ao-session-monitor.md

Usage

  • /auton — Run full autonomy diagnostic
  • /auton <description> — Focus on a specific failure mode

Execution

YOU (Claude) must execute the following steps immediately.

Step 1: Read the goals and system design (mandatory)

Before answering, read these files to understand what "working" means:

  1. ~/.openclaw/CLAUDE.md — repo goals, PR green definition, autonomy target
  2. ~/.codex/AGENTS.md — agent policies
  3. ~/.openclaw/agent-orchestrator.yaml — AO project config
  4. ~/.openclaw/SOUL.md — openclaw decision-making policy

Step 2: Run diagnostics (parallel group A + B)

Run Group A and Group B in parallel for speed.

Group A — Infrastructure & Session State

Run all of these together:

# A1. Orchestrator session — what is it doing?
tmux capture-pane -t ao-orchestrator -p -S -20 2>/dev/null || echo "ORCHESTRATOR SESSION NOT FOUND"

# A2. Worker session inventory with activity detection (30 lines each)
# Uses ao-session-monitor skill: capture 30 lines, look for Unicode activity indicators
for s in $(tmux list-sessions 2>/dev/null | grep -E "ao-[0-9]|jc-" | cut -d: -f1); do
  echo "=== SESSION: $s ==="
  last=$(tmux capture-pane -t "$s" -p -S -30 2>/dev/null)
  echo "$last" | tail -5
  echo "---"
  # Detect state via activity indicators
  activity=$(echo "$last" | grep -oE "[✻✶✳✽✾✢] [A-Za-z]+" | tail -1)
  pr=$(echo "$last" | grep -oE "#[0-9]+" | head -1)
  uc=""; echo "$last" | grep -q "uncommitted" && uc="+uncommitted"
  if [ -n "$activity" ]; then
    echo "STATE: WORKING $pr $uc ($activity)"
  elif echo "$last" | grep -qE "Running|timeout"; then
    echo "STATE: WORKING (shell command) $pr $uc"
  elif echo "$last" | grep -qE "Baked|Sautéed"; then
    echo "STATE: COMPLETED $pr"
  elif echo "$last" | grep -q "queued"; then
    echo "STATE: QUEUED $pr"
  else
    echo "STATE: IDLE $pr $uc"
  fi
  echo ""
done

# A3. Is AO lifecycle-worker running? Check per-project
lw_count=$(ps aux | grep -c "[l]ifecycle-worker")
lw_per_project=$(ps aux | grep "[l]ifecycle-worker" | awk '{print $NF}' | sort -u | wc -l | tr -d ' ')
echo "Lifecycle-worker process count: $lw_count (unique projects: $lw_per_project)"
# Only flag as duplicate if same project appears more than once
ps aux | grep "[l]ifecycle-worker" | awk '{print $NF}' | sort | uniq -d | while read dup; do
  echo "DUPLICATE lifecycle-worker for project: $dup"
  ps aux | grep "[l]ifecycle-worker" | grep "$dup"
done

# A3b. ZOMBIE SESSION DETECTION — cross-reference AO session store vs tmux
echo "--- AO session store state (agent-orchestrator project) ---"
ao session ls --project agent-orchestrator 2>/dev/null || echo "ao session ls failed"
echo "--- Zombie check: AO-marked-killed sessions still in tmux ---"
# Discover session dirs dynamically — hash varies per config path
for ns_dir in ~/.agent-orchestrator/*-agent-orchestrator/sessions; do
  [ -d "$ns_dir" ] || continue
  echo "(scanning $ns_dir)"
done
AO_DATA=$(ls ~/.agent-orchestrator/*-agent-orchestrator/sessions/ 2>/dev/null)
for s in $AO_DATA; do
  sfile=$(ls ~/.agent-orchestrator/*-agent-orchestrator/sessions/"$s" 2>/dev/null | head -1)
  [ -f "$sfile" ] || continue
  status=$(grep "^status=" "$sfile" 2>/dev/null | cut -d= -f2)
  tmux_name=$(grep "^tmuxName=" "$sfile" 2>/dev/null | cut -d= -f2)
  [ "$status" = "killed" ] || continue
  if tmux has-session -t "$tmux_name" 2>/dev/null; then
    pr=$(grep "^pr=" "$sfile" | cut -d= -f2 | grep -oE "[0-9]+$")
    echo "  ZOMBIE: $s (tmux=$tmux_name, PR=#$pr) — AO=killed but tmux still running"
  fi
done

# A4. Stray worktrees blocking spawns?
git -C "$(git rev-parse --show-toplevel 2>/dev/null || echo .)" worktree list 2>/dev/null | grep "locked" || echo "No locked worktrees"

# A5. Recent backfill claim failures (surface blocker reason, not just uncovered)
python3 - <<'PY'
import json, pathlib
log = pathlib.Path.home() / ".openclaw" / "logs" / "ao-lifecycle-agent-orchestrator.log"
if not log.exists():
    print("No lifecycle log found for claim-failure scan")
    raise SystemExit(0)
seen = {}
for raw in log.read_text(errors="ignore").splitlines():
    if "lifecycle.backfill.claim_failed" not in raw:
        continue
    try:
        payload = json.loads(raw)
    except Exception:
        continue
    if payload.get("operation") != "lifecycle.backfill.claim_failed":
        continue
    data = payload.get("data") or {}
    pr = data.get("prNumber")
    err = " ".join(str(data.get("error", "")).split())
    if isinstance(pr, int):
        seen[pr] = err
if not seen:
    print("No recent claim_failed blockers")
else:
    print("Recent claim_failed blockers:")
    for pr in sorted(seen):
        print(f"  PR #{pr}: {seen[pr][:220]}")
PY

Read the full file on GitHub · 332 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 332 lines · 0 tokens per session scan A 451077dd5d5e

Subscribe to this mod's changes

auton is a command published in the GitHub repository jleechanorg/agent-orchestrator-ts (8 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,273 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.