Skip to content

Codex replies to earlier messages instead of latest one in conversations #8648

@BobbyWang0120

Description

@BobbyWang0120

What version of Codex is running?

0.77.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.2-xhigh

What platform is your computer?

No response

What issue are you seeing?

In multi-message conversations with Codex, the assistant sometimes responds to an earlier message instead of the most recent one. For example, I had a conversation with six messages. By the sixth message, I had moved on to asking a different question, but Codex's final summary acted as if it was still on the third message. The third message asked about a question A and its solution, while the sixth asked about question B. Even though the topic changed at the sixth message, Codex still responded about question A. This happens frequently and suggests that Codex may be referencing the wrong message in the conversation history.

What steps can reproduce the bug?

  1. Start a conversation in Codex and send several messages (e.g., six messages).
  2. In an earlier message (e.g., the third message), ask question A and wait for a response.
  3. In a later message (e.g., the sixth message), ask a different question B.
  4. Observe that Codex's summary or response refers back to question A rather than answering question B.
    This suggests that Codex is using the wrong message as context.

What is the expected behavior?

Codex should respond to the current message, acknowledging the latest context. After a user moves from question A to question B, the assistant should answer question B and not revert to a previous question. The summarization should maintain the correct message pointer in the conversation.

Additional information

the pattern is randomly happening, and it has a higher chance to happen after we compacting the context within the conversation

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentIssues related to the core agent loopbugSomething isn't workingcontextIssues related to context management (including compaction)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions