HKUDS/nanobot · error · RuntimeError
GitHub Copilot is not logged in. Run: nanobot provider login
Error message
GitHub Copilot is not logged in. Run: nanobot provider login github-copilot
What it means
Error "GitHub Copilot is not logged in. Run: nanobot provider login github-copilot" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/providers/github_copilot_provider.py:215
spec=find_by_name("github_copilot"),
provider_name=provider_name,
)
async def _get_copilot_access_token(self) -> str:
now = time.time()
if self._copilot_access_token and now < self._copilot_expires_at - _EXPIRY_SKEW_SECONDS:
return self._copilot_access_token
async with self._copilot_token_lock:
# Re-check after acquiring the lock: another task may have refreshed
# the token while we were waiting.
now = time.time()
if self._copilot_access_token and now < self._copilot_expires_at - _EXPIRY_SKEW_SECONDS:
return self._copilot_access_token
github_token = _load_github_token()
if not github_token or not github_token.access:
raise RuntimeError(
"GitHub Copilot is not logged in. Run: nanobot provider login github-copilot"
)
timeout = httpx.Timeout(20.0, connect=20.0)
async with httpx.AsyncClient(timeout=timeout, follow_redirects=True, trust_env=True) as client:
response = await client.get(
_resolve("NANOBOT_COPILOT_TOKEN_URL", DEFAULT_COPILOT_TOKEN_URL),
headers=_copilot_headers(github_token.access),
)
response.raise_for_status()
payload = response.json()
token = payload.get("token")
if not token:
raise RuntimeError("GitHub Copilot token exchange returned no token.")
expires_at = payload.get("expires_at")
if isinstance(expires_at, (int, float)):View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/providers/github_copilot_provider.py:215 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/64c928faa137b987.
Report an issue: GitHub.