Repository navigation
Description
Summary
With opencode/big-pickle, assistant messages in long sessions store the model's chain-of-thought inside the text part instead of a separate reasoning part, so the internal planning becomes part of the visible answer (and of the stored transcript / title generation).
Measured over 21,181 assistant messages on a local opencode.db: 2,549 (12%) begin with planning text, and 100% of those cases are messages that have no reasoning part at all.
Environment
- opencode version: 2.0.32
- OS: Windows 11 Pro
- Terminal: VS Code integrated terminal
- Shell: PowerShell
- Install/channel: release
Reproduction
- Set
"model": "opencode/big-pickle"as default and work in a session with a large context (long conversation, large system prompt). - Ask for any task that requires planning.
- Inspect the assistant message (TUI, API, or the stored parts): its
contentarray contains a singletype: "text"part whose text starts with the chain-of-thought in English (The user says ... Let me ... I need to ... I should ...), followed by the actual answer. There is notype: "reasoning"part for that message. - Same model, small prompt (2 messages): the reasoning is delivered separately — observed
reasoning(84) + text(2).
Minimal deterministic repro not isolated yet; reproduced from stored sessions at scale, plus the small-prompt control.
Expected Behavior
The chain-of-thought should be delivered/persisted as a separate type: "reasoning" part (as happens with small prompts), keeping the text part limited to the visible answer.
Actual Behavior
In long sessions the reasoning is written into the text part. Consequences:
- the visible answer starts with internal planning;
- auto-generated session titles end up containing the reasoning (some titles literally begin with the model's planning sentence);
- transcript consumers that only look at
textparts (e.g. tooling) see the model "talking to itself" about the rules.
Measurements (local DB)
Schema used (opencode v2 SQLite): message, part (data JSON with type), session_message (type=assistant, data.content[]), session_v2 (model).
Part types in part for all sessions: tool 28106 · step-start 26728 · step-finish 26078 · text 18894 · reasoning 14335 · patch 735 · compaction 248.
For opencode/big-pickle (238 sessions):
| measure | value |
|---|---|
| assistant messages | 21,181 |
| start with planning text | 2,549 (12%) |
| reasoning parts present | 10,137 |
| "hard" leaks (English CoT in text) by day | 08-26=23 · 09-02=30 · 09-03=30 · 10-15=21 · 10-16=4 · 10-17=2 (plus scattered 1–11 on other days) |
Correlation that isolates the symptom:
| day | msgs with reasoning part | msgs without | hard leak with reasoning | hard leak without |
|---|---|---|---|---|
| 2026-10-10 | 208 | 108 | 0 | 6 |
| 2026-10-11 | 280 | 170 | 0 | 3 |
| 2026-10-12 | 165 | 63 | 0 | 6 |
| 2026-10-15 | 8 | 634 | 0 | 21 |
| 2026-10-16 | 77 | 85 | 0 | 4 |
| 2026-10-17 | 3 | 31 | 0 | 2 |
hard leak with reasoning = 0 on every day: when the reasoning part exists, the text part is clean; when it does not, planning shows up in text. On 2026-10-15 the ratio inverts (8 with vs 634 without).
Additional Context
cli.jsonalready hassession.thinking: "hide", andopencode modelsreportsopencode/big-picklewithvariants: []— there is no toggle to flip.- The model name/cost entry:
opencode/big-pickle,variants: [], cost 0 in/out. - Workarounds tried locally: (1) a hard prompt rule "never emit reasoning in the visible body" — reduces but does not eliminate; (2) a plugin that detects planning markers in the
textpart and injects a warning into the system prompt — works as a post-hoc guard, but the current v2 hook set has no way to rewrite the visible text (experimental.text.completeno longer exists), so the offending turn is already sent. - Question: is splitting expected from the provider adapter (e.g.
reasoning_content/ reasoning items) or from core when persisting parts? If the opencode provider needs an explicit option for this case (reasoningSummary,include,textVerbosity, …), please point to it — happy to test.
Suggested labels
bug, windows
Activity
opencode-agent commentedon Oct 17, 2026
Thanks for the detailed report and the database measurements, @Ramon-Az.
I think this is a duplicate of #54599. There,
opencode/big-picklesometimes sends its thinking inside the normal reply instead of as separate reasoning, so OpenCode saves it as atextpart and noreasoningpart is created. A comment on that issue (2.0.26, Windows) describes the same long-session pattern you measured: early turns had proper reasoning parts, and from one point on the thinking showed up inline intext.Raw stream captures in the related issues show the response already arriving that way from the server. The thinking is in
content,reasoning_contentisnull, and there is often no opening<think>tag. That's why there's no setting or provider option you can change on your side. A client-side fix that splits the inline thinking into a reasoning part is proposed in #54612.Possible duplicates and related issues, ordered from most to least likely:
textpart instead of a reasoning part. Reproduced on v2, including the long-session flip.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. If you can capture the raw provider stream for one affected turn, adding it to #54599 would help.
opencode-agent commentedon Oct 18, 2026
Closing this as a duplicate of #54599, since we haven't heard back after the note yesterday. That issue covers
opencode/big-picklesending its thinking inside the normal reply instead of as a separate reasoning part. It has been reproduced on v2, including the switch partway through a long session that you measured. A client-side fix is proposed in #54612.Please follow #54599 for updates. If you capture the raw provider stream for an affected turn, adding it there would help. If your problem turns out to be different, reply here and explain how, and we can reopen this. Thanks again for the detailed measurements, @Ramon-Az.