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/copilotCloudSessionsProvider.ts:1609

				}
			*/
			this.telemetry.sendMSFTTelemetryEvent('copilotcloud.chat.confirmationCancelled', {
				tokenCancelled: String(token.isCancellationRequested)
			});
			stream.markdown(vscode.l10n.t('Cloud agent cancelled'));
			return {};
		}

		if (selection.includes(this.AUTHORIZE.toUpperCase())) {
			stream.progress(vscode.l10n.t('Authorizing'));
			try {
				await this._authenticationService.getGitHubSession('permissive', { createIfNone: { detail: l10n.t('Sign in to GitHub with additional permissions to use Copilot cloud sessions.') } });
				if (!this._authenticationService.permissiveGitHubSession) {
					throw new Error('Failed to obtain permissive GitHub session');
				}
			} catch (error) {
				this.logService.error(`Authorization failed: ${error}`);
				throw new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));

			}
		}

		let head_ref: string | undefined; // If set, this is the branch we pushed pending changes to.

		if (selection.includes(this.COMMIT.toUpperCase())) {
			try {
				stream.progress(vscode.l10n.t('Committing and pushing local changes'));
				head_ref = await this.gitOperationsManager.commitAndPushChanges();
				stream.markdown(vscode.l10n.t('Local changes pushed to remote branch `{0}`.', head_ref));
			} catch (error) {
				this.logService.error(`Commit and push failed: ${error}`);
				throw vscode.l10n.t('{0}. Commit or stash your changes and try again.', (error instanceof Error ? error.message : String(error)) ?? vscode.l10n.t('Failed to commit and push changes.'));
			}
		} else if (selection.includes(this.PUSH_BRANCH.toUpperCase())) {
			try {
				stream.progress(vscode.l10n.t('Pushing base branch to remote'));

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts:1609 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/d4f95ead8b480408. Report an issue: GitHub.