From claude-commands
Triages AO lifecycle backfill claim failures caused by main repo branch mismatch or ghost worktrees with stale branches.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:ao-lifecycle-triageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
When `lifecycle.backfill.claim_failed` errors appear in the lifecycle-worker log with:
When lifecycle.backfill.claim_failed errors appear in the lifecycle-worker log with:
fatal: refusing to fetch into branch 'refs/heads/BRANCH' checked out at 'PATH'
Symptom: checked out at '$HOME/project_agento/agent-orchestrator'
Diagnosis: git -C $HOME/project_agento/agent-orchestrator branch --show-current
Fix:
git -C $HOME/project_agento/agent-orchestrator checkout main
git -C $HOME/project_agento/agent-orchestrator pull --ff-only
Why it happens: An AO agent (or manual work) checked out a feature branch in the main repo and was killed before resetting to main.
Symptom: checked out at '$HOME/.worktrees/agent-orchestrator/ao-NNN'
Diagnosis: git worktree list | grep ao-NNN — if present with no live tmux session, it's a ghost
Fix:
tmux has-session -t bb5e6b7f8db3-ao-NNN 2>/dev/null || echo "Dead"
git worktree remove --force $HOME/.worktrees/agent-orchestrator/ao-NNN
Why it happens: AO session was killed without proper cleanup; worktree remained. The lifecycle-worker's sweepOrphanWorktrees auto-cleans after 6h TTL.
~/.worktrees/... → Cause Bclaim_failed_abort after 3 consecutive failures), check bothsweepOrphanWorktrees in lifecycle-worker.ts runs every 5min (orphan TTL: 6h)main before exitingGhost worktree accumulation cleaned manually twice in the same session on 2026-03-24 — this is the harness-level fix. If seeing this pattern again, the orphanTtlMs may need reduction.
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsDiagnoses and fixes AO lifecycle-worker backfill failures: stale worktrees, branch conflicts, claim_failed errors, and orphaned session metadata.
Manages git worktree lifecycle: creation, diagnostics, state transitions, and recovery from stuck or corrupt worktrees. Connects to a broader task scaffolding flow.
Troubleshoots execute command failures with recovery guides for phase errors, parallel agent issues, merge conflicts, worktree problems, and resuming execution.