MCP reload reuses startup workspace config after .github/mcp.json changes
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
Describe the bug
Copilot CLI keeps using the MCP configuration snapshot loaded when the session started. If a workspace MCP server fails to initialize and .github/mcp.json is corrected while the session remains open, reloading/restarting MCP servers retries the old command instead of reading the updated file.
The on-disk file contains the corrected command, but reload diagnostics report that the configuration signature is unchanged and launch the original command again.
Affected version
- Copilot CLI: 1.0.81-7
- Platform: Windows
- MCP transport: stdio
Steps to reproduce
-
Create
.github/mcp.jsonin a workspace with a deliberately observable failing server:{ "mcpServers": { "config-probe": { "type": "stdio", "command": "python", "args": [ "-c", "import sys; print('OLD_CONFIG', file=sys.stderr)" ], "tools": ["*"] } } } -
Start Copilot CLI in that workspace. The server exits during initialization and its stderr contains
OLD_CONFIG. -
Without exiting Copilot CLI, change only
OLD_CONFIGtoNEW_CONFIGin.github/mcp.json. -
Open
/mcpand reload/restart the MCP servers. -
Inspect the MCP status and session log.
Expected behavior
Reload should reread .github/mcp.json, compute a new configuration signature, and launch the command containing NEW_CONFIG.
Actual behavior
Reload keeps the startup signature and launches the original command containing OLD_CONFIG. In the observed session, the equivalent diagnostics were:
mcp discover_and_start_root {
"signature_matches": true,
"previous_signature": "...old command...",
"signature": "...old command..."
}
mcp unchanged reload reuses live graph
MCP server stderr: ...old command output...
Recorded failure for server config-probe
The file on disk already contained the new command when these messages were recorded.
This also occurs when replacing a nonexistent relative launcher path with a valid absolute path and adding an environment override: subsequent reloads continue retrying the original relative path.
Impact
A user cannot repair a failed workspace MCP server without terminating and relaunching Copilot CLI. The reload/restart action appears to run, but it retries stale settings, which makes configuration troubleshooting confusing.
Workaround
Exit Copilot CLI completely and start a new process after editing the workspace MCP configuration.
Related issues
- #2198 covered workspace MCP configuration not loading at startup; that issue was fixed by making reload discover the config. This report is the inverse: startup discovers the config, but reload does not observe later edits.
- #4542 covers workspace configuration being detected but not wired into newly started sessions. This report concerns in-session configuration refresh after the server was already discovered.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with .github/mcp.json, the /mcp reload/restart action, and the session log. Compare the configuration signature and launched command before and after changing OLD_CONFIG to NEW_CONFIG; done means reload observes the edited file and starts the server with the new command without restarting Copilot CLI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100