codex - 💡(How to fix) Fix Codex not waiting for commands to complete before continuing [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17292Fetched 2026-04-11 06:18:24
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2closed ×1mentioned ×1
RAW_BUFFERClick to expand / collapse

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?

  1. Ask it to run a long-lived command (sleep 120)
  2. Watch how it doesn't wait for the command to finish

extent analysis

TL;DR

The Codex App should be modified to wait for a terminal command to finish executing before continuing, similar to the Codex CLI.

Guidance

  • The issue is likely caused by the Codex App not waiting for the terminal command to finish, resulting in unnecessary loops and potential breaks in the test.
  • To verify the issue, reproduce the bug by asking the model to run a long-lived command (e.g., sleep 120) and observe if it waits for the command to finish.
  • A potential workaround could be to send an <end of turn> signal after initiating the command and wait for the response, although this may not be a perfect solution.
  • The model's ability to wait for a terminal command to finish should be implemented, similar to the Codex CLI, to resolve the issue.

Example

No code snippet is provided as it is not explicitly stated or strongly implied in the issue.

Notes

The issue seems to be specific to the Codex App and not the Codex CLI, which already has the desired functionality. The exact implementation details are not provided, so a precise solution cannot be given.

Recommendation

Apply workaround: Send an <end of turn> signal after initiating the command and wait for the response, as this may help mitigate the issue until a proper fix is implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING