Orchestrator killed by tmux/host death has no path back to its own history — only recovery action is a cold, unlinked respawn
Bug
When a project orchestrator's TUI runtime dies (host reboot, OS kill, tmux server loss), the only recovery actions reachable today discard its conversation history — even though that history is fully intact on disk (confirmed live: a 1.7MB Claude Code transcript survives untouched after the reboot) and the daemon already has a working resume mechanism (RestoreWithMode → GetRestoreCommand → RestoreIdentity) that's simply never invoked by the orchestrator-recovery flow. SpawnOrchestrator(clean=true) always spawns a brand-new session with no AgentSessionID carried forward from the retired one, and neither the topbar "Orchestrator" button nor RestoreUnavailableDialog ever attempt a real restore before discarding.
Basically when I swtiched to the terminal to talk to the orchastrator and restarted my pc,the tmux session is cleared and with that my chat was also gone,so I couldnt go back to the original orchastrator chat
Reproduction
- Run a project orchestrator (TUI, Claude Code) with real conversation history.
- Reboot the host without a graceful
POST /shutdown(kills the tmux server backing the orchestrator's PTY). - On next boot the orchestrator is still
isTerminated: falsebut permanently unattachable. Kill/ clean-respawn (POST /api/v1/orchestrators {"clean":true}) both 500 today — tracked in #4481/PR #4482.- Even once that's fixed: the only recovery affordances (topbar "Orchestrator" button,
RestoreUnavailableDialog's "create new orchestrator") callspawnOrchestrator(..., clean=true), which always creates a new session/conversation id — never attemptsPOST /sessions/{id}/restoreagainst the just-retired orchestrator.
Acceptance Criteria
- [ ] After a dead-runtime orchestrator is retired via clean respawn, AO attempts to resume its native conversation (the existing
RestoreWithMode/GetRestoreCommandmechanism) before falling back to a fresh spawn. - [ ] If resume succeeds, the user lands back in the same conversation with full history intact.
- [ ] If resume genuinely fails, the user is explicitly told the respawn started cold (extending the existing
orchestratorRetireNoticemechanism) instead of silently swapping in a blank coordinator. - [ ] A "restore instead of replace" action is reachable from the actual orchestrator-recovery UI (topbar button /
RestoreUnavailableDialog), not only from the Archived Sessions list.
Related
- #4481 / PR #4482 — prerequisite mechanical fix (Kill/RetireForReplacement 500 on dead runtime).
- #2501 — same underlying gap (orchestrator respawn with no linkage/notification), different trigger (probe race vs. host-level runtime death).
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @somewherelostt
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @somewherelostt here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
Ill add this issue to the whole tmux overhaul on the linux version
Turns out even after changing the terminal backend this issue persists for all provides who does not have a chat option so I made a pr which fixed a buggy loop which was blocking terminal restart and added a new session which calls chat history to get the conversation back @somewherelostt
Assigned to @codebanditssss (Pls review the #4721)
the issue is valid but partly overlaps #4776: ao already has same-session restore support and promptless orchestrator relaunch coverage, but clean replacement and the recovery dialog still discard the old orchestrator by spawning a new id. the reboot path is also blocked when tmux reports an absent socket as an inconclusive probe, so reconciliation never reaches restore. the solution should classify that specific post-reboot socket absence as runtime unavailable, attempt native resume or same-session fresh relaunch first, and show an explicit cold-start notice only after resume fails. pr #4721 covers the missing recovery flow; pr #4859 covers the shared tmux probe gap.