You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session idles silently when a turn ends with stop and no model output #50250
A provider can end a stream early with a clean stop finish and 0 output tokens — no error, no text, no tool calls. opencode treats this as a normal end-of-turn: the prompt loop exits, the session idles, and the TUI shows nothing. From the user's perspective the session just stops mid-task, and nothing in the logs or transcript distinguishes the truncated turn from a deliberate completion.
We hit this with a self-hosted glm-5.3-fp4 endpoint. Two turns in one session (a coding turn and a reviewer subagent turn) ended with reason: "stop", output: 0, and reasoning cut mid-sentence at the same content position ~3s into each step. Step-finish parts from the session DB:
No errors, aborts, or retries in the server log — the provider returned a clean stop both times. Sending a fresh user message recovers, which points to a deterministic premature stop rather than a transient network failure.
There is currently no signal at all when this happens. A log warning and/or a UI indicator when a turn ends with stop, no error, and no visible output would make these turns diagnosable.
Plugins
None
OpenCode version
1.18.31
Steps to reproduce
Not reliably reproducible on demand — it depends on the provider emitting a premature clean stop. The signature in the session DB is an assistant message with finish: "stop", no error, no text or tool parts, and step-finish tokens with output: 0 (in our case with nonzero reasoning).
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.
Activity
thdxr commentedon Oct 11, 2026
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊