Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Description
Not sure why this happens or whether it is properly regarded as a qwen bug, a llama.cpp bug (I'm using a very recent source build), or an opencode bug. But here you are in case it is helpful:
┃ Thinking: <tool_call>
┃ <function=read> ▼ Modified Files
┃ <parameter=filePath> packages/apostrophe/lib/mongod +22 -1
┃ /Users/ai/apostrophe/packages/apostrophe/modules/@apostrophecms/page/index.js packages/apostrophe/modules/@ap +6 -2
┃ </parameter> packages/apostrophe/modules/@ap +1993
┃ <parameter=limit> packages/apostrophe/modules/@ap +5 -1
┃ 15 packages/apostrophe/test/module +1 -4
┃ </parameter> packages/apostrophe/test/module +1 -1
┃ <parameter=offset> packages/emulate-mongo-3-driver +1229
┃ 2969 packages/emulate-mongo-3-driver/ +842
┃ </parameter> sqlite-test.js +76
┃ </function>
┃ </tool_call>
▣ Build · Qwen3.6-35B-A3B-UD-IQ4_XS · 22m 13s ▄
┃
┃ ~/apostrophe:qwen-opencode
╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
94.5K (72%) ctrl+p commands • OpenCode 1.14.24
I've seen this a number of times: naked XML at the end of the terminal.
Is this qwen producing XML where it should have produced JSON? Is that a thing?
Thanks for all you do!
It's hard to capture this cleanly. Here's a screenshot too:
Plugins
None
OpenCode version
1.14.24
Steps to reproduce
Eventually, in long-running tasks, Qwen3.6-35B-A3B-UD-IQ4_XS running on a very recent llama.cpp build will do it.
Screenshot and/or share link
See above for screenshot
Operating System
MacOS
Terminal
Plain vanilla MacOS Terminal
Reacted by StanMarian, Arthur Woimbée and Flozza
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Apr 25, 2026
This issue might be a duplicate of existing issues. Please check:
<tool_call>tag cannot be rendered correctly, results in the conversation being interrupted and failing to proceed automatically #9674:<tool_call>tag cannot be rendered correctly, results in conversation being interrupted and failing to proceed automatically — same symptom of naked XML tool call tags appearing and progress halting<tool_call>appears in model output — same core issue400 Bad Requestwith local vLLM (Qwen 3 XML Tools) #16488: Silent agent crash with Qwen 3 XML tool calls via vLLM — related Qwen XML tool call parsing issueThese issues describe the same behavior: the model outputs raw
<tool_call>XML instead of a properly parsed tool invocation, causing the session to stall.lowlyocean commentedon Apr 25, 2026
I'm seeing this as well as of the recent OpenCode update. Was working fine before with Qwen 3.6 (I haven't changed the model)
boutell commentedon Apr 25, 2026
#9674 seems related but involves different models and different syntax showing up, so I'll leave this open for now and see what the maintainers think.
lowlyocean commentedon Apr 25, 2026
That's an old issue (Jan.) and only as recently as a few days ago I was running rock solid. So suggests to me it's some recent change rather than something lingering from January.
v1.14.23 seems to be where the problem started. I'm testing 1.14.22 to see if it's also affected. I know that 1.14.21 worked fine
MRDRMUFN commentedon Apr 25, 2026
I've also experienced this issue on v1.14.11 using unsloth/Qwen3.6 27B Q8_K_XL. It cropped up 30K deep with >100K context window.
mingfang commentedon Apr 25, 2026
this is a problem with the combination of the Qwen models and the reasoning parser.
There are several issues like these with vLLM vllm-project/vllm#39056
lowlyocean commentedon Apr 25, 2026
Seems this is also related but no clear where to specify "interleaved_reasoning". Is that something to add to llama.cpp args alongside other thinking options, i.e.
--chat-template-kwargs "{\"enable_thinking\":true, \"preserve_thinking\":true}"?hviden commentedon Apr 27, 2026
我也是同样的问题, llama-cpp+opencode+Qwen3.6-35B-A3B-UD-IQ4_NL.gguf, 并不是必现的, 搞得我很难去测试, 也不知道是怎么引起的, 每次都是中断在tool_call这样的思考中,例如:Thinking: <tool_call>
<function=edit>
<parameter=filePath>
D:\Temp\opencode\vnote\src\store\useAppStore.ts
<parameter=oldString>
console.log('migrate Input:', JSON.parse(JSON.stringify(persistedState)).state?.notebooks ? { notebooks: 'present', count: persistedState.state?.notebooks?.length } : 'no notebooks')
if (!persistedState || typeof persistedState !== 'object') {
<parameter=newString>
</tool_call>
hviden commentedon Apr 27, 2026
我看了ollama的修复方法, ollama/ollama#15022, 看着就是把tool_call放到think外, 我使用的是llama-cpp, 所以我试着同样的方法做了个修复, 我有用官方的chat template file, 直接改一下, 因为我这不是必现, 所以也不知道是否有效, 先试试了
99sono commentedon May 9, 2026
Same problem here:
Instead
cline --tuihas no problem parsing the output of qwen.Here is my docker compose for this:
99sono commentedon May 10, 2026
Right now, with open code 1.14.46, for whatever reason, things seem to be working normally.
RevengeRip commentedon May 10, 2026
Still halts for me
sghaskell commentedon May 13, 2026
+1
I'm getting tool call leaks multiple times a session.
Qwen3.6-27B running in vLLM
v1.14.48
soern commentedon May 14, 2026
+1 on v1.14.50, using Qwen3.6-35B-A3B
This also happened to me on other Qwen 3.5 model.
sghaskell commentedon May 17, 2026
PR opened to address this issue: #27984
sghaskell commentedon May 17, 2026
You can test this fix locally:
The fix strips trailing XML artifacts (backtick-lt/parameter-gt, backtick-lt/function-gt, ␐) from streaming text deltas before they reach the TUI. Test with a multi-tool-call prompt to verify no XML leakage.
danielcherubini commentedon May 28, 2026
Fix worked
fenrir-labs76 commentedon Jun 29, 2026
Reproduced on qwen3.6-35b (128K context) via Ollama with a different symptom: silent infinite spinner.
Tracing the streaming protocol reveals what's actually happening. Ollama's OpenAI-compatible endpoint puts thinking tokens in
delta.reasoning, notdelta.content:(thousands of chunks, all
content: "",reasoning: "...")@ai-sdk/openai-compatiblereadsdelta.contentonly —delta.reasoningis silently dropped. Every chunk arrives withcontent: "". From opencode's perspective the model is streaming but producing nothing — spinner shows "working", zero text is ever rendered, and the user sees an infinite silent spinner.This also explains the naked-XML-in-thinking symptom in the original report: if the model emits a tool call inside its thinking chain, it lands in
delta.reasoningand opencode never processes it as a tool call. Progress halts because the tool never executes.Reproduced with:
qwen3.6-35bvia Ollama's/v1endpoint@ai-sdk/openai-compatible, opencode 1.17.11The model responds correctly — the content is there. It's just in the wrong field.
@ai-sdk/openai-compatiblenever surfacesdelta.reasoningto opencode, so the response appears empty even though the model completed successfully.Suggested fix: when
@ai-sdk/openai-compatiblereceivesdelta.reasoningchunks, surface them as a"thinking"stream part (or at minimum update the spinner label to "Thinking…"). The UI infrastructure already exists — the"Thinking:"prefix is visible in the original report's screenshot. It just isn't wired to thedelta.reasoningpath from Ollama.brusacco commentedon Jul 24, 2026
Happened to me just now, current OpenCode version and QWEN 3.6 35b as well (ollama)
<|mask_start|>Now I need to create the specs and design artifacts. Let me write them both.<|mask_end|>
Gr33n93 commentedon Jul 31, 2026
Reproduced again on 2026-07-31 with OpenCode 1.18.10.
Environment:
@ai-sdk/openai-compatibleObserved in OpenCode's SQLite session data, the assistant reasoning ended with:
That message was stored with
finish: "stop"and no tool part was created, so the TUI stopped progressing.After I sent a single
?, the next assistant turn emitted a properly structuredblender_execute_blender_codetool call and it completed successfully. The model endpoint and tool were therefore still healthy; only that tool-call turn was lost.A local history-sanitizer plugin is enabled, but it only removes historical Qwen reasoning before replay. It does not modify the current streamed response or tool call.
This looks like the exact naked-XML failure described here, and it still occurs on 1.18.10. It also happened relatively early (~34k input tokens), not only near the end of a 100k+ context. PR #27984 is still open, so its proposed mitigation does not appear to be present in the released version.
nemoobc commentedon Aug 28, 2026
Adding a +1 / confirmation for this — same symptom on a recent release.
Environment:
1.18.23(latest),[email protected]v24.18.0Symptom: Intermittently, raw tool-call tags (
<parameter name="...">...</parameter>, stray<parameter>,</parameter>) appear as literal text in the TUI above the assistant message. Tools still execute fine — it's a rendering/parsing artifact. Most likely to happen on multi-step turns (bash + edit/glob back-to-back).Re: PR #27984: Confirming what @Gr33n93 reported on 1.18.10 — the proposed fix is still open and not present in 1.18.23, so this is still reproducible on the latest release.
Happy to add a screenshot on next occurrence. Thanks for tracking this — would love to see #27984 (or the #30633 approach) merged.
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊