{"record":{"id":"e92001f45aecae50","repo":"microsoft/vscode","slug":"no-active-repository-found-open-a-github-reposito","errorCode":null,"errorMessage":"No active repository found. Open a GitHub repository to continue with cloud agent.","messagePattern":"No active repository found\\. Open a GitHub repository to continue with cloud agent\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudGitOperationsManager.ts","lineNumber":36,"sourceCode":"\nexport class CopilotCloudGitOperationsManager {\n\tconstructor(\n\t\tprivate readonly logService: ILogService,\n\t\tprivate readonly gitService: IGitService,\n\t\tprivate readonly gitExtensionService: IGitExtensionService\n\t) { }\n\n\tasync repoInfo(): Promise<GitRepoInfo> {\n\t\t// TODO: support selecting remote\n\t\t// await this.promptAndUpdatePreferredGitHubRemote(true);\n\t\tconst repoIds = await getRepoId(this.gitService);\n\t\tif (!repoIds || repoIds.length === 0) {\n\t\t\tthrow new Error(vscode.l10n.t('Repository information is not available. Open a GitHub repository to continue with cloud agent.'));\n\t\t}\n\t\tconst repoId = repoIds[0];\n\t\tconst currentRepository = this.gitService.activeRepository.get();\n\t\tif (!currentRepository) {\n\t\t\tthrow new Error(vscode.l10n.t('No active repository found. Open a GitHub repository to continue with cloud agent.'));\n\t\t}\n\t\tconst git = this.gitExtensionService.getExtensionApi();\n\t\tconst repo = git?.getRepository(currentRepository?.rootUri);\n\t\t// Checks if user has permission to access the repository\n\t\tif (!repo) {\n\t\t\tthrow new Error(\n\t\t\t\tvscode.l10n.t(\n\t\t\t\t\t'Unable to access {0}. Please check your permissions and try again.',\n\t\t\t\t\t`\\`${repoId.org}/${repoId.repo}\\``\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\trepository: repo,\n\t\t\tremoteName: repo.state.HEAD?.upstream?.remote ?? currentRepository.upstreamRemote ?? repo.state.remotes?.[0]?.name ?? 'origin',\n\t\t\tbaseRef: currentRepository.headBranchName ?? 'main'\n\t\t};\n\t}","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudGitOperationsManager.ts#L18-L54","documentation":"Error \"No active repository found. Open a GitHub repository to continue with cloud agent.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudGitOperationsManager.ts:36 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"}