Skip to content

Organization-level custom agents not visible in Copilot CLI when no GitHub-hosted repository is in the working directory #3572

Description

@cmpl-giedriusk

Describe the bug

Organization-level custom agents defined in the agents/ directory of the org's .github-private repository do not appear in gh copilot CLI (via /agent) unless the CLI is launched from a directory that contains a git repository with a GitHub remote belonging to that organization. This works perfectly fine in VS Code.

Affected version

No response

Steps to reproduce the behavior

  1. Define org-level custom agents in /.github-private/agents/.
  2. On a machine with no local clones of any GitHub repository in that org, run copilot from any directory.
  3. Run /agent — org-level agents are not listed.

Expected behavior

Org-level agents should be resolved from the authenticated user's organization membership, not from the git remote of the current working directory.

Additional context

Our organization uses Azure DevOps for source control and only has the .github-private repository on GitHub. As a result, org-level agents are inaccessible in the CLI without maintaining an otherwise unused GitHub repo clone on every developer machine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:enterpriseGitHub Enterprise (GHE/GHES) support, org policies, and enterprise settings

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions