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
The <tool_call> tag cannot be rendered correctly, results in the conversation being interrupted and failing to proceed automatically #9674
I am currently using this integration in conjunction with the Oh My Open Code plugin.
After a long conversation session, there is a high probability that the tool_call tag will fail to render correctly. In such cases, content related to the tool_call tag will be displayed during the thinking phase or other processes, and the conversation will stop proceeding automatically at this point.
Based on the content within the tool_call tag—for instance, in the observed case—the tag is supposed to render a clickable response box for users to answer the questions posed by the model.
Once this issue occurs, subsequent normal conversations (e.g., inputting the keyword "Continue") will almost always result in repeated rendering failures. However, executing the /compact command has a chance of resolving this problem temporarily.
show the tool_call tag, but not been rendered correctly
after compact, everything goon normalize
Plugins
oh-my-opencode
OpenCode version
1.1.27
Steps to reproduce
No response
Screenshot and/or share link
Operating System
Windows 11
Terminal
Powershell or anyone
Reacted by Tianshu Xu, zt449569708, NovaHe, Joey, JonasDoe, 捏造的信仰, Juan Cruz Linsalata and york
This issue might be a duplicate of existing issues. Please check:
当输出出现tool call的时候,对话被终止 #8877: 当输出出现tool call的时候,对话被终止 (Tool call rendering breaks conversation) - This appears to be the same issue in Chinese, also mentions the Oh My OpenCode plugin and tool_call tag failures during long conversations
Feel free to ignore if none of these address your specific case.
I believe this is a very serious issue with opencode. It will cause sisyphus to be unable to work continuously, and it can only rely on its retry mechanism to complete tasks with a certain probability in a certain retry, which will greatly affect efficiency.
@ApocalypseYun No, I asked AI to help analyze the code. The possible reason is that when the tool was called, the JSON that should have been returned was accidentally output in xml format, causing the loop interrupted.
The root cause might be that when the context is too large (exceeding 70% occupancy), after the context is filtered by the filtering function, only the xml tool call references remain, and the LLM uses this as a case to imitate the output.
After executing the /compact command, it can return to normal.
But I don't understand ts code very well, so I can't be sure if this is the reason.
Seeing the same. It seems like it happens when the tool call is tried in thinking mode so it doesn't actually get executed. Some models seem to not have this issue but some like the Big-Pickle model seem to do it often. I have seen it with as little as 20% context used. I didn't used to see it so much. Not sure if a prompt got updated or needs to be updated to expressly state that tool calls shouldn't be executed in thinking mode.
I discovered that there is a significant issue with the coding plan of glm, and it is quite serious. The problem disappears when the model is switched to kimi k2.5 free.
I am also experiencing this issue, using glm-4.7-flash:latest hosted via ollama on another pc in my LAN. After long conversations of 40k+ context tokens I begin to see <tool_call> being output in thinking rather than executing the tools directly. This behavior was observed on two different computers (Arch Linux laptop and Ubuntu desktop). I do not see the behavior with other models (gpt-oss:latest, devstral-small, etc) so it seems the issue may be related to the model, as noted by others:
I have the same issue, it seems to happen when writing certain words inside the tool call!
It seems to be a flaw of the model itself. GLM5.0 rarely has such a situation, but it will have other problems, such as outputting repeated fragments similar to garbled characters.
I have seen this with several models Qwen3.5 Qwen-coder-next. It isn't every time but they all seem to try and issue a tool call inside from time to time and it fails and the model usually doesn't recover.
right after I wrote this nemotron-3-super from OpenCode Zen bit the dust.
Thinking: Let me try a different approach.
<tool_call>
<function=todowrite>
<parameter=todos>
{"content": "Read oh-my-opencode-slim plugin to understand agent definitions", "status": "completed", "priority": "high", "id": "1"}, {"content": "Create SPEC.md with full requirements for the webui", "status": "completed", "priority": "high", "id": "2"}, {"content": "Build the webui (HTML/CSS/JS)", "status": "in_progress", "priority": "high", "id": "3"}, {"content": "Implement model assignment logic with context/parallel calculations", "status": "pending", "priority": "high", "id": "4"}, {"content": "Implement GPU/VRAM detection and validation", "status": "pending", "priority": "medium", "id": "5"}, {"content": "Write output files with .dev extension", "status": "pending", "priority": "high", "id": "6"}
</parameter>
</function>
</tool_call>
I have the same issue, it seems to happen when writing certain words inside the tool call!
It seems to be a flaw of the model itself. GLM5.0 rarely has such a situation, but it will have other problems, such as outputting repeated fragments similar to garbled characters.
Yes its a model problem, but its very common on 200B models, if it would be worked around... It would be fucking amazing!
@linsaftw if you are using llama.cpp for the inference engine there is an option to turn off the thinking tags in the output. It isn't as nice as you can't then hide thinking in the terminal and it isn't as easy to see what is the model thinking and what is it's actual implementations but I am doing a set and forget so I don't really care how the terminal looks. I don't know if vLLM or LMstudio or any other inference engines have the same setting but they might.
Activity
github-actions commentedon Jan 20, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
LeoNardo-LB commentedon Jan 20, 2026
I believe this is a very serious issue with opencode. It will cause sisyphus to be unable to work continuously, and it can only rely on its retry mechanism to complete tasks with a certain probability in a certain retry, which will greatly affect efficiency.
LeoNardo-LB commentedon Jan 20, 2026
this is the tool call loop
bi-kai commentedon Jan 23, 2026
same issue,with version 1.1.27
mark & forcus
ApocalypseYun commentedon Jan 27, 2026
Is there any progress on this issue?
LeoNardo-LB commentedon Jan 27, 2026
@ApocalypseYun No, I asked AI to help analyze the code. The possible reason is that when the tool was called, the JSON that should have been returned was accidentally output in xml format, causing the loop interrupted.
The root cause might be that when the context is too large (exceeding 70% occupancy), after the context is filtered by the filtering function, only the xml tool call references remain, and the LLM uses this as a case to imitate the output.
After executing the /compact command, it can return to normal.
But I don't understand ts code very well, so I can't be sure if this is the reason.
Mikec78660 commentedon Feb 1, 2026
Seeing the same. It seems like it happens when the tool call is tried in thinking mode so it doesn't actually get executed. Some models seem to not have this issue but some like the Big-Pickle model seem to do it often. I have seen it with as little as 20% context used. I didn't used to see it so much. Not sure if a prompt got updated or needs to be updated to expressly state that tool calls shouldn't be executed in thinking mode.
LeoNardo-LB commentedon Feb 2, 2026
I discovered that there is a significant issue with the coding plan of glm, and it is quite serious. The problem disappears when the model is switched to kimi k2.5 free.
imbible commentedon Feb 3, 2026
I have GLM4.7 & kimi k2.5 self-hosted through exo. Both have the same issue.
SupetZYK commentedon Mar 8, 2026
It seems that the tool call within thinking won't be executed.
mhoelzel142 commentedon Mar 11, 2026
I am also experiencing this issue, using glm-4.7-flash:latest hosted via ollama on another pc in my LAN. After long conversations of 40k+ context tokens I begin to see <tool_call> being output in thinking rather than executing the tools directly. This behavior was observed on two different computers (Arch Linux laptop and Ubuntu desktop). I do not see the behavior with other models (gpt-oss:latest, devstral-small, etc) so it seems the issue may be related to the model, as noted by others:
linsaftw commentedon Mar 12, 2026
I have the same issue, it seems to happen when writing certain words inside the tool call!
LeoNardo-LB commentedon Mar 13, 2026
It seems to be a flaw of the model itself. GLM5.0 rarely has such a situation, but it will have other problems, such as outputting repeated fragments similar to garbled characters.
Mikec78660 commentedon Mar 20, 2026
I have seen this with several models Qwen3.5 Qwen-coder-next. It isn't every time but they all seem to try and issue a tool call inside from time to time and it fails and the model usually doesn't recover.
right after I wrote this nemotron-3-super from OpenCode Zen bit the dust.
▣ Orchestrator · nemotron-3-super-free
linsaftw commentedon Mar 22, 2026
Yes its a model problem, but its very common on 200B models, if it would be worked around... It would be fucking amazing!
Mikec78660 commentedon Mar 23, 2026
@linsaftw if you are using llama.cpp for the inference engine there is an option to turn off the thinking tags in the output. It isn't as nice as you can't then hide thinking in the terminal and it isn't as easy to see what is the model thinking and what is it's actual implementations but I am doing a set and forget so I don't really care how the terminal looks. I don't know if vLLM or LMstudio or any other inference engines have the same setting but they might.
linsaftw commentedon Mar 23, 2026
I recently updated and see them less often, maybe i am just hallucinating, but now it shows "failed tool call" and continues
amahteletrac commentedon Jun 2, 2026
Any updates on this? I am noticing it with qwen 3.6 models on ollama. (both dense and moe models)
github-actions commentedon Aug 2, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.