microsoft/vscode · error · Error

Authorization failed. Please sign into GitHub and try again.

Error message

Authorization failed. Please sign into GitHub and try again.

What it means

Error "Authorization failed. Please sign into GitHub and try again." thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts:1485

							sessionResource: undefined,
							onDidDispose: Event.None,
							onDidChange: Event.None
						}
					};
					context = {
						chatSessionContext,
						history: [],
						yieldRequested: false
					} satisfies vscode.ChatContext;
				}
			}

			this.sendTelemetryForHandleRequest(request, chatSessionContext);

			const [authInfo,] = await Promise.all([this.copilotCLISDK.getAuthInfo().catch((ex) => this.logService.error(ex, 'Authorization failed')), this.lockRepoOptionForSession(context, token)]);
			if (!authInfo) {
				this.logService.error(`Authorization failed`);
				throw new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));
			}
			if ((authInfo.type === 'token' && !authInfo.token) && !this.configurationService.getConfig(ConfigKey.Shared.DebugOverrideProxyUrl)) {
				this.logService.error(`Authorization failed`);
				throw new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));
			}

			if (!chatSessionContext || !SessionIdForCLI.isCLIResource(request.sessionResource)) {
				// Delegating from another chat session
				return await this.handleDelegationFromAnotherChat(request, undefined, request.references, context, stream, authInfo, token);
			}

			const { resource } = chatSessionContext.chatSessionItem;
			const id = SessionIdForCLI.parse(resource);
			sessionId = id;
			const isUntitled = chatSessionContext.isUntitled;
			const invalidSessionMessage = _invalidCopilotCLISessionIdsWithErrorMessage.get(id);
			if (invalidSessionMessage) {
				const { issueUrl } = getSessionLoadFailureIssueInfo(invalidSessionMessage);

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts:1485 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/vscode@a94b963a32 (2026-08-12). Data as JSON: /api/errors/5391c844e44a9529. Report an issue: GitHub.