Skip to content

Built-in GitHub MCP read tools are unavailable to custom agents when gh is on PATH #5550

Backlog

Description

@jkim323

Describe the bug

HVE Core’s Backlog Manager report describes an issue in the GitHub Copilot app’s CLI runtime: when gh is on PATH, the agent cannot read GitHub issues through the built-in MCP server, even when it explicitly declares github/issue_read and github/list_issues. For an agent that uses MCP for GitHub access and cannot use a shell fallback, the GitHub workflow stops.

Affected version

The original report did not capture the Copilot app or CLI build.

Steps to reproduce the behavior

The original report used HVE Core’s Backlog Manager. Here is a smaller test to isolate tool availability; the with/without-gh comparison has not been run independently.

  1. With the built-in GitHub MCP server enabled, add .github/agents/github-read-probe.agent.md to a test repository:

    ---
    name: GitHub Read Probe
    description: Checks whether GitHub MCP issue reads are available.
    tools:
      - github/issue_read
      - github/list_issues
    ---
    Read the requested GitHub issue using the declared MCP tools only. If the tools are unavailable, report that. Do not use the shell.
  2. Start a fresh Copilot process with gh discoverable on its PATH. Select GitHub Read Probe and ask it to read a known public issue. Check whether the two declared MCP tools are exposed, rather than relying only on the agent’s reply.

  3. Start a fresh process with gh absent from its PATH. Keep the build, authentication, GitHub MCP configuration, agent, and prompt the same, and compare the exposed tools.

Expected behavior

Explicitly declared GitHub MCP read tools should remain available regardless of whether gh is installed, subject to normal policy and permissions. If the omission is intentional, is there a supported opt-out for custom agents that cannot use a shell fallback?

Additional context

The original report suggests the CLI runtime may start its built-in server with excludeGhReplaceableTools: true when it detects gh. That mechanism is unverified. The report also names search_issues, pull_request_read, list_pull_requests, and search_pull_requests as potentially affected.

The HVE Core workaround adds a gh fallback when an MCP tool is absent. It does not restore the tools for agents that cannot use gh.

Activity

  1. added
    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agents
    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    on Nov 22, 2026
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:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions