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 ↗

3 Comments

wbdb · 11 months ago

Could that be one of the reasons? https://x.com/thsottiaux/status/1967996885500928459 / (But they didn't make it dumber & reset the limits - https://x.com/sama/status/1968316161113882665 🎉)

tvg-jpgxl · 11 months ago

I don't think so, since I noticed the same with GPT-5 (non-Codex), but perhaps their slowdowns apply to all GPT-5 models.

Just in case, I tried again today with GPT-5-minimal, but that's even worse. I'm also seeing more bash-related failures now:

$ rg --files | rg 'hi\.sh$' || true
bash: line 1: rg: command not found

or

$ ls -la && printf "\nSearching for hi.sh...\n" && find . -maxdepth 3 -type f -name 'hi.sh' -print
command timed out after 60689 milliseconds 

Actually running the script does succeed, but again after 60 seconds:

$ [ -x ./hi.sh ] && ./hi.sh || [ -f ./hi.sh ] && bash ./hi.sh || echo 'hi.sh not found in current directory'
pyenv: cannot rehash: /home/tvg/.pyenv/shims/.pyenv-shim exists
Hello, world!
✓ • 1m 00s

Is there a way to get a more detailed view of what the tool is doing? The command timeout and command success both last ~60 seconds, so that tells me Codex is not capturing the exit but simply waiting for a timeout.

samargy · 11 months ago