microsoft/vscode · error · Error
Sign in to GitHub to use the Cloud Agent.
Error message
Sign in to GitHub to use the Cloud Agent.
What it means
Error "Sign in to GitHub to use the Cloud Agent." thrown in microsoft/vscode.
Source
Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/taskApiBackend.ts:465
* Real HTTP client for the Mission Control Task API, routing every call through
* `ICAPIClientService.makeRequest({...}, { type: RequestType.AgentTask, ... })`.
* The CAPI client maps the `action` discriminator to a URL under `api.github.com/agents/...`
* (GHE-aware via the shared `dotcomAPIURL`). Auth is the same permissive GitHub
* session used by the GitHub service.
*/
export class TaskApiHttpClient implements ITaskApiClient {
constructor(
private readonly _capiClientService: ICAPIClientService,
private readonly _authService: IAuthenticationService,
private readonly _logService: ILogService,
) { }
private async _authHeaders(): Promise<Record<string, string>> {
const session = await this._authService.getGitHubSession('permissive', { silent: true });
const token = session?.accessToken;
if (!token) {
throw new Error(l10n.t('Sign in to GitHub to use the Cloud Agent.'));
}
return { Authorization: `Bearer ${token}`, Accept: 'application/json' };
}
private async _request<T>(
method: 'GET' | 'POST',
action: AgentTaskRequestAction,
opts: { owner?: string; repo?: string; taskId?: string; body?: unknown; searchParams?: Record<string, string | number | boolean> },
): Promise<T | undefined> {
const headers = await this._authHeaders();
const init: { method: 'GET' | 'POST'; headers: Record<string, string>; body?: string } = { method, headers };
if (opts.body !== undefined) {
init.headers['Content-Type'] = 'application/json';
init.body = JSON.stringify(opts.body);
}
const response = await this._capiClientService.makeRequest<Response>(init, {
type: RequestType.AgentTask,
action,View on GitHub (pinned to a94b963a32)
When it happens
Trigger: Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/taskApiBackend.ts:465 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/0c34a7ecbed428d5.
Report an issue: GitHub.