Skip to content

Codex can get stuck retrying wait after a cell ID is reported as not found #32816

Open

Description

@coopersomsy494-spec

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:

  1. Codex starts an exec operation and receives a cell ID.

  2. The operation finishes and the cell is closed.

  3. Codex later calls wait with that old cell ID.

  4. wait returns:

    exec cell <id> not found
    
  5. Codex calls wait again with the same ID instead of stopping or using another way to check the task.

  6. 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

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    tool-callsIssues related to tool calling
    on Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions