Summary
When starting a new Cloud Agent thread in an organization that has more than one connected GitHub installation, the repository picker lists the same repository multiple times — once per installation that can see it.
Steps to reproduce
- As an organization with multiple GitHub accounts/orgs connected to the same Kilo organization (each its own GitHub App installation), open Cloud Agent → new thread.
- Open the repository picker.
- Observe a repository that is reachable from more than one installation (for example
acme/api is owned by one connected account and accessible as a collaborator repo on another, or the App was reinstalled leaving two active installation rows for the same account).
Expected behavior
Each repository appears exactly once in the picker, resolved to the installation that will be used for the session.
Actual behavior
The same repository appears once per GitHub installation that lists it, so the list shows duplicate entries.
Cause
fetchAllGitHubRepositoriesForOrganization (apps/web/src/lib/cloud-agent/github-integration-helpers.ts) unions the repository lists of every healthy GitHub integration for the organization:
repositories: results.flatMap(result => result.repositories),
No deduplication is performed across installations, so a repo visible through two installations is returned twice. NewSessionPanel then renders every entry (keyed by platformIntegrationId, not by repo name), producing the duplicate rows.
Notes
Summary
When starting a new Cloud Agent thread in an organization that has more than one connected GitHub installation, the repository picker lists the same repository multiple times — once per installation that can see it.
Steps to reproduce
acme/apiis owned by one connected account and accessible as a collaborator repo on another, or the App was reinstalled leaving two active installation rows for the same account).Expected behavior
Each repository appears exactly once in the picker, resolved to the installation that will be used for the session.
Actual behavior
The same repository appears once per GitHub installation that lists it, so the list shows duplicate entries.
Cause
fetchAllGitHubRepositoriesForOrganization(apps/web/src/lib/cloud-agent/github-integration-helpers.ts) unions the repository lists of every healthy GitHub integration for the organization:No deduplication is performed across installations, so a repo visible through two installations is returned twice.
NewSessionPanelthen renders every entry (keyed byplatformIntegrationId, not by repo name), producing the duplicate rows.Notes
fetchAllGitHubRepositoriesForOrganization.