multi_agent_v2 causes subagents to loop on MCP resource listing instead of completing simple tasks
What issue are you seeing?
When multi_agent_v2 is enabled in Codex config, a spawned subagent can fail to complete even a trivial task and instead appears to loop on MCP listing calls.
Observed behavior:
- subagent creation succeeds
- task dispatch succeeds
- the parent agent waits until timeout
- the subagent does not return the requested final response
- in the UI, the subagent repeatedly invokes MCP listing tools such as
List MCP ResourcesandList MCP Resource Templates - the stuck subagent has to be manually closed
- the subagent view also showed text that looked like parent-agent orchestration commentary rather than a normal child-agent response
A minimal example was a subagent instructed to return exactly one line: PONG. Instead of replying with PONG, it appeared to enter the MCP tool loop.
What steps can reproduce the bug?
- Enable
multi_agent_v2in Codex config. - Spawn a subagent with a minimal instruction such as:
Reply with exactly one line: PONG
- Do not require any file reads, file writes, tests, or git operations.
- Wait for the subagent result from the parent agent.
- Observe that the subagent does not return
PONG, the parent wait times out, and the UI shows repeated MCP listing calls instead. - Also observe that the subagent view may display text resembling the parent agent's own narration instead of an isolated child response.
What is the expected behavior?
The subagent should immediately return the requested one-line response:
PONG
It should not call unrelated MCP listing tools for this task, and the parent agent should receive the final result without timing out.
The subagent view should also reflect the child task itself, not surface what looks like parent-agent orchestration commentary as though it were the child agent's own output.
Additional information
Environment
- OS: Windows 11 (
10.0.22631) - Shell: PowerShell
7.6.0 - Codex CLI:
0.118.0 - Config difference observed locally:
- works:
multi_agentenabled,multi_agent_v2disabled - fails:
multi_agent_v2enabled
Logs / screenshots
Textual observations from the failing run:
- parent-side
wait_agenttimed out while waiting for the subagent result - the subagent UI repeatedly showed MCP listing activity instead of producing a final reply
- repeated calls included:
List MCP ResourcesList MCP Resource Templates- the subagent view also showed this Chinese sentence:
我已经把第二个测试压缩成"只返回一行 PONG"的最小任务;接下来只看它能不能把结果稳定回传,不涉及仓库文件和执行负担。
That sentence reads like parent-agent orchestration commentary, not like something a child agent should independently say for a one-line PONG task.
I used fork_context, so some inherited context is expected. However, surfacing what appears to be parent-style narration in the child-agent view still seems abnormal and may indicate context or message leakage in the multi_agent_v2 runtime/UI path.
A screenshot is already attached in an issue comment.
Possible regression
This looks specific to the multi_agent_v2 runtime or orchestration path rather than the task itself.
As a control comparison, with multi_agent_v2 disabled and regular multi_agent behavior used instead, the same kind of simple subagent task does not exhibit this problem.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional evidence from the failing run:
Reply with exactly one line: PONGPONGList MCP ResourcesList MCP Resource TemplatesI also have a screenshot showing the repeated MCP listing calls in the subagent UI. If needed, I can provide it separately.
<img width="772" height="724" alt="Image" src="https://github.com/user-attachments/assets/ffcffa27-6519-4d98-901c-387c63e90471" />
One more diagnostic detail:
The subagent view did not just fail to return
PONG. It also displayed what looked like parent-agent orchestration narration:That does not look like normal child-agent behavior for a one-line task. It looks more like parent-thread narration or context/message leakage being surfaced inside the child-agent view.
I used
fork_context, so inherited context is expected at some level, but this still seems like the wrong content is being surfaced in the wrong place.This feature is still under development — not yet ready for usage or bug reports.