Codex can get stuck retrying wait after a cell ID is reported as not found
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.62119
What subscription do you have?
N/A
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
During a longer task, Codex called wait for an exec cell that was no longer available and received:
exec cell <id> not found
Instead of stopping that wait path, Codex called wait again with the same cell ID. The same call and error were repeated multiple times until the loop was interrupted.
The repeated calls were selected by the agent during the task. They were not repeated user commands.
I also checked the tool behavior separately: after an exec cell completes and its final result has been returned, another wait for the same ID returns not found. Repeating that request is still accepted and returns the same error again. This does not by itself reproduce the agent behavior, but it explains why the agent can remain in the loop once it starts.
What steps can reproduce the bug?
I do not yet have a prompt that triggers the agent loop every time. The observed sequence was:
- Codex starts an exec operation and receives a cell ID.
- The operation finishes and the cell is closed.
- Codex later calls
waitwith that old cell ID. waitreturns:
``text``
exec cell <id> not found
- Codex calls
waitagain with the same ID instead of stopping or using another way to check the task. - Steps 4 and 5 repeat.
The underlying tool behavior can be checked independently by waiting for a cell to finish and then calling wait more than once with the completed cell ID. Each later call returns the same not found error.
What is the expected behavior?
When wait reports that a cell ID was not found, Codex should stop waiting on that ID instead of immediately repeating the same call.
It should treat the wait handle as unavailable without assuming that the underlying command failed. It can then use any available output or task-status mechanism, or report that the task status needs to be checked.
A runtime guard against repeated waits on an ID already reported as not found could also prevent this loop when the agent makes the wrong decision.
Timeouts, network failures, and other temporary errors should remain retryable because they do not prove that the cell ID is invalid.
Additional information
_No response_