{"record":{"id":"29f612ddc525125e","repo":"microsoft/vscode","slug":"authorization-failed-please-sign-into-github-and","errorCode":null,"errorMessage":"Authorization failed. Please sign into GitHub and try again.","messagePattern":"Authorization failed\\. Please sign into GitHub and try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts","lineNumber":767,"sourceCode":"\t\t\t\"isolation\": { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\", \"comment\": \"The isolation mode of the session, if applicable.\" },\n\t\t\t\"isWorktree\": { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\", \"comment\": \"Convenience boolean for isolationMode == 'worktree'.\" },\n\t\t\t\"worktreeTurnIndex\": { \"classification\": \"SystemMetaData\", \"purpose\": \"PerformanceAndHealth\", \"comment\": \"1-based count of CLI turns issued against this worktree, including this one.\", \"isMeasurement\": true },\n\t\t\t\"worktreeAgeBucketMs\": { \"classification\": \"SystemMetaData\", \"purpose\": \"FeatureInsight\", \"comment\": \"Bucketed age since worktree creation (e.g. '<5min', '<1h', '<1d', '<7d', '>=7d'). Measure short-lived vs long-lived worktrees.\" }\n\t\t}\n\t\t*/\n\t\tthis.telemetryService.sendMSFTTelemetryEvent('copilotcli.chat.invoke', {\n\t\t\tchatRequestId: request.id,\n\t\t\thasChatSessionItem,\n\t\t\tisUntitled,\n\t\t\thasDelegatePrompt\n\t\t});\n\t}\n\n\tprivate async authenticate(): Promise<NonNullable<SessionOptions['authInfo']>> {\n\t\tconst authInfo = await this.copilotCLISDK.getAuthInfo().catch((ex) => this.logService.error(ex, 'Authorization failed'));\n\t\tif (!authInfo) {\n\t\t\tthis.logService.error(`Authorization failed`);\n\t\t\tthrow new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));\n\t\t}\n\t\tif ((authInfo.type === 'token' && !authInfo.token) && !this.configurationService.getConfig(ConfigKey.Shared.DebugOverrideProxyUrl)) {\n\t\t\tthis.logService.error(`Authorization failed`);\n\t\t\tthrow new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));\n\t\t}\n\t\treturn authInfo;\n\t}\n\n\t/**\n\t * Resolve the input and attachments for the SDK session based on request type.\n\t *\n\t * The VS Code chat API creates the session before firing the request handler,\n\t * so delegated or remotely-steered requests pre-resolve and cache their prompt metadata\n\t * before the handler runs.\n\t */\n\tprivate async resolveInput(\n\t\trequest: vscode.ChatRequest,\n\t\tsession: ICopilotCLISession,","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts#L749-L785","documentation":"Error \"Authorization failed. Please sign into GitHub and try again.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts:767 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}