agent-ecosystem/test/main/services
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
..
analysis feat: enhance task change retrieval with additional options 2026-03-04 15:22:59 +02:00
discovery fix(scanner): preserve message count in light metadata 2026-04-11 09:07:25 +03:00
editor feat: enhance notification and task management features 2026-03-02 18:17:57 +02:00
extensions feat(frontend): improve runtime connection and team setup ux 2026-04-11 19:55:25 +03:00
infrastructure feat(graph-controls): add team page and task creation buttons, improve toolbar button styles 2026-04-13 18:36:44 +03:00
parsing feat: color badges for subagent types with .claude/agents/ config support 2026-02-21 13:52:59 -03:00
runtime fix: harden provider-aware cli env handling 2026-04-12 13:18:49 +03:00
schedule fix: harden provider-aware cli env handling 2026-04-12 13:18:49 +03:00
team fix(team): resolve stuck "reconciling" state and skip resume when teammates never spawned (#55) 2026-04-14 18:31:09 +03:00