Tool calling stops working (raw XML appears). How to recover? #9416

Open
opened 2026-02-16 18:12:23 -05:00 by yindo · 0 comments
Owner

Originally created by @MartinEmrich on GitHub (Feb 15, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

Some interactions deep into a session, it sometimes stops actually calling the tools. Instead some "raw" XML-like toolcalling code appears. Sometimes it looks correct, sometimes the last closing element is missing (like here).

Example:

 I need to fetch the opencode.nvim README from the repository to understand   
 the actual documentation claims about snacks.nvim requirements.              
                                                                              
 <function=webfetch>                                                          
 <parameter=url>                                                              
 https://raw.githubusercontent.com/opencodeai/opencode.nvim/main/README.md    
 </parameter>                                                                 
 <parameter=format>                                                           
 markdown                                                                     
 </parameter>                                                                 

To my knowledge one has to expect this from time to time, when the model gets too confused to remember how to properly call the tool?

But is there an option or key combination to recover from this without having to start a fresh session? Or does this indicate a configuration mistake?

If relevant: I run a local LLM with llama-server (current master):

llama-server -v --parallel 2 -hf unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_XL --jinja --temp 0.7 --min-p 0.0 --top-p 0.80 --top-k 20 --repeat-penalty 1.0 --ctx-size 98304 --host 0.0.0.0 --port 8012 --metrics  -ts 34/15 -fa on -ctk q8_0 -ctv q8_0

(Model settings from unsloth's recommendation, layer-split and kv quant are my experiments).

opencode.json model definition:

"gwen3-coder-30b": {
          "name": "Gwen3 Coder (local)",
          "id": "gwen/gwen3-coder-30b:q4_K_XL",
          "modalities": { "input": ["text"], "output": ["text"] },
          "limit": {
            "context": 49152,
            "output": 49152
          }
        },

According to llama-server metrics, maximum context used was only around 27400.

Originally created by @MartinEmrich on GitHub (Feb 15, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question Some interactions deep into a session, it sometimes stops actually calling the tools. Instead some "raw" XML-like toolcalling code appears. Sometimes it looks correct, sometimes the last closing element is missing (like here). Example: ``` I need to fetch the opencode.nvim README from the repository to understand the actual documentation claims about snacks.nvim requirements. <function=webfetch> <parameter=url> https://raw.githubusercontent.com/opencodeai/opencode.nvim/main/README.md </parameter> <parameter=format> markdown </parameter> ``` To my knowledge one has to expect this from time to time, when the model gets too confused to remember how to properly call the tool? But is there an option or key combination to recover from this without having to start a fresh session? Or does this indicate a configuration mistake? If relevant: I run a local LLM with llama-server (current master): ``` llama-server -v --parallel 2 -hf unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_XL --jinja --temp 0.7 --min-p 0.0 --top-p 0.80 --top-k 20 --repeat-penalty 1.0 --ctx-size 98304 --host 0.0.0.0 --port 8012 --metrics -ts 34/15 -fa on -ctk q8_0 -ctv q8_0 ``` (Model settings from unsloth's recommendation, layer-split and kv quant are my experiments). *opencode.json* model definition: ``` "gwen3-coder-30b": { "name": "Gwen3 Coder (local)", "id": "gwen/gwen3-coder-30b:q4_K_XL", "modalities": { "input": ["text"], "output": ["text"] }, "limit": { "context": 49152, "output": 49152 } }, ``` According to llama-server metrics, maximum context used was only around 27400.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9416