Skip to content

The <tool_call> tag cannot be rendered correctly, results in the conversation being interrupted and failing to proceed automatically #9674

Closed as not planned

Description

@LeoNardo-LB

Description

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
Image
after compact, everything goon normalize
Image

Plugins

oh-my-opencode

OpenCode version

1.1.27

Steps to reproduce

No response

Screenshot and/or share link

Image Image

Operating System

Windows 11

Terminal

Powershell or anyone

Activity

  1. github-actions commented on Jan 20, 2026

    @github-actions
    Contributor

    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.

  2. LeoNardo-LB commented on Jan 20, 2026

    @LeoNardo-LB
    Author

    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.

  3. LeoNardo-LB commented on Jan 20, 2026

    @LeoNardo-LB
    Author

    Screenshot_2026-01-21-04-24-26-745_com.oray.sunlogin.jpg
    this is the tool call loop

  4. bi-kai commented on Jan 23, 2026

    @bi-kai

    same issue,with version 1.1.27

    mark & forcus

  5. ApocalypseYun commented on Jan 27, 2026

    @ApocalypseYun

    Is there any progress on this issue?

  6. LeoNardo-LB commented on Jan 27, 2026

    @LeoNardo-LB
    Author

    @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.

  7. Mikec78660 commented on Feb 1, 2026

    @Mikec78660

    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.

  8. LeoNardo-LB commented on Feb 2, 2026

    @LeoNardo-LB
    Author

    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.

  9. imbible commented on Feb 3, 2026

    @imbible

    I have GLM4.7 & kimi k2.5 self-hosted through exo. Both have the same issue.

  10. SupetZYK commented on Mar 8, 2026

    @SupetZYK

    It seems that the tool call within thinking won't be executed.

  11. mhoelzel142 commented on Mar 11, 2026

    @mhoelzel142

    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:

    Image
  12. linsaftw commented on Mar 12, 2026

    @linsaftw

    I have the same issue, it seems to happen when writing certain words inside the tool call!

  13. LeoNardo-LB commented on Mar 13, 2026

    @LeoNardo-LB
    Author

    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.

  14. Mikec78660 commented on Mar 20, 2026

    @Mikec78660

    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>
    

    ▣ Orchestrator · nemotron-3-super-free

  15. linsaftw commented on Mar 22, 2026

    @linsaftw

    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!

  16. Mikec78660 commented on Mar 23, 2026

    @Mikec78660

    @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.

  17. linsaftw commented on Mar 23, 2026

    @linsaftw

    I recently updated and see them less often, maybe i am just hallucinating, but now it shows "failed tool call" and continues

  18. amahteletrac commented on Jun 2, 2026

    @amahteletrac

    Any updates on this? I am noticing it with qwen 3.6 models on ollama. (both dense and moe models)

  19. github-actions commented on Aug 2, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions