{"record":{"id":"ad4c51a68457c67a","repo":"microsoft/vscode","slug":"session-not-found","errorCode":null,"errorMessage":"Session not found","messagePattern":"Session not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts","lineNumber":592,"sourceCode":"\t\t\tfirstCheckpointRef,\n\t\t\tlastCheckpointRef\n\t\t} satisfies { readonly [key: string]: unknown };\n\t}\n\n\tasync provideChatSessionContent(resource: Uri, token: vscode.CancellationToken, context?: { readonly inputState: vscode.ChatSessionInputState }): Promise<vscode.ChatSession> {\n\t\tconst stopwatch = new StopWatch();\n\t\ttry {\n\t\t\tconst copilotcliSessionId = SessionIdForCLI.parse(resource);\n\t\t\tif (copilotcliSessionId.startsWith('untitled:') || copilotcliSessionId.startsWith('untitled-')) {\n\t\t\t\treturn {\n\t\t\t\t\thistory: [],\n\t\t\t\t\trequestHandler: undefined,\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.sessionService.isNewSessionId(copilotcliSessionId)) {\n\t\t\t\tconst session = this.newSessions.get(resource);\n\t\t\t\tif (!session) {\n\t\t\t\t\tthrow new Error('Session not found');\n\t\t\t\t}\n\n\t\t\t\tconst options: Record<string, vscode.ChatSessionProviderOptionItem> = {};\n\t\t\t\tfor (const group of (context?.inputState.groups || [])) {\n\t\t\t\t\tif (group.selected) {\n\t\t\t\t\t\toptions[group.id] = { ...group.selected, locked: true };\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\ttitle: session.label,\n\t\t\t\t\thistory: [],\n\t\t\t\t\toptions,\n\t\t\t\t\trequestHandler: undefined,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthis.newSessions.delete(resource);\n\t\t\t\t// Fire-and-forget: detect PR when the user opens a session.","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts#L574-L610","documentation":"Error \"Session not found\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts:592 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}