`ao start` fails when stale orchestrator session exists
Problem
When running ao start, if a previous orchestrator session exists (e.g., from a crashed or improperly terminated run), the command fails with:
Error: Failed to setup orchestrator: Session ao-orchestrator already exists but is not in a reusable state
The user must manually run tmux kill-session -t {hash}-ao-orchestrator before ao start works again.
Screenshot
Expected Behavior
ao start should handle stale orchestrator sessions gracefully:
- Auto-detect if the existing orchestrator is actually running and healthy
- If stale/dead, automatically clean it up and proceed
- Or provide a clear
--forceflag to override
Steps to Reproduce
- Run
ao start - Kill the process (Ctrl+C or terminal crash)
- Run
ao startagain - Error occurs
Environment
- OS: macOS
- tmux sessions persist after AO exit
Suggested Fix
Either:
- Default
orchestratorSessionStrategytokill-previous - Detect stale sessions (tmux exists but process unhealthy) and auto-cleanup
- Add
ao start --forceto bypass the check
Even after deleting the tmux sessions, the ao start was throwing error.
Error
Session ao-orchestrator already exists but is not in a reusable state
apple@apples-MacBook-Pro agent-orchestrator % tmux list-sessions
no server running on /private/tmp/tmux-501/default
Observation
The tmux session is gone, but the metadata file still exists. AO checks metadata files, not just tmux.
I tried reproducing the same error on my machine. But it works completely fine on my machine.
i will request you checking it again and confirm the results. If it works fine , please close the issue.