-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(gateway): no pairing code shown when running gateway start on alternate port #5266
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinggatewayAuto scope: src/gateway/** changed.Auto scope: src/gateway/** changed.onboardAuto scope: src/onboard/** changed.Auto scope: src/onboard/** changed.priority:p1High priorityHigh priorityrisk: highAuto risk: security/runtime/gateway/tools/workflows.Auto risk: security/runtime/gateway/tools/workflows.securityAuto scope: src/security/** changed.Auto scope: src/security/** changed.security: pairingAuto module: security/pairing changed.Auto module: security/pairing changed.status:acceptedRFC or work item accepted and ratified by the team.RFC or work item accepted and ratified by the team.status:no-staleExempt from the 60-day stale auto-close policy.Exempt from the 60-day stale auto-close policy.
Milestone
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggatewayAuto scope: src/gateway/** changed.Auto scope: src/gateway/** changed.onboardAuto scope: src/onboard/** changed.Auto scope: src/onboard/** changed.priority:p1High priorityHigh priorityrisk: highAuto risk: security/runtime/gateway/tools/workflows.Auto risk: security/runtime/gateway/tools/workflows.securityAuto scope: src/security/** changed.Auto scope: src/security/** changed.security: pairingAuto module: security/pairing changed.Auto module: security/pairing changed.status:acceptedRFC or work item accepted and ratified by the team.RFC or work item accepted and ratified by the team.status:no-staleExempt from the 60-day stale auto-close policy.Exempt from the 60-day stale auto-close policy.
Type
Projects
Status
In Progress
Summary
When running
zeroclaw gateway start -p <port>on a non-default port (e.g. for testing), the startup banner shows:...but no pairing code is displayed. The
get-paircode --newcommand also fails because it tries to reach the gateway on the default config port, not the one specified via-p.Root cause
The gateway shares
~/.zeroclaw/config state. If a device has already paired on the default port,pairing_code()returnsNoneon alternate-port instances (since the pairing state shows "already paired"). But the browser on the new port has no bearer token, so the user is stuck at the pairing screen with no code to enter.The only workaround is:
Expected behavior
Either:
gateway start -p <port>should print a fresh pairing code when the port differs from config, ORget-paircode --newshould accept a--portflag to target the correct instance, ORcurlcommand as a fallback when no code is availableReproduction
Environment