You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Timeout_ms is not respected for shell commands that launch child processes (such as next dev) #5229
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.
This is not a duplicate. I discovered the main issue is actually that timeout_ms is not respected if the shell command launches child processes. I put in a fix here: #5258
changed the title [-]Commands sometimes hang indefinitely[/-][+]Timeout_ms is not respected for shell commands that launch child processes (such as `next dev`)[/+]on Oct 16, 2025
Activity
github-actions commentedon Oct 15, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
rmcommand causescodex exec --dangerously-bypass-approvals-and-sandboxto stall forever #4565Powered by Codex Action
willsmanley commentedon Oct 16, 2025
This is not a duplicate. I discovered the main issue is actually that timeout_ms is not respected if the shell command launches child processes. I put in a fix here: #5258
[-]Commands sometimes hang indefinitely[/-][+]Timeout_ms is not respected for shell commands that launch child processes (such as `next dev`)[/+]etraut-openai commentedon Nov 17, 2025
#6575 addresses this issue.