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
tui: reasoning rendered as plain text for models that emit a closing thinking tag without an opening one #55414
Reasoning from the built-in opencode/big-pickle model is rendered in the transcript as normal assistant text instead of a separate collapsible thinking block. Hiding/toggling thinking has no effect, because no reasoning part is produced.
The model streams its reasoning followed by a closing </think> marker but never an opening <think> marker:
<reasoning text...></think><answer...>
OpenCode already has code to turn this pattern into a reasoning part, but it (a) requires the opening <think> marker and (b) is hardcoded to a single model id, so it never runs for this model:
the streamed extractor only triggers when accumulated content startsWith("<think>"), and the batch splitter looks for indexOf("<think>"); with no opening marker, everything remains text;
both are gated by function UVo(e){return ["qwen3-4b"].includes(e)}, i.e. tag-based splitting only runs for qwen3-4b.
Counting across all assistant messages in an active session: opening <think> appears 0 times, closing </think> appears 39 times (every message).
Expected: reasoning is separated into a reasoning part and can be hidden/toggled.
Actual: reasoning plus </think> is stored and displayed as ordinary text.
Plugins
Local plugins: nudge, pathfix (~/.config/opencode/plugins/)
OpenCode version
2.0.20 (Homebrew)
Steps to reproduce
Select the model opencode/big-pickle for a session.
Send any message.
The response shows the model's raw reasoning as plain text, terminated by </think>, with no separate thinking block.
changed the title [-]tui: reasoning rendered as plain text when a model emits only a closing thinking tag[/-][+]tui: reasoning rendered as plain text for models that emit a closing thinking tag without an opening one[/+]on Oct 14, 2026
Thanks for the detailed report, @nick-o, especially the tag counts and the pointer to the existing extraction code.
I think this is a duplicate of #54599: opencode/big-pickle sends its reasoning inline, ending with </think> and no opening <think>, and OpenCode saves it as a normal text part instead of a reasoning block. That issue has already been reproduced, and there is a proposed fix in #54612.
Possible duplicates and related issues, ordered by likelihood:
Your notes on why the existing tag extraction never runs (it needs an opening <think> and only applies to qwen3-4b) would be a useful addition on #54599.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Duplicate of #54599 (same model, same symptom: opencode/big-pickle streams inline reasoning ending in </think> with no opening thinking, stored as a text part instead of a reasoning part). Fix tracked in #54612. I've moved the code-level detail (why the current extraction never fires) to #54599. Closing as duplicate.
Thanks, @nick-o, and thanks for moving the details about the extraction code to #54599. That's the best place to follow this, along with the proposed fix in #54612. The bot will close this issue as a duplicate shortly.
Closing as a duplicate of #54599, which you confirmed is the same problem: opencode/big-pickle reasoning that ends in </think> with no opening tag is saved as a normal text part. Please follow #54599 and the proposed fix in #54612. Thanks for adding your findings there, @nick-o.
Activity
[-]tui: reasoning rendered as plain text when a model emits only a closing thinking tag[/-][+]tui: reasoning rendered as plain text for models that emit a closing thinking tag without an opening one[/+]opencode-agent commentedon Oct 14, 2026
Thanks for the detailed report, @nick-o, especially the tag counts and the pointer to the existing extraction code.
I think this is a duplicate of #54599:
opencode/big-picklesends its reasoning inline, ending with</think>and no opening<think>, and OpenCode saves it as a normal text part instead of a reasoning block. That issue has already been reproduced, and there is a proposed fix in #54612.Possible duplicates and related issues, ordered by likelihood:
</think>stored astext, no thinking block), on v2</think>inside the reasoning makes the rest of the reasoning arrive as visible text, and a later comment there also captures the missing-opening-tag formYour notes on why the existing tag extraction never runs (it needs an opening
<think>and only applies toqwen3-4b) would be a useful addition on #54599.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
nick-o commentedon Oct 14, 2026
Duplicate of #54599 (same model, same symptom:
opencode/big-picklestreams inline reasoning ending in</think>with no openingthinking, stored as atextpart instead of areasoningpart). Fix tracked in #54612. I've moved the code-level detail (why the current extraction never fires) to #54599. Closing as duplicate.opencode-agent commentedon Oct 14, 2026
Thanks, @nick-o, and thanks for moving the details about the extraction code to #54599. That's the best place to follow this, along with the proposed fix in #54612. The bot will close this issue as a duplicate shortly.
opencode-agent commentedon Oct 15, 2026
Closing as a duplicate of #54599, which you confirmed is the same problem:
opencode/big-picklereasoning that ends in</think>with no opening tag is saved as a normal text part. Please follow #54599 and the proposed fix in #54612. Thanks for adding your findings there, @nick-o.