Codex Desktop: “Last turn” review shows the latest worktree diff instead of the selected historical turn

Open 💬 0 comments Opened Aug 26, 2026 by kingofrude

Codex App version

26.818.41509 (build 6962)

Platform

macOS, Apple Silicon

Severity

High — correctness and user-trust failure in the code-review surface.

This is not a cosmetic glitch. The review pane claims to show a selected historical turn while rendering a different, newer patch. A code-review tool must never mislabel the source of the code it is showing.

What issue are you seeing?

After completing multiple turns in separate Codex worktrees, clicking the file-change card from an older turn opens the Review pane with “Last turn” selected, but the pane displays the diff from the newest active worktree instead of the selected historical turn.

The selector/header and the backing diff source are out of sync.

In the observed case:

  • Historical turn A's card reported 5 files changed, +126 / -6.
  • Newer turn B reported 3 files changed, +13 / -1.
  • Clicking turn A's change card opened a pane labelled “Last turn”.
  • The pane actually showed turn B's +13 / -1 patch and paths from turn B's worktree.

This makes historical review unreliable and creates a real risk of reviewing, approving, reverting, staging, or committing the wrong changes.

Steps to reproduce

  1. Start a Codex Desktop task in a Git repository.
  2. Complete turn A in a Codex worktree and modify one set of files.
  3. Complete turn B in a different/latest worktree and modify a different set of files.
  4. Scroll back to turn A.
  5. Click turn A's “N files edited” card to inspect that historical change.
  6. Observe that Review opens with “Last turn” selected.
  7. Compare the file list, line counts, paths, and hunks with turn A and turn B.

Expected behavior

Opening a historical turn's change card must show the immutable diff associated with that exact turn/checkpoint/worktree.

The Review label, file list, diff stats, paths, and hunks must all refer to the same turn.

Actual behavior

The UI indicates that the historical/last-turn view is selected, while the Diff pane remains bound to the newest active worktree and renders the latest patch.

Why this needs urgent attention

Displaying the wrong patch under a historical-turn label is a data-integrity defect in the primary review workflow. It is worse than an empty or failed diff because the UI presents incorrect information as if it were authoritative.

Please treat this as a correctness bug, not a minor UX issue. Until the backing diff can be switched reliably, the app should fail closed—show an explicit error or disable the historical selector—instead of silently displaying another turn's changes.

Please also add a regression test that creates two turns with disjoint file sets/worktrees and verifies that opening each historical change card resolves to its own checkpoint.

A screenshot demonstrating the mismatch is available if maintainers need it; repository and file names have intentionally been omitted because they belong to a private codebase.

View original on GitHub ↗