File tree Expand file tree Collapse file tree
src/OpenClaw.SetupEngine.UI/Pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ private async Task StartWizardAsync()
5656 {
5757 _errorState = false ;
5858 HideRecoveryActions ( ) ;
59- await DisconnectAsync ( ) ;
59+ // Cancel any in-progress server-side wizard session before starting a
60+ // fresh one, so the gateway doesn't reject wizard.start with "wizard
61+ // already running" when recovering from a previous error.
62+ await CancelCurrentSessionAsync ( ) ;
6063 ClearConsoleBanner ( ) ;
6164 _sessionId = "" ;
6265 _wizardStepCount = 0 ;
@@ -748,7 +751,10 @@ private async Task EnterWizardErrorAsync(string detail)
748751 return ;
749752
750753 _errorState = true ;
751- await DisconnectAsync ( ) ;
754+ // Cancel the server-side wizard session before disconnecting so that
755+ // subsequent retries (Start wizard again / Skip wizard) don't hit a
756+ // "wizard already running" error from a lingering gateway session.
757+ await CancelCurrentSessionAsync ( ) ;
752758 ShowError ( detail ) ;
753759 }
754760
You can’t perform that action at this time.
0 commit comments