microsoft/vscode · error · Error

Task API getTask returned an empty response.

Error message

Task API getTask returned an empty response.

What it means

Error "Task API getTask returned an empty response." thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/taskApiBackend.ts:524

		return task;
	}

	async listTasksForRepo(owner: string, repo: string, options?: ListTasksOptions): Promise<AgentTaskListResponse> {
		const response = await this._request<AgentTaskListResponse>('GET', 'list-for-repo', {
			owner, repo, searchParams: toSearchParams(options),
		});
		return response ?? { tasks: [] };
	}

	async listTasks(options?: ListTasksOptions): Promise<AgentTaskListResponse> {
		const response = await this._request<AgentTaskListResponse>('GET', 'list', { searchParams: toSearchParams(options) });
		return response ?? { tasks: [] };
	}

	async getTask(taskId: string): Promise<AgentTaskGetResponse> {
		const task = await this._request<AgentTaskGetResponse>('GET', 'get', { taskId });
		if (!task) {
			throw new Error(l10n.t('Task API getTask returned an empty response.'));
		}
		return task;
	}

	async getTaskEvents(taskId: string, options?: ListTaskEventsOptions): Promise<AgentTaskListEventsResponse> {
		const response = await this._request<AgentTaskListEventsResponse>('GET', 'events', {
			taskId, searchParams: toSearchParams(options),
		});
		return response ?? { events: [], total: 0 };
	}

	async steerTask(taskId: string, request: AgentTaskSteerRequest): Promise<void> {
		await this._request<void>('POST', 'steer', { taskId, body: request });
	}

	async createPRForTask(owner: string, repo: string, taskId: string): Promise<AgentTaskCreatePullRequestResponse> {
		const result = await this._request<AgentTaskCreatePullRequestResponse>('POST', 'create-pr', { owner, repo, taskId });
		if (!result) {

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/taskApiBackend.ts:524 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/8724f085c197e916. Report an issue: GitHub.