Repository navigation
Description
Summary
A turn can end with nothing shown to the user: the final assistant message contains only a
reasoning part, finish = "stop", no text, no tool call. The spinner stops and the session
sits idle — from the user's side the agent "silently dropped out" mid-work. Measured 6 times
in 2.5 days on one machine (2% of turns), each followed by the user waiting 8–58 minutes
before sending a nudge by hand.
Environment
- opencode version: 2.0.26
- OS: Windows 10.0.26300 (win32 x64)
- Install/channel: latest
- Model on the affected turns:
deepseek-v4.1-flashviaopencode-go(per message record) - Active plugins:
@cortexkit/opencode-magic-context@0.48.0
Reproduction
Not deterministic; it is a provider/model outcome that the harness accepts as a finished
turn. To observe it, run long multi-step turns on a reasoning model and watch for a turn that
ends with reasoning only:
session_message -> assistant: finish = "stop", rawFinish = "stop",
content = [ { "type": "reasoning" } ] // no text, no tool part
session_message -> idle // turn closed
Expected Behavior
Either the turn does not close without an answer (keep generating / retry once), or the
session clearly reports that the model returned no answer.
Actual Behavior
The turn closes silently. The user sees the spinner stop and no output; the conversation only
continues when they send another message themselves.
Measured on this machine (487 turn ends, 2.5 days): 6 occurrences, all in one long
session (a build agent working through a checklist). Gaps until the user's next message:
58.3, 29.8, 19.7, 8.1 minutes and two cases with no follow-up at all.
Additional Context
Why the harness cannot tell this apart from a normal end
finish = "stop" is what the provider reported (rawFinish is also "stop"), so from the
runner's point of view the model finished its answer — it just had nothing to say. There is
no check of the form "the final assistant message has no text and no tool call".
2.1.4 does not add such a check
Searched packages/ai/src and packages/core/src/session in 2.1.4 for empty-response
handling: the only related code is history normalisation (omits empty assistant turns,
filters whitespace-only text) — no retry and no user-visible notice when the final message
has no content. After upgrading to 2.1.4 no new empty turn was observed in the following
hour; the sample is too short to conclude anything, and the code path is unchanged.
Platform scope
Not OS-specific: the outcome comes from the provider and the runner accepts it as a finished
turn. The measurements below are from one Windows machine, but nothing in the path depends on
the platform.
Suggested fix direction
Treat "final assistant message has no text, no tool call, no pending tool" as an anomaly:
either retry the step once, or append a visible notice (Модель вернула пустой ответ — продолжить?). Even a one-line marker would turn a silent stop into a known state.
Cost observed
Six silent stops, ~2 hours of combined waiting where the agent had already stopped and
nobody knew.
Activity
opencode-agent commentedon Oct 24, 2026
Thanks for the detailed measurements! I think this is a duplicate of #55378, which reports the same thing: a turn that ends with only a reasoning part (
finish_reason: "stop", no text, no tool call) is treated as finished, and the agent stops silently. That issue has already been reproduced, and others have confirmed it on 2.0.32, 2.1.1 and 2.1.4, including withdeepseek-v4.1-flash.Possible duplicates and related issues, most likely first:
stopturn settled silently, agent stops), reproduced on v2stopcompletion after tool calls in 2.1.4 silently ends the loop; very likely the same root causelengthturns succeed silently in the v2 TUIYour numbers (how often it happens, how long you waited) would be useful as a comment on #55378.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
JohanTG commentedon Oct 24, 2026
Duplicate of #55378 — same symptom (reasoning-only \stop\ turn settled silently), and the frequency measurements this issue carried were posted there: #55378 (comment)
opencode-agent commentedon Oct 25, 2026
We didn't hear back, so I'm closing this as a duplicate of #55378. That issue covers the same problem: a turn that ends with only reasoning (
finish_reason: "stop", no text, no tool call) is treated as finished, and the agent stops silently. It has already been reproduced on v2, and #58683 looks closely related.Your measurements (6 silent stops in 487 turns on
deepseek-v4.1-flashviaopencode-go, with 8–58 minute waits) would be useful as a comment on #55378. If your case turns out to be different, reply here and we can reopen. Thanks for the detailed report!