Executing local commands takes an inordinate amount of time

Resolved 💬 3 comments Opened Sep 17, 2025 by tvg-jpgxl Closed Jan 10, 2026

What version of Codex is running?

0.36.0

Which model were you using?

gpt-5-codex low

What platform is your computer?

Linux 6.14.0-110029-tuxedo x86_64 x86_64

What steps can reproduce the bug?

  1. Create a simple script hi.sh that only contains the following command: echo "Hello, world!"
  2. Make the scrip executable and assert that it completes correctly and instantly by running ./hi.sh or bash ./hi.sh or bash -lc ./hi.sh.
  3. Start Codex in the same directory, give permission to execute.
  4. Prompt: "run hi.sh"

What is the expected behavior?

Codex executes the hi.sh script, which takes < 1 second, and reports that the output was "Hello, world!"

What do you see instead?

Codex apparently tries to execute the script, but it takes 60> seconds. The live status sometimes states "Preparing to run shell command" or "Executing <something>", but nothing happens.

The command completes after more than 60 seconds.

  • Codex final answer: "Ran ./hi.sh → printed “Hello, world!” after a pyenv warning (pyenv: cannot rehash: /home/tvg/.pyenv/shims/.pyenv-shim exists). Script exited cleanly."
  • The .pyenv-shim warning I've not seen before. I do have and use PyEnv, but not for Codex.

Additional information

Same problematic behavior occurs with medium and high reasoning efforts, and GPT-5.

I think it's safe to say that executing echo "Hello, world" should not take 60 seconds. I'm not sure how to troubleshoot this further; help is appreciated!

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗