diff --git a/src/renderer/utils/memberHelpers.ts b/src/renderer/utils/memberHelpers.ts index 2f5b1d00..70a62df8 100644 --- a/src/renderer/utils/memberHelpers.ts +++ b/src/renderer/utils/memberHelpers.ts @@ -949,6 +949,16 @@ function getCurrentRuntimeOfflineVisualState( spawnBootstrapConfirmed: boolean | undefined, isTeamProvisioning: boolean | undefined ): MemberLaunchVisualState { + // The team lead's runtime is tracked via config.leadSessionId, not as a + // spawned runtime process. In the OpenCode adapter path, + // buildTeamAgentRuntimeSnapshot creates a synthetic runtime entry for the + // lead with alive:false (no CLI child pid) and no livenessKind — which the + // checks below would classify as stale_runtime. Skip lead entries that + // carry the lead backend marker so every team doesn't show the lead as + // "stale-runtime" permanently. + if (isLeadMember(member) && runtimeEntry?.backendType === 'lead') { + return null; + } if (runtimeEntry?.livenessKind === 'registered_only') { return 'registered_only'; }