warpdotdev/warp · error
Unexpected OAuth status
Error message
Unexpected OAuth status
What it means
The poll returned Ok with a status that is neither Completed, Failed, nor Expired (app/src/ai/agent_sdk/agent_config.rs:175 Ok(_) arm). The enum (crates/graphql/src/api/queries/get_oauth_connect_tx_status.rs:44) also has InProgress and Pending, so this arm fires when a non-terminal status is delivered as a final result or a new server variant appears that this client does not handle.
Source
Thrown at app/src/ai/agent_sdk/agent_config.rs:175
ctx.terminate_app(
TerminationMode::ForceTerminate,
Some(Err(anyhow::anyhow!(
"GitHub authorization failed. Please try again."
))),
);
}
Ok(OauthConnectTxStatus::Expired) => {
ctx.terminate_app(
TerminationMode::ForceTerminate,
Some(Err(anyhow::anyhow!(
"GitHub authorization expired. Please try again."
))),
);
}
Ok(_) => {
ctx.terminate_app(
TerminationMode::ForceTerminate,
Some(Err(anyhow::anyhow!(
"Unexpected OAuth status"
))),
);
}
Err(err) => {
ctx.terminate_app(
TerminationMode::ForceTerminate,
Some(Err(anyhow::anyhow!(
"Error polling OAuth status: {err}"
))),
);
}
}
});
}
(Some(auth_url), None) => {
println!("\nAuthorize access here: {auth_url}\n");
println!("After authorizing, please re-run this command.");View on GitHub (pinned to e72fd7aacb)
Solutions
- Update to a current Warp build so the client handles the status set the server emits
- Re-run the command — transient non-terminal statuses usually resolve to a terminal one
- If reproducible, capture the actual status value and report it
Defensive patterns
Strategy: retry
Type guard
fn oauth_status_is_terminal(status: &OauthConnectTxStatus) -> bool {
matches!(status, OauthConnectTxStatus::Completed
| OauthConnectTxStatus::Failed
| OauthConnectTxStatus::Expired)
} Prevention
- Keep the client build current so newly added server status variants are handled
- Poll until a terminal status rather than treating the first Ok result as final
When it happens
Trigger: The GraphQL operation returns the transaction status in one shot (no subscription loop) while it is Pending or InProgress; or the server adds a new OAuthConnectTxStatus variant that an older client build cannot match.
Common situations: Client/server version skew after a server rollout; race where the tx is still Pending at first poll but the code treats one poll result as terminal.
Related errors
- Exceeded maximum number of authorization attempts ({}). Plea
- GitHub authorization failed. Please try again.
- GitHub authorization expired. Please try again.
- Error polling OAuth status: {err}
- Cannot list agents: authorization required but no auth flow
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/1feadc4dd53e0cb5.
Report an issue: GitHub.