Skip to content

In-progress thinking truncated when joining a running session #50768

Closed as not planned

Description

@D3viantS4ge

Description

When opening a session that's already mid-generation in another client (e.g. the same session open in two clients at once, or reloading while a turn is running), the in-progress thinking block is missing everything that streamed before the connection; only the tail that arrives after joining is visible. Reloading the session doesn't fix it. Once the turn finishes, the full block appears.

Root cause

  • processor.ts: reasoning-delta/text-delta only call updatePartDelta,
    a live-only message.part.delta with no DB write.
  • The part row is persisted empty at reasoning-start and full only at
    reasoning-end (updatePart → PartUpdated projector).
  • /event is live-only with no replay, so a late joiner can't reconstruct what
    was streamed before it connected.

Issue #39375 appears to share the same root cause.

Plugins

No response

OpenCode version

1.18.31

Steps to reproduce

Point opencode at any endpoint that streams reasoning_content (e.g. @ai-sdk/openai-compatible). Start a turn in one client and subscribe to /event. A second client then reads the session via GET /session/:id/message mid-thought: the reasoning part comes back with empty text, while the first client is receiving the deltas. After the turn ends, the same read returns the full reasoning text.

Screenshot and/or share link

No response

Operating System

Windows and Linux

Terminal

No response

Activity

  1. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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