Restart Oro

Nuke all oro processes, clean stale state, rebuild, relaunch, then continuously monitor the swarm — catching errors, tracking tas…

mraakashshah 4 updated 1mo ago
Claude CodeGeneric
View source ↗
# Restart Oro

Nuke all oro processes, clean stale state, rebuild, relaunch, then continuously monitor the swarm — catching errors, tracking task progress, and filing P0 bugs.

Execute these phases in order. Do NOT skip steps. Report status after each phase.

## Phase 1: Kill Everything

```bash
# Kill tmux session (swarm UI)
tmux kill-session -t oro 2>/dev/null || true

# Kill dispatcher and workers
./oro cleanup 2>&1 || true

# Belt and suspenders: kill any strays
pkill -f "oro start" 2>/dev/null || true
pkill -f "oro worker" 2>/dev/null || true

Verify nothing remains:

ps aux | grep -E '[o]ro (start|worker|dispatch)' | head -5
tmux list-sessions 2>&1

Phase 2: Verify Clean State

All cleanup is handled by oro cleanup in Phase 1. This phase only verifies.

git worktree list
git branch | grep agent/ || echo "No stale agent branches"
ls .worktrees/ 2>/dev/null || echo "No worktree directory"

Phase 3: Build

make build 2>&1

If build fails, STOP and report the error. Do not proceed to Phase 4.

Phase 4: Launch

./oro start 2>&1

The "open terminal failed: not a terminal" error is expected (no TTY in Bash tool). The dispatcher should still start. Verify:

sleep 5 && ./oro status 2>&1

Confirm dispatcher is running before proceeding.

Phase 5: Continuous Monitoring

Run an indefinite monitoring loop. Each cycle is 30 seconds apart. Continue until the user says stop or context runs low.

Each cycle, collect

./oro status 2>&1
./oro logs 2>&1 | tail -30
tmux capture-pane -t oro:manager -p 2>&1 | tail -20

Failure patterns to watch for

Pattern Meaning
goroutine_panic or panic stack Active incident — capture stack, file/fix, restart after merge
worktree_error repeating Infinite retry bug — stale branch/worktree
missing_acceptance repeating Assignment spam — task has no AC
qg_retry_escalated Quality gate exhausted — worker stuck
merge_conflict without merge_conflict_resolved Unresolved merge conflict
escalation_failed Manager unreachable — tmux pane may be dead
Workers stuck at 0 for >60s Workers not spawning or connecting
Dispatcher state not running Dispatcher crashed or stopped
Panic/fatal in tmux panes Agent crash
Same task assigned >3 times in logs Assignment loop
heartbeat stops for a worker Worker process died

What to do when you find issues

  1. Log spam (repeating errors): Count occurrences and report the pattern. If >5 of the same error in one cycle, flag it prominently.
  2. Stuck workers: Report which worker and task are stuck, how long, and what the last log entry was.
  3. Crashes/panics: Capture the full error from logs or the tmux pane. Report immediately — don't wait for next cycle. If restart_count increases or the panic repeats, stay on 60-second incident cadence until a fix is merged, rebuilt, and restarted.
  4. Task progress: Track which tasks are assigned, which complete (watch for merged events), and which are stuck. Report progress deltas between cycles.
  5. P0 bugs: If you observe a new systemic issue (not a one-off), create a task: oro task create --title="P0: <description>" --type=bug --priority=0

Reporting

Every cycle, give a brief status line (one line unless there's a problem):

[cycle N] OK — 2 workers, oro-js7.4 in progress, oro-jmil.6 merged

Expand only when something changes or goes wrong:

[cycle N] ISSUE — worktree_error for oro-abc repeated 8 times in 30s
  Action: filed P0 task oro-xyz

Context management

At 40% context usage, switch to summary mode: only report changes and errors, skip routine OK cycles. At 60%, create a handoff and stop monitoring. ```

Maintain Restart Oro?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Restart Oro on getagentictools](https://getagentictools.com/loops/mraakashshah-restart-oro?ref=badge)