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

  1. Update to a current Warp build so the client handles the status set the server emits
  2. Re-run the command — transient non-terminal statuses usually resolve to a terminal one
  3. 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

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


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/1feadc4dd53e0cb5. Report an issue: GitHub.