{"record":{"id":"2581c99fce9d0bc6","repo":"microsoft/vscode","slug":"open-a-github-repository-to-use-the-cloud-agent","errorCode":null,"errorMessage":"Open a GitHub repository to use the cloud agent.","messagePattern":"Open a GitHub repository to use the cloud agent\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts","lineNumber":1511,"sourceCode":"\t\t\tthis.logService.trace(`[delegate] Retrieved options for ${chatResource.toString()}: customAgent=${customAgentName}, model=${modelName}, partnerAgent=${partnerAgentName}`);\n\t\t} else {\n\t\t\tthis.logService.trace(`[delegate] No chatResource available to retrieve session options`);\n\t\t}\n\n\t\tconst { result, processedReferences } = await this.extractReferences(metadata.references, !!head_ref);\n\n\t\tconst repoIds = await getRepoId(this._gitService);\n\t\tconst repoId = repoIds?.[0];\n\t\tlet repoOwner = repoId?.org;\n\t\tlet repoName = repoId?.repo;\n\t\tconst [selectedRepoOwner, selectedRepoName] = (selectedRepository && selectedRepository !== DEFAULT_REPOSITORY_ID) ? selectedRepository.split('/') : [];\n\t\tif (!base_ref || repoOwner !== selectedRepoOwner || repoName !== selectedRepoName) {\n\t\t\tif (selectedRepoOwner && selectedRepoName) {\n\t\t\t\trepoOwner = selectedRepoOwner;\n\t\t\t\trepoName = selectedRepoName;\n\t\t\t} else {\n\t\t\t\tif (!repoId) {\n\t\t\t\t\tthrow new Error(vscode.l10n.t('Open a GitHub repository to use the cloud agent.'));\n\t\t\t\t}\n\t\t\t\trepoOwner = repoId.org;\n\t\t\t\trepoName = repoId.repo;\n\t\t\t}\n\t\t\tconst { default_branch } = await this._githubRepositoryService.getRepositoryInfo(repoOwner, repoName);\n\t\t\tbase_ref = default_branch;\n\t\t}\n\n\t\tconst invokeResult = await this.invokeRemoteAgent(\n\t\t\tmetadata.prompt,\n\t\t\t[result, history].filter(Boolean).join('\\n\\n').trim(),\n\t\t\ttoken,\n\t\t\tstream,\n\t\t\tbase_ref,\n\t\t\thead_ref,\n\t\t\tcustomAgentName,\n\t\t\tmodelName,\n\t\t\tpartnerAgentName,","sourceCodeStart":1493,"sourceCodeEnd":1529,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts#L1493-L1529","documentation":"Error \"Open a GitHub repository to use the cloud agent.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts:1511 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"}