Describe the bug
A custom agent invoked two levels below the session root does not receive the MCP tools declared in its own tools: frontmatter as described in the Copilot CLI documentation. If a middle-level agent declares the tool (e.g. repro-mcp/echo), then the leaf agent receives the tool and succeeds.
The same leaf agent can call its MCP tool when selected directly. It can also call the tool through the nested agent chain on Copilot CLI 1.0.73. Starting with 1.0.74, the nested leaf LLM receives only the built-in view tool. The CLI does not report a configuration error; the leaf agent executes without the MCP tool.
Declaring repro-mcp/echo only on the top-level root does not help without the cooresponding middle-level tool change. The leaf still receives only view. The observed rule depends on the leaf's immediate parent.
Agent chain:
nested-root
└── nested-coordinator
└── nested-leaf
└── tool(repro-mcp/echo)
Affected version
GitHub Copilot CLI 1.0.74. This is a regression from GitHub Copilot CLI 1.0.73.
Steps to reproduce the behavior
1. Register the attached MCP server
Save the attached mcp-server.mjs, then create $COPILOT_HOME/mcp-config.json:
{
"mcpServers": {
"repro-mcp": {
"command": "node",
"args": ["/absolute/path/to/mcp-server.mjs"],
"env": {
"REPRO_CALL_LOG": "/tmp/repro-mcp-calls.jsonl"
}
}
}
}
2. Create three repository agents
.github/agents/nested-root.agent.md
---
name: nested-root
description: Root orchestrator for a nested MCP tool test.
tools: ['agent']
agents: ['nested-coordinator']
---
Use the `agent` tool exactly once to dispatch `nested-coordinator`.
Give it this exact prompt:
`Dispatch nested-leaf and ask it to call its required echo tool with message "nested-probe". Return the leaf response verbatim.`
Do not perform the leaf's work yourself. Return the coordinator response verbatim.
.github/agents/nested-coordinator.agent.md
---
name: nested-coordinator
description: Middle-level coordinator for a nested MCP tool test.
tools: ['agent']
agents: ['nested-leaf']
user-invocable: false
---
Use the `agent` tool exactly once to dispatch `nested-leaf`.
Pass the requested echo message unchanged. Do not perform the leaf's work yourself. Return the leaf response verbatim.
.github/agents/nested-leaf.agent.md
---
name: nested-leaf
description: Leaf agent that must call an MCP echo tool.
tools: ['repro-mcp/echo']
---
You must call `repro-mcp/echo` exactly once with the requested message.
After the call, return exactly the text from the tool result. If the tool is not available, return exactly `TOOL_NOT_AVAILABLE`.
3. Run the direct control
Run from the directory containing .github/agents/:
COPILOT_HOME=/tmp/copilot-1.0.74-home \
COPILOT_AUTO_UPDATE=false \
/path/to/copilot-1.0.74 \
--agent nested-leaf \
--allow-all-tools \
--disable-builtin-mcps \
--no-custom-instructions \
--log-level all \
--log-dir /tmp/copilot-1.0.74-direct-logs \
-p 'Call your required echo tool with message "direct-probe".'
The direct call succeeds:
4. Run the nested case
COPILOT_HOME=/tmp/copilot-1.0.74-home \
COPILOT_AUTO_UPDATE=false \
/path/to/copilot-1.0.74 \
--agent nested-root \
--allow-all-tools \
--disable-builtin-mcps \
--no-custom-instructions \
--log-level all \
--log-dir /tmp/copilot-1.0.74-nested-logs \
-p 'Follow your agent instructions exactly and run the nested probe.'
5. Test a top-level-only grant
Change the root agent's tool list while leaving the coordinator unchanged:
-tools: ['agent']
+tools: ['agent', 'repro-mcp/echo']
Run the command from step 4 again. On 1.0.74, the leaf still reports TOOL_NOT_AVAILABLE.
6. Test an immediate-parent grant
Restore the root agent to tools: ['agent'], then change one line in nested-coordinator.agent.md:
-tools: ['agent']
+tools: ['agent', 'repro-mcp/echo']
Do not change nested-leaf.agent.md. Run the command from step 4 again.
The coordinator's instructions still require it to delegate rather than call repro-mcp/echo itself.
7. Repeat steps 3 through 6 with Copilot CLI 1.0.73
Use a separate COPILOT_HOME containing the same MCP configuration. Keep COPILOT_AUTO_UPDATE=false so each command runs the requested version.
Expected behavior
Actual behavior
The direct leaf call succeeds on both versions. On 1.0.74, the nested result depends specifically on whether the immediate coordinator duplicates the leaf's MCP tool declaration:
| CLI version |
Direct leaf |
No ancestor grant |
Root-only grant |
Immediate-parent grant |
| 1.0.73 |
MCP_ECHO_OK:direct-probe |
MCP_ECHO_OK:nested-probe |
MCP_ECHO_OK:nested-probe |
MCP_ECHO_OK:nested-probe |
| 1.0.74 |
MCP_ECHO_OK:direct-probe |
TOOL_NOT_AVAILABLE |
TOOL_NOT_AVAILABLE |
MCP_ECHO_OK:nested-probe |
The 1.0.74 nested leaf returns:
I don't have access to the `repro-mcp/echo` tool in my available functions. The only tool available to me is the `view` function for viewing files and directories.
TOOL_NOT_AVAILABLE
The redacted debug logs show the filtered tool list sent to the nested leaf:
1.0.73 nested leaf tools:
view
repro-mcp-echo (MCP: repro-mcp/echo)
1.0.74 nested leaf tools:
view
1.0.74 nested leaf tools after adding repro-mcp/echo only to the root:
view
1.0.74 nested leaf tools after adding repro-mcp/echo to the coordinator:
view
repro-mcp-echo (MCP: repro-mcp/echo)
The 1.0.73 events.jsonl records a repro-mcp-echo request and successful completion:
{
"name": "repro-mcp-echo",
"mcpServerName": "repro-mcp",
"mcpToolName": "echo",
"arguments": {
"message": "nested-probe"
}
}
{
"success": true,
"result": "MCP_ECHO_OK:nested-probe"
}
The 1.0.74 nested leaf makes zero tool calls. Its events.jsonl contains no repro-mcp-echo request, execution start, or execution completion event.
After the coordinator declares repro-mcp/echo, the 1.0.74 leaf makes one MCP tool call and returns MCP_ECHO_OK:nested-probe.
After only the root declares repro-mcp/echo, the 1.0.74 leaf still makes zero tool calls. This rules out a session-root grant requirement and isolates the behavior to the immediate parent-child boundary.
Expected behavior
A leaf custom agent should receive the tools declared in its own frontmatter when an allowed parent agent dispatches it. A coordinator should not need to repeat every MCP tool declaration from its child agents.
The custom agents configuration reference describes tools as the “list of tool names the custom agent can use.” Its tools-processing section says that a specific list “enables only those tools” for that agent. It does not document inheritance, parent-child intersection, or a requirement that an immediate parent duplicate a child's tools.
The 1.0.74 nested run should expose repro-mcp-echo to nested-leaf and return:
If this behavior is desired rather than an introduced bug, the documentation should be updated to reflect this requirement.
Additional context
| Field |
Value |
| First affected version tested |
GitHub Copilot CLI 1.0.74 |
| Working control version |
GitHub Copilot CLI 1.0.73 |
| OS |
SUSE Linux Enterprise Server 15 SP4, x86_64 |
| Kernel |
Linux 5.14.21 |
| Shell |
bash |
| MCP server runtime |
Node.js 24.16.0 |
| Model |
claude-sonnet-4.5 |
process-1.0.73-nested-redacted.log
process-1.0.74-nested-parent-grant-redacted.log
process-1.0.74-nested-redacted.log
process-1.0.74-nested-root-grant-redacted.log
mcp-server.mjs.txt
Describe the bug
A custom agent invoked two levels below the session root does not receive the MCP tools declared in its own
tools:frontmatter as described in the Copilot CLI documentation. If a middle-level agent declares the tool (e.g.repro-mcp/echo), then the leaf agent receives the tool and succeeds.The same leaf agent can call its MCP tool when selected directly. It can also call the tool through the nested agent chain on Copilot CLI 1.0.73. Starting with 1.0.74, the nested leaf LLM receives only the built-in
viewtool. The CLI does not report a configuration error; the leaf agent executes without the MCP tool.Declaring
repro-mcp/echoonly on the top-level root does not help without the cooresponding middle-level tool change. The leaf still receives onlyview. The observed rule depends on the leaf's immediate parent.Agent chain:
Affected version
GitHub Copilot CLI 1.0.74. This is a regression from GitHub Copilot CLI 1.0.73.
Steps to reproduce the behavior
1. Register the attached MCP server
Save the attached
mcp-server.mjs, then create$COPILOT_HOME/mcp-config.json:{ "mcpServers": { "repro-mcp": { "command": "node", "args": ["/absolute/path/to/mcp-server.mjs"], "env": { "REPRO_CALL_LOG": "/tmp/repro-mcp-calls.jsonl" } } } }2. Create three repository agents
.github/agents/nested-root.agent.md.github/agents/nested-coordinator.agent.md.github/agents/nested-leaf.agent.md3. Run the direct control
Run from the directory containing
.github/agents/:COPILOT_HOME=/tmp/copilot-1.0.74-home \ COPILOT_AUTO_UPDATE=false \ /path/to/copilot-1.0.74 \ --agent nested-leaf \ --allow-all-tools \ --disable-builtin-mcps \ --no-custom-instructions \ --log-level all \ --log-dir /tmp/copilot-1.0.74-direct-logs \ -p 'Call your required echo tool with message "direct-probe".'The direct call succeeds:
4. Run the nested case
COPILOT_HOME=/tmp/copilot-1.0.74-home \ COPILOT_AUTO_UPDATE=false \ /path/to/copilot-1.0.74 \ --agent nested-root \ --allow-all-tools \ --disable-builtin-mcps \ --no-custom-instructions \ --log-level all \ --log-dir /tmp/copilot-1.0.74-nested-logs \ -p 'Follow your agent instructions exactly and run the nested probe.'5. Test a top-level-only grant
Change the root agent's tool list while leaving the coordinator unchanged:
Run the command from step 4 again. On 1.0.74, the leaf still reports
TOOL_NOT_AVAILABLE.6. Test an immediate-parent grant
Restore the root agent to
tools: ['agent'], then change one line innested-coordinator.agent.md:Do not change
nested-leaf.agent.md. Run the command from step 4 again.The coordinator's instructions still require it to delegate rather than call
repro-mcp/echoitself.7. Repeat steps 3 through 6 with Copilot CLI 1.0.73
Use a separate
COPILOT_HOMEcontaining the same MCP configuration. KeepCOPILOT_AUTO_UPDATE=falseso each command runs the requested version.Expected behavior
Actual behavior
The direct leaf call succeeds on both versions. On 1.0.74, the nested result depends specifically on whether the immediate coordinator duplicates the leaf's MCP tool declaration:
MCP_ECHO_OK:direct-probeMCP_ECHO_OK:nested-probeMCP_ECHO_OK:nested-probeMCP_ECHO_OK:nested-probeMCP_ECHO_OK:direct-probeTOOL_NOT_AVAILABLETOOL_NOT_AVAILABLEMCP_ECHO_OK:nested-probeThe 1.0.74 nested leaf returns:
The redacted debug logs show the filtered tool list sent to the nested leaf:
The 1.0.73
events.jsonlrecords arepro-mcp-echorequest and successful completion:{ "name": "repro-mcp-echo", "mcpServerName": "repro-mcp", "mcpToolName": "echo", "arguments": { "message": "nested-probe" } }{ "success": true, "result": "MCP_ECHO_OK:nested-probe" }The 1.0.74 nested leaf makes zero tool calls. Its
events.jsonlcontains norepro-mcp-echorequest, execution start, or execution completion event.After the coordinator declares
repro-mcp/echo, the 1.0.74 leaf makes one MCP tool call and returnsMCP_ECHO_OK:nested-probe.After only the root declares
repro-mcp/echo, the 1.0.74 leaf still makes zero tool calls. This rules out a session-root grant requirement and isolates the behavior to the immediate parent-child boundary.Expected behavior
A leaf custom agent should receive the tools declared in its own frontmatter when an allowed parent agent dispatches it. A coordinator should not need to repeat every MCP tool declaration from its child agents.
The custom agents configuration reference describes
toolsas the “list of tool names the custom agent can use.” Its tools-processing section says that a specific list “enables only those tools” for that agent. It does not document inheritance, parent-child intersection, or a requirement that an immediate parent duplicate a child's tools.The 1.0.74 nested run should expose
repro-mcp-echotonested-leafand return:If this behavior is desired rather than an introduced bug, the documentation should be updated to reflect this requirement.
Additional context
claude-sonnet-4.5process-1.0.73-nested-redacted.log
process-1.0.74-nested-parent-grant-redacted.log
process-1.0.74-nested-redacted.log
process-1.0.74-nested-root-grant-redacted.log
mcp-server.mjs.txt