Skip to content

Scroll Position Shifts When Switching Between Chats Created in Codex #52139

Open

Description

@iiiz-jpg

System: Windows 11
Product: Codex desktop app

Issue Description:

I have encountered a reproducible scrolling issue in conversations created within Codex.

When I switch away from a Codex-created conversation and then return, the interface initially displays only my messages, while all assistant responses are temporarily hidden. After a brief moment, all assistant responses appear together.

If I was not at the very bottom of the conversation before switching away, the scroll position shifts significantly when I return, sometimes jumping several messages above my previous reading position.

Steps to Reproduce:

Create a new conversation in Codex and exchange several messages.

Scroll to the bottom of the conversation.

Scroll slightly upward.

Switch to another conversation, either a regular chat or a Work Agent conversation.

Return to the original conversation.

Actual Result:

The assistant responses are initially missing and then appear together. The conversation restores an incorrect scroll position, often significantly above where I left off.

Expected Result:

The conversation should restore the exact or approximately same reading position without unexpected scrolling or layout shifts.

Additional Observations:

The issue occurs in multiple conversations newly created in Codex.

Older conversations originally created through the ChatGPT web interface do not exhibit this issue when viewed in Codex.

Switching to either regular chats or Work Agent conversations triggers the same behavior.

Pinning or unpinning the affected conversation makes no difference.

If I scroll all the way to the bottom before switching away, the conversation returns to the bottom correctly.

The issue is reproducible and appears related to how assistant responses are loaded or rendered when returning to Codex-created conversations.

Please investigate whether the rendering or scroll-position restoration behavior differs between Codex-created conversations and conversations originally created on the web.

Activity

  1. added
    bug
    app
    windows-os
    session
    on Oct 8, 2026
  2. oohama20210509 commented on Oct 26, 2026

    @oohama20210509

    Additional Windows report: returning from Home opens a long conversation at an old position.

    Observed by the user in the Codex desktop app on 2026-10-26 (Asia/Tokyo):

    1. Open a long-running conversation.
    2. Press Home.
    3. Return to that conversation.
    4. The conversation opens far back in the history, described by the user as near the oldest item in the currently loaded batch, rather than where they expect to continue.

    Impact: repeated manual navigation is needed just to resume work. The user explicitly requested that this be reported.

    Expected behavior:

    • When leaving while following the latest messages, return to the latest messages.
    • When intentionally reading earlier messages, preserve that reading anchor.
    • Restoring the anchor should survive delayed message/layout loading; an explicit jump-to-latest control should remain available.

    This is a potentially related Home-navigation variant, not a claim that it has the same root cause as this issue. In particular, this issue reports that switching chats from the exact bottom works; the user's exact pre-Home offset has not been instrumented. "Oldest loaded item" is the user's hypothesis about the landing position, not a confirmed virtualization diagnosis. The agent could not operate the native Home UI in this audit, so no fresh automated reproduction or recording is claimed.

    Environment checked during this audit: Windows; installed OpenAI.Codex package 26.1021.3705.0 (package metadata, not the About dialog). The version of every earlier occurrence is unknown.

    No conversation contents, account identifiers, or local paths are attached.

  3. oohama20210509 commented on Oct 26, 2026

    @oohama20210509

    Technical follow-up to the Windows report above (Codex 26.1021.3705.0).

    I found a conditional stale-scroll-restoration path in the installed client. This is a callback-level reproduction, NOT a native-UI reproduction or a confirmed explanation of the Home-navigation symptom.

    The competing requests are an old saved reading position and a newer explicit user scroll / scroll-to-bottom. In the conversation component, the latter marks restoration finished/cancelled. However, the first height-bearing latest-row callback can reopen restoration when the saved height differs by more than 24px. It adjusts the old target without checking whether a newer user action superseded it. The restore callback also does not exempt user_follow mode.

    Bounded reproduction using the installed callbacks unchanged, with a synchronous scroll-controller stub (distances clamped to 0..5000). The actual follow-mode updater, including its second-argument footer-preservation flag, is included; the installed footer setter was separately checked to be a boolean-ref assignment. React callback lifetime and browser layout are not simulated:

    1. Start with saved distance-from-bottom=1000, saved latest-row height=100, static mode.
    2. Invoke the actual scroll-to-bottom callback: distance=0, restoration marked done, mode=user_follow.
    3. Deliver latest-row height=200 through the actual child pending-clear/dispatch callbacks. The pending state clears normally. The parent reopens restoration and changes the old target to1100, then its user_follow branch keeps distance=0.
    4. Invoke the child's subsequent restore callback: it issues a scroll command to1100, even though mode remains user_follow; the stub moves to1100.

    A user-scroll variant moves to700, is compensated to800 by the height change, then receives a scroll command to the stale1100 target. A hold-only case was not treated as a defect because its height compensation can be intentional.

    Controls: no saved height, unchanged height, a difference of exactly24px, and no saved target do not undo the bottom request in this sequence. The pending measurement gate itself is not permanently stuck: its normal clear-and-dispatch path worked in every case.

    Source locations in this build (character offsets in decoded bundled JS):

    • local-conversation-thread-8b01ef08fbc5.js: restore callback302384; bottom callback304260; user-scroll callback304561; latest-height callback305575.
    • virtualized-turn-list-acff128e42a9.js: pending gate7479; dispatch9705; pending clear17480; later layout retry around23208.

    Reachability still needs a real UI regression test: the saved height/target must survive until a user action, followed by the first height-bearing parent callback and another restore attempt. A latest row initially outside the rendered range is one candidate. A cached-equal measurement can also skip the parent notification, so 'a DOM measurement already happened' does not necessarily mean that the saved baseline was consumed. If that parent callback already consumed the saved baseline before user action, this particular path does not apply.

    Suggested invariant: a newer explicit user position must supersede an older restoration request. Keep normal height compensation, but do not let it reactivate a superseded target. Please test delayed latest-row measurement after explicit bottom navigation / manual scrolling, with the controls above. No live DOM, React scheduling, native input timing or frequency was measured by this isolated probe, and no comparison with an older version was made.

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

    appbugsessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions