microsoft/vscode · error · Error

Session not found

Error message

Session not found

What it means

Error "Session not found" thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts:592

			firstCheckpointRef,
			lastCheckpointRef
		} satisfies { readonly [key: string]: unknown };
	}

	async provideChatSessionContent(resource: Uri, token: vscode.CancellationToken, context?: { readonly inputState: vscode.ChatSessionInputState }): Promise<vscode.ChatSession> {
		const stopwatch = new StopWatch();
		try {
			const copilotcliSessionId = SessionIdForCLI.parse(resource);
			if (copilotcliSessionId.startsWith('untitled:') || copilotcliSessionId.startsWith('untitled-')) {
				return {
					history: [],
					requestHandler: undefined,
				};
			}
			if (this.sessionService.isNewSessionId(copilotcliSessionId)) {
				const session = this.newSessions.get(resource);
				if (!session) {
					throw new Error('Session not found');
				}

				const options: Record<string, vscode.ChatSessionProviderOptionItem> = {};
				for (const group of (context?.inputState.groups || [])) {
					if (group.selected) {
						options[group.id] = { ...group.selected, locked: true };
					}
				}

				return {
					title: session.label,
					history: [],
					options,
					requestHandler: undefined,
				};
			} else {
				this.newSessions.delete(resource);
				// Fire-and-forget: detect PR when the user opens a session.

View on GitHub (pinned to a94b963a32)

When it happens

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