-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
iOS LAN pairing drops bootstrap handoff token before chat reconnect #98064
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
The iOS app can appear paired to a LAN Gateway after scanning
/pair qr, but the next node/chat connection is rejected withtoken_missing. The setup bootstrap is accepted once, then the app reconnects without any gateway auth token.Real environment observed
2026.6.11-beta.2on Windows, LAN bind0.0.0.0:18889, token auth enabledOpenClaw/1/openclaw-iosnode clientv2026.6.10/pair qrgenerated a LAN WebSocket URL likews://192.168.50.164:18889with a bootstrap tokenDisconnected/not connectedUser-visible symptom
After scanning the pairing QR, the app looks partly connected because the Control/Gateway card is online, but Chat cannot connect and the Gateway still reports that a token is required.
Source-level repro on current main
ws://192.168.50.164:18889and abootstrapToken.ws://setup codes.GatewayChannel.shouldPersistBootstrapHandoffTokens()only persists bootstrap-issued device tokens forwss://or loopback URLs.ws://192.168.x.x, the iOS client does not persist the issued node/operator device tokens.token_missing.Log evidence
Redacted Gateway log sequence from the real repro:
Expected behavior
If iOS accepts private LAN
ws://setup codes, the successful bootstrap handoff should persist the bounded device tokens issued by the Gateway so subsequent node/chat reconnects can authenticate without reusing the spent bootstrap token.Actual behavior
The bootstrap handoff succeeds once, but the device token is not persisted for private LAN
ws://URLs. The next reconnect hasauth=noneand the app remains disconnected from Chat.Scope / non-goals
wss://and loopback.ws://token persistence with the setup-code hosts the iOS app already accepts.Proposed fix
Allow
GatewayChannel.shouldPersistBootstrapHandoffTokens()to persist bootstrap handoff tokens when the active URL isws://and the host is local-network scoped according toLoopbackHost.isLocalNetworkHost. Add a Swift regression test for a private LAN URL and keep the existing publicws://example.invalidnon-persistence test.