openai/codex · error · io::Error
NotFound
NotFound
Error message
device code login is not enabled for this Codex server. Use the browser login or verify the server URL.
What it means
Error "device code login is not enabled for this Codex server. Use the browser login or verify the server URL." thrown in openai/codex.
Source
Thrown at codex-rs/login/src/device_code_auth.rs:84
client_id: &str,
) -> std::io::Result<UserCodeResp> {
let url = format!("{auth_base_url}/deviceauth/usercode");
let body = serde_json::to_string(&UserCodeReq {
client_id: client_id.to_string(),
})
.map_err(std::io::Error::other)?;
let resp = client
.post(url)
.header("Content-Type", "application/json")
.body(body)
.send()
.await
.map_err(std::io::Error::other)?;
if !resp.status().is_success() {
let status = resp.status();
if status == StatusCode::NOT_FOUND {
return Err(io::Error::new(
io::ErrorKind::NotFound,
"device code login is not enabled for this Codex server. Use the browser login or verify the server URL.",
));
}
return Err(std::io::Error::other(format!(
"device code request failed with status {status}"
)));
}
let body = resp.text().await.map_err(std::io::Error::other)?;
serde_json::from_str(&body).map_err(std::io::Error::other)
}
/// Poll token endpoint until a code is issued or timeout occurs.
async fn poll_for_token(
client: &HttpClient,
auth_base_url: &str,View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/login/src/device_code_auth.rs:84 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/e2a2059d86bb16cf.
Report an issue: GitHub.