Timeout compatibility issues when calling tools.
Resolved 💬 8 comments Opened Dec 2, 2025 by n-WN Closed Mar 29, 2026
💡 Likely answer: A maintainer (muyuanjin, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.63.0
What subscription do you have?
plus
Which model were you using?
gpt-5.1
What platform is your computer?
Darwin 24.5.0 arm64 arm
What issue are you seeing?
Frequent issues are related to the introduction of the timeout parameter.
• Ran bash -lc 'jq ".challenges[0:10]" challs.json | sed -n "1,120p"','timeout_ms':600000,'workdir':'/Users/test/my/subgroup'}
zsh:1: parse error near `}'
What steps can reproduce the bug?
You just need to let Codex execute the command, and it will automatically add the timeout parameter. However, there's an issue with how this parameter is parsed; once, it wrote "timeout" into a git commit message
What is the expected behavior?
_No response_
Additional information
_No response_
8 Comments
Seeing the same thing here – I think the root cause is how the model formats the
shell_commandtool call aftertimeout_mswas added.Codex expects
function_call.argumentsto be a JSON string that deserializes into something like:But with
gpt-5.1it sometimes “leaks” fields liketimeout_ms/workdirinto thecommandstring itself, so the shell ends up seeing:and that’s exactly the
zsh: parse error near '}'you’re hitting.One thing that helped me was adding a small instruction to my agent prompt, just for
shell_command:FWIW, I’ve noticed
gpt-5.1-codex-maxalmost never does this, while plaingpt-5.1does it more often. Would be nice if the Codex CLI could inject a stricter built‑in instruction like the snippet above automatically when you’re using non‑Codex models.I'll finish this part.
I found this part of the problem, but I don't know if it is reasonable to change the prompt+ to process the output of llm, (do you need the consent of the contributor?
Helpful context about gpt-5.1 vs. gpt-5.1-codex-max, thank you!
Can I be assigned to implement it? For a model that has already been released, updating the same version number is relatively low, so modifying the parsing implementation of Codex might be better. @dylan-hurd-oai
There may be a new development regarding this issue; the root cause might be that Codex tends to use
bash -lc, leading to command wrapping. The following prompt would be more concise and effective:This bug report hasn't received any upvotes or additional posts in four months. Closing.