Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.115.0 (Universal) Commit: 41dd792 Date: 2026-04-07T22:04:57Z Electron: 39.8.5 ElectronBuildId: 13703022 Chromium: 142.0.7444.265 Node.js: 22.22.1 V8: 14.2.231.22-electron.0
- OS Version: Darwin arm64 25.3.0 (macOS)
Steps to Reproduce:
-
Configure the GitHub remote MCP server in .vscode/mcp.json:
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${input:github_mcp_pat}" }
}
}
}
-
Open Copilot Chat in Agent mode. Confirm GitHub MCP server is
connected and get_file_contents tool is listed and enabled.
-
Ask the agent to read any file from any GitHub repository
you have access to:
"Read the file README.md from /"
-
Observe the agent calls get_file_contents with correct parameters
and receives "successfully downloaded text file (SHA: ...)" but
has no access to actual file content. Agent retries 2-3 times
and gives up without ever reading the file.
-
Open Output panel → GitHub Copilot Chat and observe this error:
[error] Error from tool read_file with args
{"filePath": "vscode-chat-response-resource://.../"}:
File vscode-chat-response-resource://... is outside of the
workspace, and not open in an editor, and can't be read
Expected: Agent receives actual file content and uses it.
Actual: File content silently discarded. Agent only sees
"successfully downloaded text file" and never the file content.
Root Cause:
The GitHub MCP server returns file content as two content blocks
per the MCP specification:
- Block 1 type:"text" → "successfully downloaded text file"
- Block 2 type:"resource" → { uri: "repo://...", text: "" }
VS Code Copilot Chat's MCP tool result parser processes only
type:"text" blocks and silently discards type:"resource" blocks.
The actual file content sits in the resource block and is never
passed to the agent.
Proof — identical bug fixed in OpenCode (another MCP client) in
24 hours on Jan 12 2026 by updating the MCP tool result parser:
No server change required. Pure client-side parser update needed
in github.copilot-chat extension.
Upstream references:
Does this issue occur when all extensions are disabled?: No
Steps to Reproduce:
Configure the GitHub remote MCP server in .vscode/mcp.json:
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${input:github_mcp_pat}" }
}
}
}
Open Copilot Chat in Agent mode. Confirm GitHub MCP server is
connected and get_file_contents tool is listed and enabled.
Ask the agent to read any file from any GitHub repository
you have access to:
"Read the file README.md from /"
Observe the agent calls get_file_contents with correct parameters
and receives "successfully downloaded text file (SHA: ...)" but
has no access to actual file content. Agent retries 2-3 times
and gives up without ever reading the file.
Open Output panel → GitHub Copilot Chat and observe this error:
[error] Error from tool read_file with args
{"filePath": "vscode-chat-response-resource://.../"}:
File vscode-chat-response-resource://... is outside of the
workspace, and not open in an editor, and can't be read
Expected: Agent receives actual file content and uses it.
Actual: File content silently discarded. Agent only sees
"successfully downloaded text file" and never the file content.
Root Cause:
The GitHub MCP server returns file content as two content blocks
per the MCP specification:
VS Code Copilot Chat's MCP tool result parser processes only
type:"text" blocks and silently discards type:"resource" blocks.
The actual file content sits in the resource block and is never
passed to the agent.
Proof — identical bug fixed in OpenCode (another MCP client) in
24 hours on Jan 12 2026 by updating the MCP tool result parser:
resourcecontent type in MCP tool output anomalyco/opencode#7879No server change required. Pure client-side parser update needed
in github.copilot-chat extension.
Upstream references:
get_file_contents fails to parse the response github/github-mcp-server#607
https://github.blog/changelog/2025-12-10-the-github-mcp-server-adds-support-for-tool-specific-configuration-and-more/