Skip to content

Chat: a message sent while the history is still loading disappears, and the reply overwrites a row #19232

Open

Description

@Itaxh1

Product impact

  • Primary loop layer: Retrieval-Action (chat)
  • Involves data loss, failed capture, or broken sync/trust

Describe the bug

Opening chat starts the history load ("Reading your memories…"). A message sent before that load returns is
dropped from the screen: the load replaces messages wholesale, and the streamed reply is then written to an
index computed before the replacement.

To reproduce

  1. New account (no cached messages), open chat.
  2. While "Reading your memories…" is showing, type a message and send.
  3. Wait for the reply.

Current behavior

The user's own message disappears and only Omi's reply is left (seen on device with a new account). Depending on
what the load returned, the reply lands on another row's index, or messages[aiIndex] is out of range.

Expected behavior

The sent message and its reply both stay, in order, whether or not the history load lands in between.

Evidence

Suggested fix

Merge the loaded history with messages created after the load started (skip a human message the server already
returned), and replace the reply placeholder by identity instead of by index.

Fix available

Fixed with a regression test on the fork branch design/v2-step0-tokens (bc79f057cb). It will be linked from the draft PR.

Found while testing the Omi v2 Flutter restyle on an iPhone, then confirmed against main at 32c2ed22cf.

Activity

  1. added
    capture
    p0
    p2
    retrieval-action
    and removed
    p0
    capture
    on Oct 6, 2026
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

    p2retrieval-action

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions