{"record":{"id":"5e7a93fb79037bc3","repo":"HKUDS/nanobot","slug":"github-device-code-expired-please-run-login-again","errorCode":null,"errorMessage":"GitHub device code expired. Please run login again.","messagePattern":"GitHub device code expired\\. Please run login again\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/providers/github_copilot_provider.py","lineNumber":141,"sourceCode":"            )\n            poll.raise_for_status()\n            poll_payload = poll.json()\n\n            access_token = poll_payload.get(\"access_token\")\n            if access_token:\n                token_expires_in = int(poll_payload.get(\"expires_in\") or _LONG_LIVED_TOKEN_SECONDS)\n                break\n\n            error = poll_payload.get(\"error\")\n            if error == \"authorization_pending\":\n                time.sleep(current_interval)\n                continue\n            if error == \"slow_down\":\n                current_interval += 5\n                time.sleep(current_interval)\n                continue\n            if error == \"expired_token\":\n                raise RuntimeError(\"GitHub device code expired. Please run login again.\")\n            if error == \"access_denied\":\n                raise RuntimeError(\"GitHub device flow was denied.\")\n            if error:\n                desc = poll_payload.get(\"error_description\") or error\n                raise RuntimeError(str(desc))\n            time.sleep(current_interval)\n        else:\n            raise RuntimeError(\"GitHub device flow timed out.\")\n\n        user = client.get(\n            user_url,\n            headers={\n                \"Authorization\": f\"Bearer {access_token}\",\n                \"Accept\": \"application/vnd.github+json\",\n                \"User-Agent\": USER_AGENT,\n            },\n        )\n        user.raise_for_status()","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/providers/github_copilot_provider.py#L123-L159","documentation":"Error \"GitHub device code expired. Please run login again.\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/providers/github_copilot_provider.py:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}