{"record":{"id":"1feadc4dd53e0cb5","repo":"warpdotdev/warp","slug":"unexpected-oauth-status","errorCode":null,"errorMessage":"Unexpected OAuth status","messagePattern":"Unexpected OAuth status","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/agent_config.rs","lineNumber":175,"sourceCode":"                                        ctx.terminate_app(\n                                            TerminationMode::ForceTerminate,\n                                            Some(Err(anyhow::anyhow!(\n                                                \"GitHub authorization failed. Please try again.\"\n                                            ))),\n                                        );\n                                    }\n                                    Ok(OauthConnectTxStatus::Expired) => {\n                                        ctx.terminate_app(\n                                            TerminationMode::ForceTerminate,\n                                            Some(Err(anyhow::anyhow!(\n                                                \"GitHub authorization expired. Please try again.\"\n                                            ))),\n                                        );\n                                    }\n                                    Ok(_) => {\n                                        ctx.terminate_app(\n                                            TerminationMode::ForceTerminate,\n                                            Some(Err(anyhow::anyhow!(\n                                                \"Unexpected OAuth status\"\n                                            ))),\n                                        );\n                                    }\n                                    Err(err) => {\n                                        ctx.terminate_app(\n                                            TerminationMode::ForceTerminate,\n                                            Some(Err(anyhow::anyhow!(\n                                                \"Error polling OAuth status: {err}\"\n                                            ))),\n                                        );\n                                    }\n                                }\n                            });\n                        }\n                        (Some(auth_url), None) => {\n                            println!(\"\\nAuthorize access here: {auth_url}\\n\");\n                            println!(\"After authorizing, please re-run this command.\");","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/agent_config.rs#L157-L193","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"fn oauth_status_is_terminal(status: &OauthConnectTxStatus) -> bool {\n    matches!(status, OauthConnectTxStatus::Completed\n        | OauthConnectTxStatus::Failed\n        | OauthConnectTxStatus::Expired)\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["github","oauth","version-skew","state-machine"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}