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/copilotCLIChatSessions.ts:767

			"isolation": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The isolation mode of the session, if applicable." },
			"isWorktree": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "Convenience boolean for isolationMode == 'worktree'." },
			"worktreeTurnIndex": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "comment": "1-based count of CLI turns issued against this worktree, including this one.", "isMeasurement": true },
			"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." }
		}
		*/
		this.telemetryService.sendMSFTTelemetryEvent('copilotcli.chat.invoke', {
			chatRequestId: request.id,
			hasChatSessionItem,
			isUntitled,
			hasDelegatePrompt
		});
	}

	private async authenticate(): Promise<NonNullable<SessionOptions['authInfo']>> {
		const authInfo = await this.copilotCLISDK.getAuthInfo().catch((ex) => this.logService.error(ex, 'Authorization failed'));
		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.'));
		}
		return authInfo;
	}

	/**
	 * Resolve the input and attachments for the SDK session based on request type.
	 *
	 * The VS Code chat API creates the session before firing the request handler,
	 * so delegated or remotely-steered requests pre-resolve and cache their prompt metadata
	 * before the handler runs.
	 */
	private async resolveInput(
		request: vscode.ChatRequest,
		session: ICopilotCLISession,

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts:767 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/29f612ddc525125e. Report an issue: GitHub.