Codex not waiting for commands to complete before continuing
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.406.31014 (1395)
What subscription do you have?
The maximum one
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
in the CLI codex will wait for a command to finish executing before continuing.
In the Codex App, it will start a long-running command, and then continue without waiting for it to terminate. usually then this results in the model looping over and over again "Waiting for completion... Still waiting for it to complete... It hasn't completed yet, let me check the logs..." which is just wasting time and tokens. And sometimes it decides to start another instance of the test during this loop which breaks the first one.
I asked the model if it has the tool to wait for a terminal command to finish, and it does not. It should be able to (similar to codex cli) wait for the terminal command to finish, or at least send <end of turn> and wait that way.
What steps can reproduce the bug?
- Ask it to run a long-lived command (sleep 120)
- Watch how it doesn't wait for the command to finish
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
The Codex app and CLI use the same underlying harness. Same code, same logic. You shouldn't see any difference in behavior. The model will intentionally use background terminals when it thinks it's safe to do so. So if you're seeing a difference in behavior here, it's probably because you're using different models or reasoning efforts or you've given the model different instructions (directly in your prompt or via AGENTS.md).