Repository navigation
Description
Summary
On OpenCode Desktop, in a long-running session, assistant turns eventually stop
containing a reasoning part. From that point on the model's chain-of-thought is
delivered as ordinary text, so the Desktop renders it inline with the answer
instead of a separate collapsible thoughts block. The user cannot tell thoughts
apart from the answer, and cannot collapse them. Fresh sessions on the same
provider/model are unaffected, so it appears to be a long-session / compaction
related regression.
Environment
- opencode version: Desktop app
2.0.22(WindowsOpenCode.exeproduct version 2.0.22). The bundled/staged service had auto-updated to2.0.26mid-session; the affected session row hasversion: 2.0.22, a fresh session created minutes later hasversion: 2.0.26. - OS: Windows 10.0.19045.6456 (win32 x64)
- Terminal: OpenCode Desktop app (Electron).
TERM=xterm-256color - Shell: C:\WINDOWS\system32\cmd.exe
- Install/channel: release desktop,
channel=latest, provider OpenCode Zen (opencode/big-pickle) - Active plugins: none found in config
Reproduction
Not yet reduced to a deterministic reproduction. Observed while working normally:
- Use OpenCode Desktop in Build mode with model
opencode/big-pickle(provideropencode), variantdefault(variants: [], so there is no reasoning variant to toggle). - Keep one session going for a long time (this one reached ~347 assistant turns with several automatic compactions).
- At some point the assistant messages stop having a
reasoningpart; from then on the chain-of-thought is emitted as normaltextand rendered inline.
Expected Behavior
Assistant turns keep a separate reasoning part so the Desktop shows a
collapsible thoughts block, separate from the final answer — as it did earlier in
the same session and as it still does in freshly created sessions.
Actual Behavior
Since a specific point in the session, assistant messages contain only
text (+ tool) parts and no reasoning part. The model's internal reasoning is
therefore written into the user-visible answer text. Nothing in the UI can
collapse it, because it is not tagged as reasoning.
Additional Context
Evidence from the local session database
(%USERPROFILE%/.local/share/opencode/opencode.db, V2 schema, session_message
table; content JSON holds an array of parts):
- Affected session:
ses_edb30a1a1ffe4rWn7RNlW7tqdK(title "Автономный Python-бот для Balatro"), agentbuild, model{id: big-pickle, providerID: opencode, variant: default},version: 2.0.22. - Part-shape counts in that session:
(reasoning,text,tool)x135,(text,tool)x110,(reasoning,tool)x69,(tool)x23,(text)x5,(reasoning,text)x4. - Time-ordered analysis shows repeated
reasoning -> nonetransitions during the day, and the last such transition is permanent: after2026-10-10 13:52:49(local) no assistant turn in that session has areasoningpart again, while every turn before it oscillated between having and not having one. - The last
reasoning -> nonetransition at13:52:49followedprovider.updatedandmodel.updatedevents logged at13:52:28(emptyevent.data). Anotherprovider.updatedfired at13:54:20. Acompactionmessage followed at13:55:13. - Control: fresh
opencode run --model opencode/big-picklesessions created at14:34–14:36(same provider/model/agent) recordreasoningparts normally (e.g. 55/55 assistant turns had areasoningpart in one), so the provider is still returning reasoning. The problem is specific to the long Desktop session.
Workarounds tried:
- Nothing in the UI re-enables the reasoning part for that session; starting a new session restores it.
- The model has no reasoning variants (
variants: []), so this is not a variant/effort selection issue.
Related issues (Desktop reasoning display): #8789, #14340, #29212, #44809,
#37073, #21997.
Activity
opencode-agent commentedon Oct 10, 2026
Thanks for the detailed report and the database analysis.
I tried to reproduce this on 2.0.22 with a simulated model. Every reply streamed a separate reasoning block followed by the answer. I ran several turns, ran a real
/compact(the summary was accepted), then continued the session. Every turn before and after compaction kept its own reasoning part and showed as a collapsible "Thought" block. The reasoning never appeared as answer text. So when the provider sends reasoning on its separate channel, it is saved correctly even after compaction.That leaves two likely explanations I couldn't test here:
big-picklemay start writing its thinking into the normal content instead of the reasoning field. OpenCode would then save it as text. This would also fit the on-and-off pattern earlier in the day.If you can, these would help:
--print-logs --log-level DEBUG(or check the log files) and send the raw response for one affected turn. Does the thinking arrive in the provider'scontentor in its reasoning field (reasoning_content/reasoning)?<think>tags?Related issues:
content(<think>tags) is stored and shown as normal textbig-pickleand other free Zen models have no reasoning variants00kino547 commentedon Oct 11, 2026
Its also happening for me the thinking leaks, and i can answer something, it doesn't start with the tags, it tryed explaining to the agent that he isn't adding correctly the tags but he didn't was getting it...
opencode-agent commentedon Oct 13, 2026
I'm closing this for now, since we haven't heard back with the details needed to look into it further.
In my test on 2.0.22, reasoning that the provider sends on its own channel was still saved as a separate part after compaction. Without the raw provider response for an affected turn, I can't tell whether
big-picklestarted writing its thinking into normal content, or whether this is linked to the 2.0.22 → 2.0.26 update during your session.If it happens again, please comment here and include the logged response for an affected turn (
--print-logs --log-level DEBUG), and say whether a new long session on the current version is affected too. We can reopen it then. Related: #43770, #52377.