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
[Bug] Missing type:text when assistant returns text + question tool in same step #49708
{"type":"tool","tool":"question","callID":"call_01a0b3076e37574b4a315fa42a639a2","state":{"status":"running"}}
-> Step 3 should be type:text, but it is missing.
I checked the current v2 text/tool publication path. It keeps text and tool fragments separate, and #51105 flushes pending text before the next tool block starts. The existing text-before-tool regression test passes; the containing test file passed all 25 tests. This does not reproduce or establish a fix for the Desktop 1.18.31 report.
Which provider/model produced this, and where was the “data log” captured (SSE events, stored message parts, or another interface)? If it still happens, could you share a redacted provider response showing the text content alongside the question call, plus the corresponding server events/message parts? The text part is created when the provider emits text-start, so those two sides would distinguish missing provider text from text lost during publication. Please remove credentials and private prompt content.
@Dante-dan I'm seeing what looks like the same symptom on v2.0.19 with anthropic/claude-opus-5-5 on the Anthropic provider. My data comes from the stored message parts, and I think it answers your question about which side loses the text.
The text is missing on the provider side. It isn't lost during publication. In the affected steps the model never emits text, so there is no text-start. Instead it writes the message as one of Anthropic's progress updates between tool calls, which the API returns as a thinking block just before the tool_use. OpenCode stores that block as a reasoning part, which is correct. With no variant selected, OpenCode sends no thinking config, so Anthropic falls back to display: "omitted" and the part comes back empty. That matches the empty reasoning part in the report above.
You can tell the two kinds of reasoning part apart by their signatures. A progress update's signature decodes to narration, and ordinary reasoning's decodes to thinking. The affected steps have a narration part and no text part.
I don't have a raw provider response, because it only happens some of the time and I can't trigger it on demand. #52735 describes the same cause and has a workaround for the default variant, plus two proposed fixes.
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
Dante-dan commentedon Sep 30, 2026
I checked the current
v2text/tool publication path. It keeps text and tool fragments separate, and #51105 flushes pending text before the next tool block starts. The existing text-before-tool regression test passes; the containing test file passed all 25 tests. This does not reproduce or establish a fix for the Desktop 1.18.31 report.Which provider/model produced this, and where was the “data log” captured (SSE events, stored message parts, or another interface)? If it still happens, could you share a redacted provider response showing the text content alongside the question call, plus the corresponding server events/message parts? The text part is created when the provider emits
text-start, so those two sides would distinguish missing provider text from text lost during publication. Please remove credentials and private prompt content.PrismKitty commentedon Oct 7, 2026
@Dante-dan I'm seeing what looks like the same symptom on v2.0.19 with
anthropic/claude-opus-5-5on the Anthropic provider. My data comes from the stored message parts, and I think it answers your question about which side loses the text.The text is missing on the provider side. It isn't lost during publication. In the affected steps the model never emits text, so there is no
text-start. Instead it writes the message as one of Anthropic's progress updates between tool calls, which the API returns as athinkingblock just before thetool_use. OpenCode stores that block as areasoningpart, which is correct. With no variant selected, OpenCode sends nothinkingconfig, so Anthropic falls back todisplay: "omitted"and the part comes back empty. That matches the emptyreasoningpart in the report above.You can tell the two kinds of reasoning part apart by their signatures. A progress update's signature decodes to
narration, and ordinary reasoning's decodes tothinking. The affected steps have anarrationpart and notextpart.I don't have a raw provider response, because it only happens some of the time and I can't trigger it on demand. #52735 describes the same cause and has a workaround for the default variant, plus two proposed fixes.
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊