Infinite loop inspecting agent status and missing functions.exec tool with GPT-5.6 model
What version of Codex CLI is running?
0.147
What subscription do you have?
Pay-as-you-go
Which model were you using?
5.6 sol
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
Codex doctor report
What issue are you seeing?
The agent gets stuck in an infinite loop checking for "No agents completed yet" and investigating "functions.exec" when using the gpt-5.6 model. The task never completes and no error message is returned.
What steps can reproduce the bug?
• Inspecting process status and files
• Checking process completion status
• Finished waiting
└ No agents completed yet
• Planning process verification
• Investigating missing functions.exec tool
• Finished waiting
└ No agents completed yet
• Investigating missing exec tool usage
• Verifying hidden functions.exec availability
• Testing direct functions.exec usage
• Finished waiting
└ No agents completed yet
• Investigating dynamic availability of functions.exec
• Reimplementing missing functions.exec definition
• Verifying dynamic tool execution
What is the expected behavior?
_No response_
Additional information
_No response_
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Looked at the multi-agent wait machinery on
main@ 1f41cc5d92 — the loop you captured is close to the rational model response to what the tools actually return, which makes this fixable at the tool layer rather than the model layer.1.
waittells the model nothing on timeout. The v2 wait handler returns, in total,{"message": "Wait timed out.", "timed_out": true}— no per-agent states, no distinction between "children are working", "children are stuck", and "children died":https://github.com/openai/codex/blob/1f41cc5d92722748e45cae9cecc6d883a4e7cbb1/codex-rs/core/src/tools/handlers/multi_agents_v2/wait.rs#L140-L156
(The
No agents completed yetline in your transcript is the TUI's rendering of the empty agent-state map —tui/src/multi_agents.rs#L590— not information the model can act on.) A model whose children never complete gets an endless series of indistinguishable timeouts, so "wait → inspect → wait" repeats forever; there's no terminal state for it to observe and no loop-breaker in the harness (no cap on consecutive no-progress waits).2. The
functions.execfixation matches a real tool-registration gap, not just hallucination. #38960 (which the dedup bot linked) reports that the parent session in this configuration exposes only wait + collaboration tools — noexec. A model instructed to verify progress, with no execution tool in its registry, inventingfunctions.execand then "reimplementing" it is exactly the failure shape you'd expect from that gap. Your transcript is effectively #38960's missing-exec plus the wait-starvation above compounding each other.Fix outline:
list_agentsreads them); include whether each child is running/failed/never-started. A model that can see "child X failed to spawn" stops waiting for it.wait(terminal failure outcome) instead of an indistinguishable timeout.Also related for the maintainers triaging: #38989 documents runaway delegation in the same multi-agent v2 surface — (3) would bound the damage of that class too.