Skip to content

MCP Server not returning results for Copilot when invoked fom Copilot agent #1069

@italopessoa

Description

@italopessoa

Describe the bug

Using Copilot on the organization repository MCP server to search code produces different results when called from the GitHub task agent in the background.

When asking Copilot to execute a query (tested on GitHub using github-mcp-server), it doesn't find the files when invoking the server from the agent, even though the parameters are exactly the same.

Affected version

github-mcp-server: latest (using an online server)
Copilot version: v22.19.0

Steps to reproduce the behavior

  1. Execute the same query filter on different tools with Copilot (ChatGPT 4.1).
  2. The result should be the same in all places.

Expected vs actual behavior

Expected: The query should return the same results regardless of where it is executed.

Actual: The results differ when the query is executed from the GitHub task agent compared to other tools.

Logs

I can't share the exact query.

2025-09-08T19:45:00.2904865Z function:
2025-09-08T19:45:00.2905336Z   name: github-mcp-server-search_code
2025-09-08T19:45:00.2905832Z   args:
2025-09-08T19:45:00.2907541Z     query: 
2025-09-08T19:45:00.2909732Z   result: {"total_count":0,"incomplete_results":false}
2025-09-08T19:45:01.9651736Z Inserted 0 image URLs from tools into chat history.
Image Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions