Timeout_ms is not respected for shell commands that launch child processes (such as `next dev`)
What version of Codex is running?
0.46.0
What subscription do you have?
Pro
Which model were you using?
gpt-5-codex
What platform is your computer?
Linux 6.8.0-71-generic x86_64 x86_64
What issue are you seeing?
Commands with child processes will hang indefinitely and the agent will be stuck until the command finishes (which it never will). This requires the human to intervene with ctrl + c, which is not ideal for autonomous use (such as using the Codex SDK to do some background work without a human directly involved).
What steps can reproduce the bug?
The easiest way to repro is to ask the agent to run pnpm next dev (requires installing pnpm and nextjs). You can ask the agent to set timeout_ms to 10,000 or leave it null - either way, it will hang.
What is the expected behavior?
The command should terminate at timeout_ms and the agent should be able to continue.
Additional information
I fixed it and left a PR: https://github.com/openai/codex/pull/5258
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗