Skip to content

Timeout_ms is not respected for shell commands that launch child processes (such as next dev) #5229

Closed

Description

@willsmanley

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: #5258

Activity

  1. added
    bug
    on Oct 15, 2025
  2. added
    enhancement
    on Oct 15, 2025
  3. willsmanley commented on Oct 16, 2025

    @willsmanley
    Author

    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

  4. 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
  5. removed
    enhancement
    on Nov 2, 2025
  6. added
    tool-calls
    on Nov 15, 2025
  7. etraut-openai commented on Nov 17, 2025

    @etraut-openai
    Contributor

    #6575 addresses this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtool-calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions