Skip to content

Streaming content duplication during LLM streaming in desktop/web UI #14822

Closed

Description

@praxstack

Bug Description

During LLM streaming in the desktop UI (and web app), text content appears duplicated/repeated. After quit+reopen, content displays correctly (loaded from DB).

Steps to Reproduce

  1. Open the opencode desktop app or web UI
  2. Send a message to trigger LLM streaming
  3. Observe the streaming text output — content appears repeated/duplicated
  4. Quit and reopen the app — content now displays correctly

Expected Behavior

Streaming text should appear incrementally without duplication.

Actual Behavior

Text content is duplicated during streaming. For example, instead of showing Hello world, the UI shows Hello worldHello world.

Root Cause

In global-sdk.tsx, SSE events are batched in 16ms windows with coalescing. When message.part.updated events coalesce within a single batch (text-end replaces text-start at the same queue index), stale message.part.delta events remain in the queue and get applied on top of the authoritative full text.

Environment

  • Platform: macOS (desktop app via Tauri), also affects web UI
  • Observed on latest dev branch

Activity

  1. github-actions commented on Feb 23, 2026

    @github-actions
    Contributor

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

    Please check if your issue is already covered by one of the above. If so, consider closing this one and adding any new details to the existing issue instead.

  2. github-actions commented on Apr 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions