Skip to content

Web/Desktop won't render any messages when latest 80 messages are assistant-only #27587

Closed as duplicate

Description

@radumg

Description

When opening some session pages in the OpenCode web UI, the page shell loads but the transcript/messages area is blank, even though the message API returns valid session messages.

Important details:

  • This happens both:
    • inside an embedded iframe in our product, and
    • when opening the OpenCode session URL directly in a new tab
  • this didn't seem to happen in the TUI when i did opencode attach into these sessions, things rendered fine in the TUI
  • Because the direct OpenCode page also fails, this does not appear to be an iframe/embed-only issue
  • The message API still returns 200 OK with valid messages for the affected session
  • The OpenCode Web UI stats flyout displayed all the 80 messages with their JSON etc, but they're not rendered in the main messages area

What seems to distinguish broken vs working sessions:

  • Working sessions: the initial fetched message slice includes at least one root/user message
  • Broken sessions: the initial fetched message slice contains only assistant messages, and all of them reference a parent/root message that is outside the first fetched page

In our failing case:

  • GET /session/{sessionId}/message?limit=80&directory=/workspace/{workspaceId} returns 80 valid messages
  • All 80 returned messages are assistant messages
  • All 80 have the same info.parentID
  • That parent/root message exists in the session history, but it is outside the first fetched slice
  • The session UI then renders with no visible transcript/messages

So this looks like a pagination / ancestor-loading problem in the session UI:
if the initial message window does not contain a root/user anchor, the transcript can render blank even though messages exist.

Expected behavior:

  • the session UI should still render the available messages, or
  • it should automatically fetch missing ancestors / root messages, or
  • it should page backward until it has enough context to render the transcript

Actual behavior:

  • the UI loads, but no transcript is shown
  • the backing message API clearly has the data

Also worth noting:
I saw CSP / changelog / manifest console warnings on both working and broken sessions, so those do not seem to be the differentiator.

Plugins

none

OpenCode version

No response

Steps to reproduce

  1. Create or identify a session where the first page returned by GET /session/{sessionId}/message?limit=80&directory=... contains only assistant messages
  2. Make sure those assistant messages all reference a parent/root message that is older than that first fetched page
  3. Open the session in the OpenCode web UI
  4. Observe that the page shell loads but the transcript/messages do not render
  5. Verify that the message API still returns valid messages for that same session

Screenshot and/or share link

No response

Operating System

Linux - mcr.microsoft.com/dotnet/sdk:10.0-alpine base image

Terminal

using through opencode serve command

Activity

  1. github-actions commented on May 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

    If your issue is different or adds new context, please clarify how it differs from #22323.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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