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
core: signature-only responses complete successfully with no visible output #46880
V2 treats a provider response containing only empty reasoning metadata as successful user-visible output.
packages/core/src/session/runner/publish-llm-event.ts sets outputStarted = true on reasoning-start, even if no non-empty reasoning delta arrives. If the provider subsequently emits a clean step-finish (stop / raw end_turn), packages/core/src/session/runner/llm.ts records Step.Ended successfully without checking for text, readable reasoning, or a tool call.
The resulting assistant message can contain only:
{
"finish": "stop",
"rawFinish": "end_turn",
"content": [
{ "type": "reasoning", "text": "", "state": { "signature": "..." } }
]
}
The TUI renders no answer and no error, so the operation appears to have silently done nothing.
Expected: a clean finish with no non-empty text/reasoning and no tool call is surfaced as a no-output provider failure or otherwise handled explicitly. A metadata-only reasoning event should not count as visible output.
Actual: the step succeeds and the session becomes idle with no renderable response.
Plugins
No response
OpenCode version
opencode2 v0.0.0-dev-18900; current V2 source af332a2 remains affected.
Steps to reproduce
In a runner test, stream step-start.
Stream reasoning-start with provider metadata containing a signature.
Stream an empty reasoning delta and reasoning-end.
Stream step-finish with normalized stop and raw end_turn.
Read the projected assistant message and session outcome.
Observe a successful assistant step with no visible content or error.
Screenshot and/or share link
No response
Operating System
Ubuntu 24.04.4 LTS, Linux 5.15.0-91-generic, x86_64
This issue might be a duplicate of existing issues. Please check:
v2: empty reasoning-only response is recorded as successful completion #37372: v2: empty reasoning-only response is recorded as successful completion — same root cause (reasoning-only step with no text or tool call recorded as session.execution.succeeded), same V2 event model. Your report adds useful specifics about publish-llm-event.ts setting outputStarted = true on reasoning-start and the exact content shape with a signature-only reasoning block.
Additional data point from a Desktop 2.1.4 (CLI core 1.19.4) user on Windows, provider opencode-go (glm-5.3-flash, mimo-v2.6-flash): we see an even more extreme variant — the stop step had content: [] entirely (not even a reasoning block), finish: "stop", tokens.output = 52–101, and the turn settled as idle / succeeded with zero visible output. From the server log, the failure window contains no WARN/ERROR at all — it is handled as a normal completion end-to-end. Stats: 3 such silent stops out of ~625 assistant messages over 2 days, all right after a tool result. Details and a JSON sample in #55378.
Thanks for the detailed report. I reproduced this with a simulated provider on @opencode/cli 2.2.0 (your dev build isn't published), and it still happens on the latest dev (35a4a68).
Steps: the model's response to a prompt contains only an empty reasoning delta carrying an encrypted reasoning signature (OpenAI-chat reasoning_details), followed by a clean stop finish. The turn completes in about 100ms and the session goes idle with no text, no reasoning and no error, and there is no retry. The recording and screenshots below show this, and the script below reproduces it.
In the code, reasoning-start marks output as started before any reasoning text arrives, and the step only treats a finish as invalid when the reason is unknown. So an empty stop step is accepted as success. I've passed this on to the maintainers.
recording.mp4
Reproduction script (drive.ts)
// Repro for anomalyco/opencode#46880: a provider response containing only an// empty, signature-carrying reasoning block followed by a clean "stop" finish is// recorded as a successful step. The TUI ends idle with no answer and no error.import{Effect,Stream}from"effect"import{Llm,OpenCodeDriver}from"opencode-drive"exportdefaultOpenCodeDriver.use({
...(process.env.OC_DEV ? {opencode: {dev: process.env.OC_DEV}} : {}),tui: {recording: true},},({ ui, llm })=>Effect.gen(function*(){yield*llm.serve((request)=>{// Background title requests get a normal title.if(JSON.stringify(request).includes("Reply with only the title"))returnStream.make(Llm.text("Greeting"))// Main turn: only an empty reasoning delta carrying an encrypted signature, then finish=stop.returnStream.make(Llm.raw({choices: [{delta: {reasoning_content: "",reasoning_details: [{type: "reasoning.encrypted",data: "SIGNATURE-ONLY-abc123",index: 0}],},},],}),Llm.finish("stop"),)})yield*ui.screenshot("before")yield*ui.submit("Say hello")yield*Effect.sleep(6000)// Session is idle: no assistant text, no reasoning, no error shown.yield*ui.screenshot("after-no-output")}),)
Run it with opencode-drive: opencode-drive run ./drive.ts. It drives opencode from your PATH; set OC_DEV to the path of an OpenCode checkout to run that from source instead.
Activity
github-actions commentedon Sep 2, 2026
This issue might be a duplicate of existing issues. Please check:
session.execution.succeeded), same V2 event model. Your report adds useful specifics aboutpublish-llm-event.tssettingoutputStarted = trueon reasoning-start and the exact content shape with a signature-only reasoning block.You may also want to check:
cep207 commentedon Oct 27, 2026
Additional data point from a Desktop 2.1.4 (CLI core 1.19.4) user on Windows, provider
opencode-go(glm-5.3-flash,mimo-v2.6-flash): we see an even more extreme variant — the stop step hadcontent: []entirely (not even a reasoning block),finish: "stop",tokens.output= 52–101, and the turn settled asidle / succeededwith zero visible output. From the server log, the failure window contains no WARN/ERROR at all — it is handled as a normal completion end-to-end. Stats: 3 such silent stops out of ~625 assistant messages over 2 days, all right after a tool result. Details and a JSON sample in #55378.opencodejr commentedon Oct 28, 2026
Thanks for the detailed report. I reproduced this with a simulated provider on @opencode/cli 2.2.0 (your dev build isn't published), and it still happens on the latest
dev(35a4a68).Steps: the model's response to a prompt contains only an empty reasoning delta carrying an encrypted reasoning signature (OpenAI-chat
reasoning_details), followed by a cleanstopfinish. The turn completes in about 100ms and the session goes idle with no text, no reasoning and no error, and there is no retry. The recording and screenshots below show this, and the script below reproduces it.In the code,
reasoning-startmarks output as started before any reasoning text arrives, and the step only treats a finish as invalid when the reason isunknown. So an emptystopstep is accepted as success. I've passed this on to the maintainers.recording.mp4
Reproduction script (drive.ts)
Run it with opencode-drive:
opencode-drive run ./drive.ts. It drivesopencodefrom yourPATH; setOC_DEVto the path of an OpenCode checkout to run that from source instead.