{"record":{"id":"d45ea3ecc1e05f72","repo":"warpdotdev/warp","slug":"exceeded-maximum-number-of-authorization-attempts","errorCode":null,"errorMessage":"Exceeded maximum number of authorization attempts ({}). Please try again later.","messagePattern":"Exceeded maximum number of authorization attempts \\((.+?)\\)\\. Please try again later\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/agent_config.rs","lineNumber":80,"sourceCode":"        } else {\n            // No repo specified - just list from environments\n            self.fetch_and_display_agents(repo, ctx);\n        }\n        Ok(())\n    }\n\n    /// Check GitHub auth for repos, then list agents.\n    fn auth_then_list(\n        &self,\n        repos: Vec<GithubRepo>,\n        attempt: u32,\n        repo_spec: Option<String>,\n        ctx: &mut ModelContext<Self>,\n    ) {\n        if attempt > MAX_AUTH_ATTEMPTS {\n            ctx.terminate_app(\n                TerminationMode::ForceTerminate,\n                Some(Err(anyhow::anyhow!(\n                    \"Exceeded maximum number of authorization attempts ({}). Please try again later.\",\n                    MAX_AUTH_ATTEMPTS\n                ))),\n            );\n            return;\n        }\n\n        let integrations_client = ServerApiProvider::handle(ctx)\n            .as_ref(ctx)\n            .get_integrations_client();\n\n        let repo_tuples: Vec<(String, String)> = repos\n            .iter()\n            .map(|repo| (repo.owner.clone(), repo.repo.clone()))\n            .collect();\n\n        let auth_check_future = async move {\n            integrations_client","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/agent_config.rs#L62-L98","documentation":"auth_then_list (app/src/ai/agent_sdk/agent_config.rs:66-79) loops: it checks GitHub auth, and after each completed OAuth it re-checks with attempt+1. Once attempt exceeds MAX_AUTH_ATTEMPTS (8, defined at agent_config.rs:15), it force-terminates with this error to bound the loop when completing OAuth never actually satisfies the auth check.","triggerScenarios":"Completing the GitHub OAuth consent in the browser but the follow-up auth check still reporting authorization required, 8 times in a row — typically authorizing a different GitHub account than the one with repo access, or denying the requested organization/scopes on consent while still finishing the flow.","commonSituations":"Multiple GitHub accounts in one browser so the wrong one authorizes; org SSO/app restrictions blocking grant; stale integration state server-side that never flips to authorized.","solutions":["Authorize in a browser window logged into the exact GitHub account that owns/can access the repo","Grant the requested organization access and scopes on the OAuth consent screen","Wait and re-run the command later (the attempt counter resets per invocation)","Revoke and reconnect the GitHub integration to clear stale server-side state, then retry"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Open the auth URL in a browser profile already logged into the GitHub account that owns the repos","Approve the organization access request on the consent screen, not just the app install","Remember the attempt budget is 8 per invocation — if you loop manually, re-check the integration status between runs"],"tags":["github","oauth","retry-limit","cli"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}