Skip to content

GitHub Copilot auth timed out #724

Closed

Description

@FireBelow

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:~$`

Activity

  1. clawsweeper commented on Jun 8, 2026

    @clawsweeper

    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

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    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

    • Question: Should this repository own a Windows-side recovery improvement, or should the root device-auth polling and expiry fix be routed to the bundled upstream OpenClaw CLI/gateway implementation?
    • Rationale: Current documentation establishes that the gateway owns wizard state, while the observed transcript comes from the direct OpenClaw CLI; maintainer knowledge is needed to identify the authoritative implementation and avoid creating a second authentication path.
    • Likely owner: samanthamsong — They own the active provider-onboarding tracking scenario and explicitly restored this issue as a distinct work item.
    • Options:
      • Reproduce and route the root fix (recommended): Reproduce both direct CLI and gateway-driven wizard authentication, then fix the authoritative polling state machine while keeping Windows recovery UI as a fallback.
      • Consolidate with the earlier report: Treat Copilot Github auth doesn't complete #654 as canonical only if current reproduction proves that missed completion and expiry continuation share one root cause and one fix.
    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:

    • The failing state may be owned by the bundled upstream OpenClaw CLI or gateway rather than the Windows rendering layer, so a repository-local change could mask rather than correct the authentication state machine.
    • The relationship with Copilot Github auth doesn't complete #654 remains uncertain: both involve missing completion detection, but this issue uniquely records expiry followed by apparent fail-open credential use.
    • Closing without current-head runtime proof could discard a first-run blocker that currently requires a 15-minute wait and gateway restart.

    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:

    • Detailed observed failure: The reporter supplied a complete OpenClaw 2026.6.1 CLI transcript showing device-code expiry, configuration continuing into model selection, and chat becoming usable only after a gateway restart.
    • Current wizard boundary: Current onboarding documentation says the gateway controls wizard steps and the Windows client renders them, while client-side recovery choices can restart the gateway or open the terminal; this does not prove the underlying direct CLI Copilot polling path is fixed. (docs/ONBOARDING_WIZARD.md, 77c42440376e)
    • Related wizard fix is narrower: Merged pull request Refine gateway setup wizard UX and fix accessibility gaps #940 updates the stale step identifier after expanding provider choices, including Copilot selection, but its described fix does not address device-code completion polling, expiry handling, or credential activation. (src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs, 87634727b65b)
    • Maintainer-directed tracking remains active: The collaborator-authored epic 🦞 Tracking: Onboard the channels & providers I use #836 deliberately retains this issue and Copilot Github auth doesn't complete #654 as separate provider-onboarding child items; samanthamsong also reopened this issue on July 13, 2026.
    • Latest release does not establish resolution: The supplied latest-release provenance is v0.6.12 at 4166e0f, but no matching release note, test, merged fix, or current-main runtime proof demonstrates corrected Copilot device-auth completion and expiry behavior. (4166e0fd63f8)
    • Maturity label not established: No reliable M4/M5 taxonomy match was established for this specific GitHub Copilot authentication path, so maturity:stable is not selected.

    Likely related people:

    • samanthamsong: Authored the provider-onboarding epic that retains this report as a distinct child and explicitly reopened this issue after its brief closure. (role: scenario and tracking owner; confidence: high)
    • karkarl: Authored the recent merged wizard/provider-selection work in pull request 940, including the Copilot-related step-state correction in WizardPage. (role: recent setup-wizard contributor; confidence: medium; commits: 87634727b65b; files: src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs, docs/ONBOARDING_WIZARD.md)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2
    impact:auth-provider
    issue-rating: 🦐 gold shrimp
    clawsweeper:needs-info
    clawsweeper:no-new-fix-pr
    clawsweeper:needs-maintainer-review
    on Jun 8, 2026
  3. github-actions commented on Jun 14, 2026

    @github-actions
    Contributor

    🤖 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.

    Generated by 🌈 Repo Assist, see workflow run. Learn more.

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a
    
  4. moved this from Backlog to Channels in Windows Companion Appon Jul 13, 2026
  5. closed this as completedby moving to Channels in Windows Companion Appon Jul 13, 2026
  6. added
    P0
    impact:ux-release-blocker
    issue-rating: 🦪 silver shellfish
    and removed
    P2
    issue-rating: 🦐 gold shrimp
    clawsweeper:needs-info
    on Jul 13, 2026
  7. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  8. FireBelow commented on Jul 28, 2026

    @FireBelow
    Author

    I need to wait 4 days (until the new month) to test again

  9. bkudiess commented on Jul 29, 2026

    @bkudiess
    Collaborator

    Thanks for the detailed transcript. This occurred on OpenClaw 2026.6.1 and strongly matches the GitHub Copilot device-flow polling bug fixed by openclaw/openclaw#109740, first proven in v2026.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.

  10. locked as resolved and limited conversation to collaborators on Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0clawsweeper:needs-maintainer-reviewclawsweeper:no-new-fix-primpact:auth-providerimpact:ux-release-blockerissue-rating: 🦪 silver shellfish

    Type

    No type

    Fields

    Priority

    Medium

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions