Skip to content

Bug: onboarding Back rewinds Companion UI but not Gateway wizard session #1172

Description

@TheAngryPit

Summary

The Windows Companion onboarding wizard exposes a Back action, but it only rewinds a client-local payload history. The active Gateway wizard session is not rewound because the Companion does not send a corresponding rewind operation.

This can leave the Companion showing an earlier question while the Gateway still expects a later answer. Submitting the displayed step again can cause repeated steps, stale-session errors, connection loss, or a full wizard restart.

Steps to reproduce

  1. Start the Windows Companion local-gateway onboarding wizard.
  2. Complete at least one answer so the wizard advances to a second step.
  3. Press Back.
  4. Observe that the previous question is rendered again.
  5. Submit an answer for the displayed question.

Expected behaviour

Back should either:

  • rewind the authoritative Gateway wizard session and restore the previous step; or
  • be unavailable if the current wizard protocol cannot safely rewind.

The UI and Gateway must never disagree about the active step.

Actual behaviour

The Companion pops and re-renders a client-local payload history entry, but does not send a corresponding rewind operation to the Gateway wizard session.

This is visible in WizardPage.xaml.cs: the page pushes payloads into _stepHistory before rendering (ApplyPayloadAsync), while WizardBack_Click only pops and re-applies a previous payload. The current Core wizard RPC contract documents wizard.start, wizard.next, wizard.cancel, and wizard.status; there is no wizard.back operation.

Why this matters

The user can be shown a step that the Gateway no longer considers current. A subsequent answer can therefore be rejected as stale, repeat the flow, or force recovery to start the wizard again. This is particularly disruptive during provider or authentication setup.

Related issues

  • Related to #841, which covers losing the wizard connection across a Gateway restart. This issue is narrower: it covers the client-local Back implementation and the missing authoritative rewind.
  • Distinct from #688, which covered the installer having no Back button at all.

Environment

  • Gateway: OpenClaw 2026.8.1
  • Control UI commit observed: 9f5776e071d1
  • Release channel: Dev
  • Gateway mode: local WSL gateway
  • Windows Companion: installed build/source commit 5924d491 (local build; not claimed as an upstream release)

Evidence and proof gap

The source-level mismatch is confirmed. A runtime repro with the real Back action should additionally capture the sessionId and stepId before and after Back, plus the Gateway response when the displayed earlier step is submitted. No Tailscale cause is claimed here.

Proposed direction

Choose one authoritative design:

  1. add a supported Gateway-side rewind operation and use it from the Companion; or
  2. remove/disable Back for steps that cannot be rewound and preserve only safe recovery actions.

The Companion should not silently render stale protocol state as if it were current.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateThis issue is about session, memory, transcript, context, or agent state drift.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions