Skip to content

[Windows][Desktop 26.831.1445.0] Edited prompts reopen on an older conversation branch and hide later completed turns #42269

Open

Description

@MareTech-codex

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

26.831.1445.0

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Summary

On Codex Desktop for Windows, tasks in which a previously sent prompt was edited can later reopen on an older conversation branch.

All later completed user and assistant turns disappear from the visible UI. In one affected task, the visible conversation rolled back almost to the initial prompt, even though a long conversation and many completed turns had existed after it.

The missing history still exists in the local rollout JSONL files under .codex/sessions and can be recovered by another Codex task inspecting those files. This appears to be a conversation-branch selection or resume-state bug, not permanent transcript deletion.

This has occurred in multiple unrelated local tasks.

Environment

  • Codex Desktop App: 26.831.1445.0
  • App-server version reported in the desktop log: 0.152.0
  • Subscription: ChatGPT Pro
  • Platform: Microsoft Windows NT 10.0.26200.0 x64
  • Task type: Local
  • Session history mode: paginated
  • Session memory mode: disabled

Suspected trigger

The affected tasks had prompts that were edited after being sent.

Editing created additional rollout JSONL files with the same root session ID and history_base references to previous branches.

Some short edit branches ended with turn_aborted, while other branches contained the later conversation and successful task_complete events.

After reopening or reconnecting to the task, the Desktop app selected an older/interrupted branch instead of the branch containing the later completed conversation.

Sending many additional messages after the edited prompt did not prevent the rollback. One affected task had a very long completed conversation after the edit but still reopened almost at the initial prompt.

Steps to reproduce

The following prompts are sanitized equivalents and are not the private project prompts used in the affected tasks.

  1. Create a local task in Codex Desktop for Windows.

  2. Send a prompt such as:

    Continue the current task using the existing project state.

  3. Use the message edit function to change the sent prompt to something such as:

    Correction: keep the existing project state, but change requirement X to Y.

  4. Continue the conversation for multiple user and assistant turns.

  5. Wait for the subsequent turns to complete successfully.

  6. Switch to another task, reconnect to the task, or restart the Desktop app.

  7. Reopen the affected task.

Actual behavior

The task may reopen on an older conversation branch or almost at the initial prompt.

Later completed turns are not visible anywhere in the UI, and scrolling does not reveal them.

The task may also appear to be interrupted or still streaming even though the branch containing the later work has completed.

There is no warning that the visible transcript is stale or that another branch containing later completed turns exists.

Expected behavior

After editing a sent prompt, the edited branch and all later completed turns should remain the selected, visible branch after switching tasks, reconnecting, or restarting the app.

If multiple branches exist, the app should either:

  • restore the branch most recently used and completed;
  • provide a branch selector or recovery UI; or
  • display an explicit reconciliation error instead of silently showing an older transcript.

Local forensic evidence

The local transcript data was not deleted.

For the affected tasks:

  • Multiple rollout JSONL files have the same root session ID.
  • Edited branches contain history_base metadata.
  • Some edit attempts end with turn_aborted.
  • Other branch files contain the missing later conversation and task_complete.
  • The affected session metadata reports memory_mode: disabled.
  • The completed branch files remain parseable.

A Desktop log recorded the following inconsistent resume state:

maybe_resume_success ... latestTurnStatus=interrupted ... markedStreaming=true

The app therefore recognized the latest selected turn as interrupted while simultaneously restoring the task as streaming.

This appears consistent with the stale “Continue” state shown in the UI.

Ordinal verification

I checked the affected completed rollout files for non-consecutive or duplicate top-level ordinals.

No ordinal discontinuities were found in the inspected completed branches.

Therefore this does not appear to be the same failure as the duplicate-ordinal projection bug reported in #41566.

Transcript sizes

The issue is not limited to one transcript size:

  • One affected completed branch was approximately 22 MB with 4,884 records.
  • Another image/tool-heavy affected task had branches of approximately 400–540 MB.
  • Both the smaller and larger tasks exhibited the visible branch rollback.

Large transcripts may amplify the loading problem, but they are not the sole trigger.

In-app feedback result

In-app feedback was submitted from one affected task.

The feedback text was accepted, but its attachments failed to upload twice with the full error:

failed to upload feedback: feedback report was accepted, but some attachments failed to upload

The corresponding Desktop log recorded:

  • method: feedback/upload
  • error code: -32603

Because the affected transcript branches are very large and contain private project data, I am not attaching the raw JSONL files publicly.

I can provide sanitized branch metadata and relevant log excerpts privately if needed.

Impact

This makes long-running Codex tasks unreliable as durable project records.

Users may believe that days of conversation, decisions, and completed work have been deleted. Continuing from the stale branch can also cause duplicated work or decisions based on outdated context.

A supported branch recovery/reindex mechanism is needed even after the underlying selection bug is fixed.

Related issues found before filing

These issues have similar symptoms, but none documents the same edited-prompt branch trigger together with the evidence above:

This report differs from #41566 because no duplicate ordinals were found in the inspected affected rollouts.

What steps can reproduce the bug?

No repository code snippet is required or applicable because this is a Codex Desktop conversation-history and branch-restoration bug.

The following is the smallest UI reproduction I can currently provide.

Reproduction steps

  1. Open Codex Desktop for Windows.
  2. Create or open a local task.
  3. Send a prompt.

Sanitized equivalent prompt:

Continue the current task using the existing project state.
  1. Use the Edit action on the previously sent prompt.

Sanitized equivalent edited prompt:

Correction: preserve the existing project state, but change requirement X to Y.
  1. Continue working in the edited conversation for multiple turns.
  2. Wait until the later assistant turns complete successfully.
  3. Switch to another task, close and reopen the affected task, reconnect to the local host, or restart Codex Desktop.
  4. Open the affected task again.

Actual result

The app may restore an older conversation branch, sometimes almost back to the initial prompt.

Later completed user and assistant turns are no longer visible in the UI, even though they remain present in the local rollout JSONL files.

Sending additional messages after the edited prompt does not reliably prevent the rollback. One affected task had a long sequence of completed turns after the edit and still reopened almost at the initial prompt.

Affected session IDs

Session 1:

01a03b8f-2b6f-7242-b0ac-96e19ab86826

Session 2:

01a04fa1-b91f-78e2-9054-d17e0dcd73f7

Token and context-window information

Session 1:

  • Model context window: 258,400 tokens
  • Last recorded turn usage: 111,402 / 258,400 tokens, approximately 43.1%
  • Cumulative token usage recorded for the inspected completed branch: 91,365,072
  • Rate-limit usage at the final recorded event: 12%
  • No rate limit was reported as reached

Session 2, first inspected completed branch:

  • Model context window: 258,400 tokens
  • Last recorded turn usage: 124,976 / 258,400 tokens, approximately 48.4%
  • Cumulative token usage recorded for that branch: 183,030,331
  • No rate limit was reported as reached

Session 2, later inspected completed branch:

  • Model context window: 258,400 tokens
  • Last recorded turn usage: 198,534 / 258,400 tokens, approximately 76.8%
  • Cumulative token usage recorded for that branch: 46,076,628
  • No rate limit was reported as reached

The rollback therefore occurred without the last recorded turn necessarily exhausting the model context window.

What is the expected behavior?

After a sent prompt is edited, Codex Desktop should preserve the edited conversation branch as the active branch.

When the task is reopened, reconnected, or restored after an application restart:

  • The most recently used edited branch should remain selected.
  • All subsequent completed user and assistant turns should remain visible.
  • A completed branch must not be replaced in the UI by an older interrupted branch.
  • The task status should accurately show whether the latest turn is completed, interrupted, or running.
  • The Send button should not incorrectly become a Continue button because an older interrupted turn was restored.
  • Switching between tasks must not change which conversation branch is considered current.

If the application cannot determine which branch should be restored, it should show an explicit reconciliation error or provide a branch/recovery selector. It should not silently display an older transcript as though it were the complete conversation.

The local rollout JSONL files containing later completed turns should be treated as recoverable conversation data and should be reindexed or displayed through a supported recovery mechanism.

Additional information

Local evidence

This does not appear to be permanent transcript deletion.

The later conversation remains in local rollout JSONL files under .codex/sessions. Another Codex task can inspect those files and recover the missing conversation.

The affected sessions have:

  • history_mode: paginated
  • memory_mode: disabled
  • Multiple rollout JSONL files sharing the same root session ID
  • Edited branches containing history_base references
  • Some short edited branches ending with turn_aborted
  • Other branches containing the missing later conversation and successful task_complete events

This indicates that the Desktop app is restoring or projecting the wrong conversation branch.

Resume-state inconsistency

The Codex Desktop log recorded the following state during resume:

maybe_resume_success ... latestTurnStatus=interrupted ... markedStreaming=true

The app therefore recognized the selected turn as interrupted while simultaneously restoring the task as streaming.

This appears consistent with the stale Continue state and the older branch displayed in the UI.

Ordinal verification

The completed rollout files were checked for duplicate or non-consecutive top-level ordinals.

No ordinal discontinuities were found in the inspected affected branches.

This therefore does not appear to be the same cause as the duplicate-ordinal projection problem described in #41566.

Transcript sizes

The problem occurred with different transcript sizes:

  • One affected completed branch was approximately 22 MB and contained 4,884 records.
  • Another affected task had image/tool-heavy transcript branches of approximately 400–540 MB.
  • Both the smaller and larger tasks experienced visible history rollback.

Large transcript size may amplify the problem, but it is not the sole cause.

In-app feedback upload

In-app feedback was submitted from one affected task. The feedback report text was accepted, but the attachments failed to upload twice.

Full error message:

failed to upload feedback: feedback report was accepted, but some attachments failed to upload

Related log fields:

method=feedback/upload
errorCode=-32603

The raw transcripts are not attached to this public issue because they contain private project content, prompts, command outputs, and local filesystem paths.

Sanitized branch metadata and targeted log excerpts can be provided privately if needed.

Related issues

The following issues have similar symptoms, but I did not find an exact report combining the edited-prompt branch trigger with the evidence above:

The affected completed rollouts in this report do not contain the duplicate ordinal described in #41566.

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Sep 2, 2026
  2. github-actions commented on Sep 2, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. PracticalSwan commented on Sep 22, 2026

    @PracticalSwan

    CORRECTION (2026-09-23): The apparent projection failure described below was a false positive in my local audit, not evidence of a stuck Codex history projector. I compared the logical thread ID's original rollout checkpoint to the separate, shorter edited-branch rollout. Codex keys its materialized history and projection by each immutable physical rollout ID (the suffix in the revised filename). A read-only reinspection confirmed:

    • Original rollout: 10,048,541 bytes; original rollout's projection is at its exact EOF, next ordinal 1613. Its inherited prefix legitimately ends at byte 9,935,898, before ordinal 1603; its later interrupted tail is excluded from the edited branch's visible lineage.
    • Edited rollout: distinct physical rollout ID, 2,525,714 bytes; its own projection is at its exact EOF, next ordinal 2063, with two completed projected turns and 164 projected items.
    • The native segmented-history query can compose four eligible inherited turns plus the two completed revised turns, with no missing rollout or missing projection. There was no database repair, transcript deletion, or state mutation. Twelve synthetic fork/inspector tests and the corrected audit across 486 active thread records passed with no critical projection faults.

    Please disregard the earlier inference below that this example demonstrates a projector freeze or requires branch-aware database repair. I have not performed an independent Desktop UI acceptance check, so this correction does not disprove the separate user-visible branch-selection behavior described in the original issue. Relevant native implementation: rollout ID resolution and segmented paging.


    Superseded original investigation retained for context:

    Sanitized post-update evidence of a related paginated branch/history projection mismatch on Windows. This is an on-disk finding; I have not independently verified a missing turn in the UI.

    • Environment: Codex Desktop 26.917.6896.0, bundled app-server 0.155.0-alpha.16 (September 22, 2026 UTC).
    • After an interrupted turn, the same logical user thread retained its original, valid 10,048,541-byte rollout (ordinals 0–1612) and created a second, valid rollout beginning at ordinal 1603.
    • The new segment's session_meta.history_base specifies end_ordinal_exclusive=1603 and end_byte_offset=9935898. That byte offset is verified to point exactly to the start of ordinal 1603 in the original file. The new branch therefore intentionally supersedes the old interrupted tail (1603–1612); the two files must not be naively concatenated or deduplicated.
    • state_5.sqlite.rollout_path points to the new segment, but thread_history_projection_state still has the old branch's EOF checkpoint: next_rollout_byte_offset=10048541, next_rollout_ordinal=1613. The latest materialized thread_turns row is still the old interrupted turn (1603–1612).
    • The new branch emitted task_complete at 20:08:56 UTC. At 20:14:45 UTC, despite continued valid append activity (new branch already through ordinal 1892), its projection checkpoint and materialized latest turn were unchanged.

    Both rollout files remain intact; no database/transcript mutation or forced restart was performed because other sessions are active. This differs from the in-file duplicate-ordinal boundary in #43142: the ordinals are contiguous within each file, and history_base defines an intentional branch boundary. Please investigate branch-aware history projection reconciliation when the current rollout path changes.

  4. EvenZ2001 commented on Sep 26, 2026

    @EvenZ2001

    存在同样的问题

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 workingsessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-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