{"record":{"id":"5391c844e44a9529","repo":"microsoft/vscode","slug":"authorization-failed-please-sign-into-github-and-5391c8","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/copilotCLIChatSessionsContribution.ts","lineNumber":1485,"sourceCode":"\t\t\t\t\t\t\tsessionResource: undefined,\n\t\t\t\t\t\t\tonDidDispose: Event.None,\n\t\t\t\t\t\t\tonDidChange: Event.None\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tcontext = {\n\t\t\t\t\t\tchatSessionContext,\n\t\t\t\t\t\thistory: [],\n\t\t\t\t\t\tyieldRequested: false\n\t\t\t\t\t} satisfies vscode.ChatContext;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.sendTelemetryForHandleRequest(request, chatSessionContext);\n\n\t\t\tconst [authInfo,] = await Promise.all([this.copilotCLISDK.getAuthInfo().catch((ex) => this.logService.error(ex, 'Authorization failed')), this.lockRepoOptionForSession(context, token)]);\n\t\t\tif (!authInfo) {\n\t\t\t\tthis.logService.error(`Authorization failed`);\n\t\t\t\tthrow new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));\n\t\t\t}\n\t\t\tif ((authInfo.type === 'token' && !authInfo.token) && !this.configurationService.getConfig(ConfigKey.Shared.DebugOverrideProxyUrl)) {\n\t\t\t\tthis.logService.error(`Authorization failed`);\n\t\t\t\tthrow new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));\n\t\t\t}\n\n\t\t\tif (!chatSessionContext || !SessionIdForCLI.isCLIResource(request.sessionResource)) {\n\t\t\t\t// Delegating from another chat session\n\t\t\t\treturn await this.handleDelegationFromAnotherChat(request, undefined, request.references, context, stream, authInfo, token);\n\t\t\t}\n\n\t\t\tconst { resource } = chatSessionContext.chatSessionItem;\n\t\t\tconst id = SessionIdForCLI.parse(resource);\n\t\t\tsessionId = id;\n\t\t\tconst isUntitled = chatSessionContext.isUntitled;\n\t\t\tconst invalidSessionMessage = _invalidCopilotCLISessionIdsWithErrorMessage.get(id);\n\t\t\tif (invalidSessionMessage) {\n\t\t\t\tconst { issueUrl } = getSessionLoadFailureIssueInfo(invalidSessionMessage);","sourceCodeStart":1467,"sourceCodeEnd":1503,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts#L1467-L1503","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/copilotCLIChatSessionsContribution.ts:1485 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"}