Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.1021.22027, read from the installed Linux package metadata. The About-dialog value was not independently captured.
What subscription do you have?
Not included; no subscription-specific cause has been established.
What platform is your computer?
Ubuntu 24.04.3 LTS, Linux 7.0.0-38-generic, x86_64.
What issue are you seeing?
The conversation transcript repeatedly returns to the top/earliest messages after switching to another conversation and back. Manually navigating to the latest messages does not reliably persist across the next switch, making long conversations difficult to use. This concerns the main conversation transcript, not the sidebar or a file preview.
This report adds a Linux occurrence and a bounded stale-restoration-snapshot investigation. Related reports:
- Scroll Position Shifts When Switching Between Chats Created in Codex #52139: Windows conversation-switching scroll shifts. That report says switching from the exact bottom works; the affected user here reports that manually returning to the latest messages still does not reliably survive switching away and back.
- [macOS] Switching tasks loses saved scroll position after 26.810.52044 update #38887: macOS task switching loses the saved position.
- Incorrect positioning at the earliest message when opening historical conversations #57378: opening historical conversations positions at the earliest message.
- [Windows App 26.1013.4894.0] Minimise/restore briefly whites out Codex and resets conversation scroll to top #55612: Windows minimize/restore trigger; that distinct native-window trigger has not been tested here.
These reports may share a symptom without sharing a root cause. If this Linux occurrence belongs under an existing issue, please consolidate it there.
What steps can reproduce the bug?
User-reported procedure on the affected installation:
- Open a long existing local Codex conversation.
- Manually scroll to the latest output, or note a recognizable historical reading position.
- Select another conversation in the sidebar.
- Select the original conversation again.
- It returns to the top/oldest messages instead of the position just selected. Repeating the navigation continues to lose the position.
The affected conversation uses paginated history. Its local record was approximately 14 MiB when inspected. The record parsed successfully and continued to receive updates; this establishes message-record health, not scroll-state correctness. No conversation contents or identifiers are attached.
What is the expected behavior?
Preserve each conversation's last valid reading anchor across navigation. If the user was at the bottom, resume following the latest output. If reading history, preserve that position. Delayed history loading or virtual-list measurements must not replace a newer user-selected position with an older restoration request.
Additional information
Candidate stale-snapshot path — not a confirmed native-UI root cause
Read-only inspection of the shipped conversation renderer found an initial restoration snapshot cached by conversation ID, hidden-content flag, restore-enabled flag, and store identity. The cache does not include the transcript-visible flag, although visibility participates in whether the transcript is active. The saved state includes distance-from-bottom, latest-turn follow state, and a virtualized-list restoration anchor.
A bounded harness executes the extracted snapshot-cache block with a persistent memo-cache array and a synchronous per-conversation store. It reproduces this sequence:
- Render conversation A with saved distance-from-bottom 9000 and an old anchor.
- Save a newer position, such as distance 0 (bottom), or 1200 plus a different history anchor.
- Toggle the transcript-visible input false and then true without changing the other cache dependencies.
- The cache still returns distance 9000 and the old anchor.
Refreshing this initial snapshot on transcript visibility transitions makes both assertions pass. A local experiment adds that visibility dependency and one compiler-cache slot. All five bounded checks pass: returning to bottom, returning to a saved history anchor, stable snapshots during ordinary visible rerenders, independent conversation IDs, and existing hidden/restore-disabled opt-outs.
Conceptually, the proposed invariant is to refresh the activation snapshot when a retained transcript becomes visible again, while leaving it stable during ordinary visible renders. This is not a request to continuously reapply the saved offset on every scroll-state update.
Verification limits
- The harness isolates the installed cache block. It does not simulate React scheduling, actual panel retention/remount behavior, or browser layout/virtual-list timing.
- A separate local test application successfully loaded and initialized the experimentally patched module without page errors. This is a startup/module-loading check, not a logged-in scroll-switching regression test.
- No synchronized before-switch/store-write/after-switch DOM trace was captured. The visibility transition reaching this cache on the affected UI path remains to be established.
- The user has not confirmed that the experimental patch resolves the real symptom. It is not an upstream fix or a recommended supported workaround.
- This issue was observed before the experimental scroll patch. A fresh clean-install A/B comparison has not been performed.
Please investigate the saved-state writers and restoration reads during conversation activation, including virtual-list anchors and latest-row height updates. A useful native regression would cover switching away/back from both the exact bottom and historical content, then delivering delayed history/layout measurements.
The public repository does not expose the desktop conversation renderer, and docs/contributing.md currently says external code contributions/PRs are not accepted. Accordingly, the candidate change and its limitations are provided here for maintainer review rather than submitted as an unrelated CLI/TUI patch.
No private project names, local paths, raw logs, transcripts, account identifiers, credentials, screenshots, or packaged application code are included.
Activity
github-actions commentedon Oct 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
a408665321 commentedon Oct 28, 2026
Follow-up, 2026-10-28: the initial visibility-dependency experiment did not resolve the affected user's real conversation-switching symptom. The running process was verified to use the patched application copy, and the installed conversation asset matched the tested patched source. Please do not treat the five isolated cache checks in the original report as a validated UI fix.
ResizeObserver errors correlate with activation of the affected conversation
A read-only analysis of the current desktop process's retained log found the following signature:
At the analysis snapshot there were 408 matching log rows. Comparing primary-window
thread_stream_view_activity_changed active=trueevents with subsequent error rows:For one affected-conversation activation at 2026-10-28 02:34:14.995 UTC, matching errors followed approximately 2, 36, 42, 68, 130 and 155 ms later, with another at about 2.456 s.
These are associations, not recorded viewport resets. Activity events are proxies for activation, not a verified count of manual navigation clicks. Errors are primary-renderer-global, do not contain a conversation ID or observer stack, and may arise from other UI elements. The 3-second windows can overlap. There is no synchronized trace of the actual viewport jumping. The error could be a contributor, a consequence, or a shared symptom of a layout/restoration feedback loop.
A second stale-target path remains in the experimentally patched renderer
An isolated probe executing the shipped bottom-navigation, latest-height, and restore callbacks in a synchronous scroll-controller harness produced:
user_follow.user_follow.The scroll-command sequence was
[0, 0, 1100]. The installed asset was verified identical to the source used by the probe. This remains a callback-level reproduction, not evidence that this exact sequence occurred in the user's native UI. It does not exercise actual React scheduling, DOM geometry, panel lifecycle, or ResizeObserver delivery, and does not explain the exact top destination by itself. A closely related callback-level lead was independently reported in #52139; please consider that existing analysis as well.Source-review leads and proposed invariants
The virtualized list's row-size observer can update measured heights, directly change the list container height, and use a synchronous UI commit path. Separate scroll-container size observers can consume spacer growth and compensate scroll position. This makes observer/layout/restoration interaction worth tracing, but does not identify which observer generated the global error.
Suggested investigation and regression requirements:
The affected local conversation remains paginated and had grown to approximately 26 MiB; 8366 record lines parsed with no JSON errors. This is context, not proof that size causes the bug. No restart, settings change, additional app patch, or conversation-data change was performed during this follow-up investigation.
The bot suggested #57378 as a possible duplicate. This follow-up adds Linux activation/ResizeObserver timing and bounded callback evidence; maintainers can consolidate it under the appropriate desktop issue. No private conversation contents/IDs, local paths, account details, credentials or raw application logs are attached.
a408665321 commentedon Nov 2, 2026
Follow-up, 2026-11-02: a revised local experimental patch appears to resolve the affected user's conversation-switching symptom so far. The user reported this today; it is encouraging user feedback, not an upstream fix or a controlled clean-install A/B result.
Stronger runtime evidence: restoration completes during placeholder layout
After the earlier visibility-dependency experiment failed, targeted diagnostics were added to the installed desktop renderer. They record saved-distance reads, restoration state/targets, follow mode, viewport geometry, and cleanup writes, without conversation contents. Three captured failures showed the same premature-completion pattern. One representative sequence was:
scrollHeight=954,clientHeight=954,scrollTop=0— a viewport-sized placeholder with no scroll range.done=false,target=0,mode=prework_follow. The existing bypass marks restoration complete.scrollHeight=6294,clientHeight=948,scrollTop=0,done=true,target=0; it saves distance-from-bottom 5346.done=truecauses restoration to return without correcting the position.This connects the valid saved bottom position to premature completion and then to persistence of the incorrect top position. It supports a desktop frontend restoration/lifecycle defect on this path. It does not establish a common cause for every report of lost scroll position.
Correction to the earlier ResizeObserver lead
There was no
ResizeObserver looperror within ±2 seconds of any of these three captured failures. The correlation in my previous comment remains an association, but these newer traces weaken the hypothesis that the global observer-loop error is necessary to trigger this failure. The local fix does not suppress those errors or alter observer scheduling.The separate delayed-height callback probe described previously (
[0, 0, 1100]) remains a distinct callback-level lead; it should not be conflated with the runtime sequence above.Revised local fix and review-driven changes
The change was developed against the same installed app version, 26.1021.22027. In conceptual source terms:
prework_followoruser_follow, keep restoration pending through placeholder and intermediate layouts. Restore bottom during those layouts and complete when the existing visible-content-ready callback runs, rather than merely when content first becomes scrollable.Claude Code performed source review and follow-up reviews. Review identified partial-hydration, short-content lifetime, callback-identity, and message-reconciliation risks; the implementation was revised accordingly. Final review found no remaining concrete blocker to a reversible local experiment. This is not maintainer approval. The reviewer could not execute tests on its host; test results below were executed locally.
Validation and remaining limits
948 → 1300 → 3000 → 6294px with a final 948 px viewport; restoration reachedscrollTop=5346. The canceled case stayed at top with no restoration scroll commands.Suggested upstream regression: activate a long conversation from saved bottom, deliver a viewport-sized placeholder followed by several history/layout stages, and verify restoration does not complete early or persist top as the next snapshot. Also cover active streaming, short content, historical reading, user interaction during hydration, and pending-message acknowledgement.
No private conversation identifiers, project names, local paths, raw logs, credentials, or packaged application source are attached. The existing issue is left open for maintainer investigation and an upstream fix.