Repository navigation
Agent status C2: recover turns when completion goes missing - #21056
brennanb2025 wants to merge 11 commits into
Conversation
Review and validation handoff — 2026-09-16Draft / not merge-ready. Published at the user's request before review/QA completion. Published head: What has been doneIndependent review-and-fix traced provider/reducer/relay/PTY teardown paths; fixed anonymous-child rebinding, interrupt markers, exact unregister, exit observation after dismissal and reconcile-before-cleanup ordering. Focused tests and type/lint checks were reported passing. These are recorded worker/reviewer results from the stated revisions, not a fresh coordinator rerun, CI result, or blanket approval of today's PR head. Recovery/review workers used GPT-5.6 Sol xhigh; provider interruptions prevented some follow-up stages from finishing. What still needs to be doneResolve owner-registration/binding, provider producer/terminal-record delivery, authoritative execution observation, canonical host projection/replication and restart-durability dependencies. Full end-to-end acceptance failed. Final-head integration review and fresh Electron QA are outstanding. Before marking ready: address proven findings, reconcile current main and cross-batch overlap, complete independent review of the final diff, rerun relevant tests/typechecks/quality, and perform fresh manual Electron QA against that exact head. Use background/hidden CDP validation; unavailable auth/platform scenarios remain explicitly unverified. No successful final-head review or QA should be inferred from old report filenames or task completion labels. Related batch PRsC1: #21053 · C10: #21054 · C2: #21056 · C3: #21055 · C4: #21057 · C5: #21058 · C6: #21059 · C7: #21060 The remaining full-batch work stays open; opening this draft does not mark those requirements complete. |
Main integration update
Checks rerun on this head: 7 focused test files / 71 tests passed; Still blocked from merge readiness: no production owner registration, provider inventory/terminal-record queries, bounded recovery scheduler, final status publication, or restart re-derivation; live SSH/Windows/provider-drop cases and final Electron/mobile QA remain unverified. This conflict resolution composes two status-lifecycle changes and needs fresh independent review; the PR remains draft. |
|
Closing this draft from the September 14 agent-status plan. That plan was re-examined against current main and replaced. This branch conflicts with main, and its central work duplicated contracts that had already merged (the canonical status store and the child-work contract landed on 15–16 September). The replacement work is being done as smaller root-cause PRs, each planned, challenged and reviewed first. |
This draft builds the part of Orca that can recover when an agent finishes but its final completion signal never arrives. It ties each piece of provider evidence to a specific run and turn, keeps child tasks and long-running background work separate, and preserves an honest unknown outcome when the available evidence cannot prove success or failure.
It is not yet an end-to-end fix for the visible stuck spinner. The production launch, provider-query, execution-observation, and status-publication paths described below still need to connect this work before the UI can rely on it.
What changes
User-facing before / after
Issues
Fully addressed by this PR
None. These reports remain open because this draft provides the shared handling and regression cases but does not yet connect every production evidence source and reader. No issue should be auto-closed from this PR.
Partially addressed; still open
The broader C2 roster also includes launch, freeze, crash, output-delivery, title-identity, and conversation-list symptoms. This PR does not claim those are turn-recovery bugs; each still needs its own reproduced cause and acceptance test.
Why this approach
The status should follow evidence about a particular turn, not the continued existence of a terminal or agent process. A live CLI can be idle after finishing, so process presence cannot keep Working true. A timeout can hide the symptom but may mark real long-running work finished, and waiting for the next prompt leaves the final turn stuck forever. Treating a later turn as proof that an older turn succeeded would also invent an outcome.
Instead, the execution host reduces attributable provider events and complete snapshots for the exact run and turn. Missing evidence stays unknown, and every recovery attempt ends through a verified result, a bounded expiry, or explicit abandonment. This matches the useful part of the inspected reference mechanisms—host-owned, turn-keyed events with explicit recovery—while deliberately retaining uncertainty where Orca's providers do not yet expose a complete queryable record.
Scope, dependencies, and overlap
live/unverifiable/exitedobservations and the bounded host scheduler.Review and validation status
Draft / not merge-ready. Earlier independent review found the production wiring and restart gaps above. Merging current
origin/mainresolved conflicts by preserving main's structured-session status store and listing behavior while keeping provider turn evidence ahead of legacy presentation filtering; this integration needs fresh independent review because it composes two status-lifecycle changes.Checks rerun on merged head
0970c7149848023bcc06f281259bc0e27129c929againstorigin/main383c543e0f6651a6c2d99ecca5ab43fbedd1bee8:pnpm tc:node,pnpm tc:web, andpnpm tc:clipassed.pnpm run check:code-quality:changed, formatting hooks, lint hooks, and diff/conflict-marker checks passed.Not performed on this revision: live provider drop/recovery, direct-SSH interruption, Windows/WSL execution, restart/replay, independent final review, or Electron/mobile UI QA. No UI code changed in the conflict resolution, and no rendered behavior is claimed from the unit and type checks.