agent-ecosystem/test/main
Diego Serrano 080e0af55a
fix(team): resolve stuck "reconciling" state and skip resume when teammates never spawned (#55)
* fix(team): resolve stuck "reconciling" state and skip resume when teammates never spawned

Addresses #54.

When a team launch fails to bootstrap teammates, the team gets stuck showing
"Last launch is still reconciling" indefinitely, and retrying with --resume
reconnects the lead but does not re-spawn the dead teammates. The only
workaround was enabling "Clear context (fresh session)", which loses the
lead's prior conversation context.

Two root causes addressed:

1. createPersistedLaunchSnapshot counted members still in 'starting' state
   (agentToolAccepted=false) as 'pending' regardless of launchPhase. When
   launchPhase was 'finished' with never-spawned members, the aggregate
   state stayed as 'partial_pending' forever, rendered as "still reconciling".
   Fix: when launchPhase != 'active', promote such members to
   'failed_to_start' so the aggregate becomes 'partial_failure'
   ("Launch failed partway"), which correctly signals a terminal state.

2. TeamProvisioningService._launchTeamInner always used --resume when a
   previous leadSessionId existed, even if the previous launch had no
   teammates successfully spawned. The CLI's deterministic reconnect path
   restores lead context but does not re-spawn dead teammates, so the team
   stays broken across relaunches. Fix: before adding --resume, read the
   persisted launch state. If every expected teammate is 'starting' (never
   spawned) or 'failed_to_start', skip --resume so the CLI performs a full
   fresh bootstrap that spawns all teammates.

Verified manually on Linux: a team stuck in "still reconciling" correctly
transitions to "failed partway" after the first fix, and the next Launch
(without "Clear context") fully bootstraps and brings teammates online.

* fix(team): narrow skip resume to never-spawned teammates

---------

Co-authored-by: 777genius <quantjumppro@gmail.com>
2026-04-14 18:31:09 +03:00
..
build feat(frontend): improve runtime connection and team setup ux 2026-04-11 19:55:25 +03:00
http feat(team): add bootstrap recovery and app integration 2026-04-07 00:43:38 +03:00
ipc feat(activity-detail): implement task activity detail retrieval and UI integration 2026-04-13 19:19:52 +03:00
services fix(team): resolve stuck "reconciling" state and skip resume when teammates never spawned (#55) 2026-04-14 18:31:09 +03:00
utils feat(graph-controls): add team page and task creation buttons, improve toolbar button styles 2026-04-13 18:36:44 +03:00