Skip to content

web_search fails with HTTP 504 Gateway Timeout at ~120s (remote GitHub MCP server gateway timeout) #5301

Open

Description

@larruda

Describe the bug

The built-in web_search tool fails intermittently (more than half of calls over the last ~9 days) with:

MCP server 'github-mcp-server': MCP request failed: Transport send error: Transport [...StreamableHttpClientWorker<...RawCapturingReqwestClient>...] error: unexpected server response: HTTP 504 Gateway Timeout: [HTML error page omitted]

Every failure happens at ~121s. Successful calls take between 32s and 115s. This points to a fixed 120s gateway timeout in front of the remote MCP endpoint (https://api.business.githubcopilot.com/mcp/readonly). The web search backend (Bing searches plus answer synthesis) often runs longer than that limit.

Evidence (from local ~/.copilot/session-state/*/events.jsonl, tool.execution_start → tool.execution_complete)

Start (UTC) Duration (s) Result
2026-10-22T00:53:58Z 42.7 OK
2026-10-22T00:58:11Z 42.4 OK
2026-10-22T12:39:50Z 121.2 504
2026-10-22T12:42:42Z 121.0 504
2026-10-23T18:04:13Z 109.2 OK
2026-10-26T17:13:55Z 87.1 OK
2026-10-27T17:06:36Z 120.9 504
2026-10-28T19:36:13Z 120.9 504
2026-10-28T19:38:52Z 114.8 OK
2026-10-28T19:38:52Z 120.8 504
2026-10-28T19:40:56Z 120.9 504
2026-10-28T19:49:43Z 121.1 504
2026-10-28T19:57:28Z 42.3 OK
2026-10-28T19:59:53Z 32.1 OK
2026-10-29T17:59:24Z 120.9 504
2026-10-30T13:58:26Z 121.0 504

That is 9 failures out of 16 calls, all at 120.8–121.2s.

Client-side causes ruled out

  • No HTTP(S) proxy configured (env vars and scutil --proxy are empty).
  • No TLS interception: the endpoint certificate is CN=*.business.githubcopilot.com, issued by Sectigo.
  • Traffic is routed directly via the local network, not through the corporate VPN.
  • The endpoint responds normally from the GitHub edge (x-github-edge-region: iad, x-github-backend: Kubernetes).
  • Copilot CLI is on the latest version (1.0.105). It has no configurable timeout for this tool.

Expected behavior

web_search should complete reliably. Possible fixes:

  • Raise the gateway/proxy timeout for the web_search tool on the remote MCP server above 120s.
  • Bound the backend search/synthesis time so it finishes and returns a (possibly partial) answer before the gateway limit.
  • Stream progress or keep-alives over the streamable HTTP transport so the gateway does not close idle long-running requests.

Environment

  • Copilot CLI 1.0.105, macOS (Apple Silicon), installed via Homebrew cask
  • Plan: Copilot Business (api.business.githubcopilot.com)
  • Remote MCP endpoint: https://api.business.githubcopilot.com/mcp/readonly
  • Frequency: started roughly 2026-10-22 and occurs every day since

Activity

  1. added
    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
    and removed on Oct 31, 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:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions