openai / openai/codex

Editing a quickly interrupted message may incorrectly roll back the previous turn

Open
#43,662 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app app-server bug
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.901.51231 (build 8109), Codex desktop surface in ChatGPT.app. Embedded Codex Core: 0.152.1. App version read from installed bundle metadata.

What subscription do you have?

Pro

What platform is your computer?

macOS 26.3.2 (25D2150), Apple Silicon. uname -mprs: Darwin 25.3.0 x86_64 i386 The diagnostic shell was running under Rosetta.

What issue are you seeing?

interrupted an existing task A, submitted a NEW message B, then quickly interrupted B before any assistant output appeared. I edited B and resubmitted it.

Afterward, the assistant claimed that operations already executed during A had not happened. I only edited B, not the earlier message that started A.

The logs show:

  • A's tool calls had successfully completed or launched background work.
  • B's turn started and was interrupted approximately 1.65 seconds later.
  • B had no ordinary user-message record, only turn-start and interruption records.
  • Editing B triggered thread/rollback with numTurns=1.
  • After resubmission, the assistant incorrectly described A's already-executed operations as not started.

This appears to roll back context from an earlier turn rather than only the newly interrupted message.

What steps can reproduce the bug?
  1. Let Codex execute some operations in task A.
  2. Stop A.
  3. Send a new message B.
  4. Immediately stop B before any assistant output appears.
  5. Edit and resubmit B.
  6. Check whether Codex still retains the execution history from A.

This sequence was observed in an actual session; a deterministic minimal reproduction has not yet been established.

What is the expected behavior?

Editing B should affect only B. It must preserve the context and execution history from A.

Quickly interrupting a newly submitted message should not cause a subsequent edit to roll back an earlier turn.

Additional information

Related: https://github.com/openai/codex/issues/23000

The logs suggest that B's missing user-message boundary may cause rollback(1) to target an earlier user turn. This is a suspected cause, not a confirmed implementation-level diagnosis.

The impact is not merely missing text: forgetting already-executed operations can cause Codex to repeat them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sequence in the Codex desktop surface and inspect the logs around B's missing user-message record and the rollback with numTurns=1. Compare the behavior with related issue 23000; done means editing B preserves A's completed operations and does not cause them to be described as undone.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.