Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ private async Task StartWizardAsync()
{
_errorState = false;
HideRecoveryActions();
await DisconnectAsync();
// Cancel any in-progress server-side wizard session before starting a
// fresh one, so the gateway doesn't reject wizard.start with "wizard
// already running" when recovering from a previous error.
await CancelCurrentSessionAsync();
ClearConsoleBanner();
_sessionId = "";
_wizardStepCount = 0;
Expand Down Expand Up @@ -757,7 +760,10 @@ private async Task EnterWizardErrorAsync(string detail)
return;

_errorState = true;
await DisconnectAsync();
// Cancel the server-side wizard session before disconnecting so that
// subsequent retries (Start wizard again / Skip wizard) don't hit a
// "wizard already running" error from a lingering gateway session.
await CancelCurrentSessionAsync();
ShowError(detail);
}

Expand Down