Repository navigation
Description
This is related to issue #654 but I think I found a new bug.
I ran openclaw configure --section model again and this time was creating a github issue to document the issues I was having. However, while I was writing a summary, the device code auth expired and when it did, I was able to get past the device auth and got to a new menu that allowed me to select which models I wanted to use and then complete the configuration update.
The model selection isn't as important as the auth flow was allowed to continue with the device auth I completed days ago but still wasn't working.
I think this timeout bug actually helped me get unblocked and I'm hoping the bot can find the source. After I restarted my gateway, chat worked for the first time since I installed openclaw.
`openclaw@COMPUTER:~$ openclaw configure --section model
│
◇
🦞 OpenClaw 2026.6.1 (...) — I'm the assistant your terminal demanded, not the one your sleep schedule requested.
┌ OpenClaw configure
│
◇ Existing config detected ──────────────╮
│ │
│ Workspace: ~/.openclaw/workspace │
│ Model: github-copilot/claude-opus-4.7 │
│ Gateway: local via loopback on :18789 │
│ Node manager: npm │
│ │
├─────────────────────────────────────────╯
│
◇ Model/auth provider
│ More…
│
◇ Model/auth provider
│ Copilot
│
◇ Copilot auth method
│ GitHub Copilot
│
◇ GitHub Copilot auth already exists. Re-run login?
│ Yes
│
◇ GitHub Copilot ─────────────────────────────────────────────╮
│ │
│ This will open a GitHub device login to authorize Copilot. │
│ Requires an active GitHub Copilot subscription. │
│ │
├──────────────────────────────────────────────────────────────╯
│
◇ Authorize GitHub Copilot ────────────────────────────────────────────────────────────╮
│ │
│ Open this URL in your browser and enter the code below. │
│ URL: https://github.com/login/device │
│ Code: │
│ Code expires in 15 minutes. Never share it. │
│ │
│ If a browser does not open automatically after you continue, copy the URL manually. │
│ │
├───────────────────────────────────────────────────────────────────────────────────────╯
│
◇ GitHub Copilot ─────────────────────────────────────────────────╮
│ │
│ The GitHub device code expired. Retry login to get a new code. │
│ │
├──────────────────────────────────────────────────────────────────╯
│
│
◇ Models in /model picker (multi-select)
│ 24 items selected
Updated config: ~/.openclaw/openclaw.json
Backup: ~/.openclaw/openclaw.json.bak
│
└ Configuration updated.
openclaw@COMPUTER:~$`
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsChannels
Activity
clawsweeper commentedon Jun 8, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 13, 2026, 7:57 PM ET / 23:57 UTC.
Summary
Keep open: this issue documents a distinct expiry-path failure during first-use Copilot authentication, and neither current main nor the latest release provides high-confidence evidence that completed direct CLI device authorization is now detected promptly or that expiration no longer continues with stale credentials. The collaborator-owned onboarding epic still tracks this report separately, and a collaborator explicitly reopened it on July 13, 2026.
Reproducibility: no. there is not yet a high-confidence current-main reproduction. The issue has a strong OpenClaw 2026.6.1 transcript and a related report, but no current v0.6.12 or main-head run proving whether direct CLI completion detection, expiry behavior, and post-auth gateway activation still fail.
Ways to help us reproduce this
Next step
A maintainer should identify the authoritative upstream or Windows-owned authentication path and sponsor a two-entry-point live reproduction before implementation; the existing no-new-fix-pr and maintainer-review signals make an autonomous repository-local patch unsafe.
Maintainer decision needed
Review details
Best possible solution:
Make the owning Copilot auth state machine recognize completed device authorization promptly, retry or stop cleanly on expiry rather than accepting stale state, activate the credential without a gateway restart, and retain visible in-product retry/recovery controls with current-head proof through both direct CLI and gateway-driven wizard entry points.
Do we have a high-confidence way to reproduce the issue?
No, there is not yet a high-confidence current-main reproduction. The issue has a strong OpenClaw 2026.6.1 transcript and a related report, but no current v0.6.12 or main-head run proving whether direct CLI completion detection, expiry behavior, and post-auth gateway activation still fail.
Is this the best way to solve the issue?
Unclear until ownership is established. The narrowest maintainable solution is to correct the authoritative upstream Copilot device-auth polling and expiry state machine, not to add a competing Windows-only authentication implementation.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 77c42440376e.
Label changes
Label justifications:
P0: A first-time user could not complete provider setup or reach a working chat session without waiting for expiry and manually restarting the gateway.impact:auth-provider: The failure concerns GitHub Copilot device authorization, credential recognition, and provider activation.impact:ux-release-blocker: The reported first-use path had no timely in-product recovery and required a long wait plus gateway restart before the product became usable.Evidence reviewed
What I checked:
docs/ONBOARDING_WIZARD.md, 77c42440376e)src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs, 87634727b65b)Likely related people:
src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs,docs/ONBOARDING_WIZARD.md)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.github-actions commentedon Jun 14, 2026
🤖 This is an automated response from Repo Assist.
Thanks for sharing this — the expired-device-code behavior you observed is a helpful diagnostic. Here's what most likely happened:
When you first ran
openclaw configure --section model, you completed the browser authorization, but the CLI's polling loop didn't detect the completion and timed out. The gateway may have stored the completed Copilot credential on the first authorization, but the active CLI session was stuck waiting for a callback that never arrived.When the device code expired 15 minutes later, the gateway's expired-code handling likely fell through to a "check what's already authenticated" path, found the cached credential from your earlier browser auth, and allowed the flow to continue to model selection.
This is a fail-open behavior in the gateway's GitHub Copilot auth flow — the expiry case effectively unblocks a stuck session. While it happened to work as a workaround here, the correct behavior would be for the polling loop to detect browser auth completion without requiring a timeout.
If you need to re-authenticate in the future, the workaround is: start the auth flow, complete browser auth, then wait for the device code to expire (~15 minutes) before the CLI will continue. Restarting the gateway afterward (as you found) appears to activate the new credentials.
Add this agentic workflows to your repo
To install this agentic workflow, run
github-actions commentedon Jul 28, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updated OpenClaw Windows details or it will be closed.
FireBelow commentedon Jul 28, 2026
I need to wait 4 days (until the new month) to test again
bkudiess commentedon Jul 29, 2026
Thanks for the detailed transcript. This occurred on OpenClaw
2026.6.1and strongly matches the GitHub Copilot device-flow polling bug fixed by openclaw/openclaw#109740, first proven inv2026.7.2-beta.3.Your report includes a distinct expiry-path detail: configuration advanced only after the device code expired, and chat worked after restarting the Gateway. That sequence was not retested on a build containing the upstream fix, so we cannot claim the old transcript proves a separate Windows wizard defect.
The affected authentication flow is owned by the main OpenClaw repository, and no Windows companion code change is required for this report. We’re closing it as fixed upstream. If the same expiry or restart behavior reproduces on a containing build, please report it in openclaw/openclaw with only the exact OpenClaw version and sanitized terminal outcome.