HKUDS/nanobot · error · RuntimeError
GitHub device code expired. Please run login again.
Error message
GitHub device code expired. Please run login again.
What it means
Error "GitHub device code expired. Please run login again." thrown in HKUDS/nanobot.
Source
Thrown at nanobot/providers/github_copilot_provider.py:141
)
poll.raise_for_status()
poll_payload = poll.json()
access_token = poll_payload.get("access_token")
if access_token:
token_expires_in = int(poll_payload.get("expires_in") or _LONG_LIVED_TOKEN_SECONDS)
break
error = poll_payload.get("error")
if error == "authorization_pending":
time.sleep(current_interval)
continue
if error == "slow_down":
current_interval += 5
time.sleep(current_interval)
continue
if error == "expired_token":
raise RuntimeError("GitHub device code expired. Please run login again.")
if error == "access_denied":
raise RuntimeError("GitHub device flow was denied.")
if error:
desc = poll_payload.get("error_description") or error
raise RuntimeError(str(desc))
time.sleep(current_interval)
else:
raise RuntimeError("GitHub device flow timed out.")
user = client.get(
user_url,
headers={
"Authorization": f"Bearer {access_token}",
"Accept": "application/vnd.github+json",
"User-Agent": USER_AGENT,
},
)
user.raise_for_status()View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/providers/github_copilot_provider.py:141 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/5e7a93fb79037bc3.
Report an issue: GitHub.