Skip to content

Android: new session shows messages in reverse order (assistant reply above user prompt) after stream briefly stalls #179

Description

@ExRazor

Bug Description

In a brand-new session, right after I send my first prompt, the streamed response briefly stalls. When the assistant's reply lands, the message order comes out wrong: the assistant's message is rendered above my prompt, even though mine was sent first. The timestamps show it too, my message says "4m ago" while the reply says "1m ago", and the newer reply sits on top of the older prompt.

Steps to Reproduce

  1. Open CodeWalk on Android, connected to a self-hosted opencode serve instance (v1, via Cloudflare Tunnel + password auth).
  2. Start a new session and send a prompt.
  3. Streaming starts, then freezes for a moment.
  4. When the response finally appears, it is rendered above the user message instead of below it.

Expected Behavior

Messages stay in chronological order: the user's prompt stays below, and the assistant's reply appears after it.

Actual Behavior

In a fresh session the order is inverted. The reply is placed above the prompt that triggered it, and streaming stalls briefly before the reply lands.

Closing and reopening the app does not fix it either. After force-closing CodeWalk and opening it again, the same session still shows the messages in the wrong order.

Environment

  • CodeWalk version: v1.224.0 (latest at time of writing)
  • Platform affected: Android (client)
  • opencode server: v1 (latest, NOT v2), self-hosted
  • Connection: Cloudflare Tunnel + opencode serve password auth, with Tailscale as an alternative connection (I have used both; the issue appeared on both setups)

Additional Notes

This happened on a brand-new session, not a long-lived one, so it looks different from #174 (which was about stalls building up over long sessions). Since that one was fixed recently alongside #175, I suspect the message-list/streaming changes in the latest builds may be involved, but that is just a guess.

I have a screenshot showing the inverted order with both timestamps visible, and I can attach it on GitHub.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions