Skip to content

[Bug] Chat UI showing out of sequence messages #23851

Open

Description

@orca-discord-issues

ten ten via Discord

Love the chat UI function as I can easily move conversations around without all the code nonsense. However, on occasion the prompts I paste to run the agent will show AFTER the response to that prompt, so outside of the expected chronological order which can make things very confusing.
Screenshot_2026-09-29_105428.pngScreenshot_2026-09-29_105237.png

Activity

  1. orca-discord-issues commented on Sep 30, 2026

    @orca-discord-issues
    Author

    Vesa Vesa via Discord

    I've seen the very same issue.

  2. orca-discord-issues commented on Sep 30, 2026

    @orca-discord-issues
    Author

    FireSly FireSly via Discord

    Cause

    In native-chat-session-assembler.ts, messageSortRank forces pending user prompts into a tier below assistant responses:

    • Rank 0: Authoritative transcript messages (including assistant answers)
    • Rank 1: Streaming assistant previews
    • Rank 2: Pending user prompts (pending:* and launch-pending:*)

    compareMessages sorts by rank before timestamp:

    rank 0 (assistant response)  -->  appears first
    rank 2 (pasted user prompt)  -->  appears after response
    

    Even though the prompt timestamp was 7:26 AM and the assistant reply was 8:42 AM, Rank 0 sorts before Rank 2. If prompt pruning lags or fails to match against transcript text, the
    prompt stays pinned at the bottom.

  3. orca-discord-issues commented on Sep 30, 2026

    @orca-discord-issues
    Author

    FireSly FireSly via Discord

     ┌────────────────────────┐     ┌─────────────┐     ┌────────────────┐
     │                        │     │             │     │                │
     │                        │     │             │     │                │
     │ User pastes prompt at  │     │ Top of list ├────►│ Bottom of list │
     │        7:26 AM         │     │             │     │                │
     │                        │     │             │     │                │
     └────────────┬───────────┘     └─────────────┘     └────────────────┘
                  │                        ▲                  Rank 2
                  │                        │                     │
                  └────────────────────────┼─────────────────────┘
                                           │
                                           │
     ┌────────────────────────┐       Rank 0 or 1
     │                        │            │
     │                        │            │
     │ Agent responds at 8:42 ├────────────┘
     │           AM           │
     │                        │
     └────────────────────────┘
    

    Proposed Fix

    1. Re-rank pending prompts ahead of streaming responses so user turns precede the agent's work.
    2. Fall back to timestamps when comparing pending user prompts against transcript turns rather than forcing pending prompts to the tail.
  4. orca-discord-issues commented on Oct 4, 2026

    @orca-discord-issues
    Author

    simmonsOS simmonsOS via Discord

    Just came in here to mention that I'm seeing the exact same issue and it makes it hard to use the chat UI. At some point, a previous prompt gets duplicated and stays stuck at the bottom of the thread and persists there with all of the subsequent messages appearing before it. Once that duplication happens, other prompts start stacking below that original stuck one.

  5. orca-discord-issues commented on Oct 4, 2026

    @orca-discord-issues
    Author

    simmonsOS simmonsOS via Discord

    And, then, at some point, the messages/prompts just start not making it to the underlying terminal session.

  6. orca-discord-issues commented on Oct 4, 2026

    @orca-discord-issues
    Author

    johnmarktaylor johnmarktaylor via Discord

    Same issues with me too

  7. orca-discord-issues commented on Oct 5, 2026

    @orca-discord-issues
    Author

    FireSly FireSly via Discord

    #24207 is the fix waiting for review.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions