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
Still reproducible on opencode 1.18.18, provider litellm, model minimax-m3 (Linux) — but with a variant that the strip-trailing-suffix approach would not cover.
In child session ses_fcda349f9ffeO8zVq1Izz7B2aG (linked to its parent via session.parent_id), part prt_0338572fa001VKFnz54Sl5aRxI contains the malformed markup <]minimax[>around a bash command, plus a raw </tool_call> closing tag. In other words, the leak occurs inside tool-call serialization, not as a trailing suffix on plain assistant text at text-end.
Implication: sanitizing trailing text suffixes (as in the closed cleanup PRs #30849 / #36860) addresses the cosmetic text leak but not this variant, where malformed tool-call markup reaches the tool-call parsing layer. The root cause likely sits in MiniMax tool-call serialization/parsing rather than text finalization.
Notes:
The affected child later reached step-finish with reason stop on its own (part prt_03385771b001PfRA0NwayGKpaq), so malformed output alone is not proof of a permanent stall.
Evidence gathered read-only from the local session DB and scoped logs; happy to run targeted follow-up queries if useful.
(Local paths and machine details sanitized; stable IDs retained for cross-reference.)
Activity
github-actions commentedon Jun 4, 2026
This issue might be a duplicate of existing issues. Please check:
[TOOL_CALL]blocks in content<tool_calls>markup leaking into output across several modelsulises-jeremias commentedon Jun 5, 2026
I investigated and prepared a targeted fix.
Root cause hypothesis
]<]minimax[>[</tool_call>) to plain assistant text.Fix implemented
SessionProcessortext finalization (text-end) to strip known trailing MiniMax tool-call leak suffixes:]<]minimax[>[</tool_call></tool_call>minimax.Regression coverage
packages/opencode/test/session/processor-effect.test.ts:session.processor strips MiniMax trailing tool_call leak suffix from assistant textAnswerinstead of leaked marker suffix.I’m opening the PR now.
ulises-jeremias commentedon Jul 14, 2026
Reopened the fix PR after automated cleanup closure: #36860
@StarpTech could you please take a look when you get a chance? Thanks!
niStee commentedon Aug 24, 2026
Still reproducible on opencode 1.18.18, provider
litellm, modelminimax-m3(Linux) — but with a variant that the strip-trailing-suffix approach would not cover.In child session
ses_fcda349f9ffeO8zVq1Izz7B2aG(linked to its parent viasession.parent_id), partprt_0338572fa001VKFnz54Sl5aRxIcontains the malformed markup<]minimax[>around a bash command, plus a raw</tool_call>closing tag. In other words, the leak occurs inside tool-call serialization, not as a trailing suffix on plain assistant text attext-end.Implication: sanitizing trailing text suffixes (as in the closed cleanup PRs #30849 / #36860) addresses the cosmetic text leak but not this variant, where malformed tool-call markup reaches the tool-call parsing layer. The root cause likely sits in MiniMax tool-call serialization/parsing rather than text finalization.
Notes:
step-finishwith reasonstopon its own (partprt_03385771b001PfRA0NwayGKpaq), so malformed output alone is not proof of a permanent stall.(Local paths and machine details sanitized; stable IDs retained for cross-reference.)
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊