MCP tools fail to run many times
What version of Codex is running?
0.47.0
What subscription do you have?
Pro
Which model were you using?
gpt-5-codex high
What platform is your computer?
macOS
What issue are you seeing?
Is there a verbose / debug mode to see what codex is doing? Many times it'll call a MCP tool either incorrectly (missing out on required parameters or simply passing the wrong value even though the schema describes it properly).
99% of the times the first time it calls a tool it'll come back with something like
Error: tool call error: tool call failed for `zen/chat`
Then it'll try again (with what seems like the same parameters) and it'll work. There seems to be no such issues with Claude Code, only codex has been doing this consistently every single time.
I'd like debug this and would appreciate some help. Thank you!
What steps can reproduce the bug?
Use a MCP tool such as Zen: https://github.com/BeehiveInnovations/zen-mcp-server
Ask codex to chat with gemini pro to discuss something and it'll fail the first couple of times before succeeding eventually.
What is the expected behavior?
_No response_
Additional information
_No response_
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
It seems Codex isn't waiting long enough for a response - the MCP server in this case is making a network call and I can see from the logs it DOES respond after about 1.5minutes (large request), Codex seems to end with a 'tool call failed' within 30 seconds
@aibrahim-oai any help on this please?
@guidedways Can you try again with an 0.48 alpha? We now show you and the model underlying tool call errors.
https://github.com/openai/codex/releases/tag/rust-v0.48.0-alpha.2
Thank you, will do. Yes if there's a way to debug these errors, that would be great.
I also suspected it's got something to do with the default timeout - will experiment with turning that up / down along with this build.
@gpeal thank you, that was it:
I can now see the exact reason. The default timeout was too short for some large requests.
Great, go ahead and increase the timeout
https://github.com/openai/codex/blob/main/docs/config.md#other-configuration-options