Skip to content

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

Closed

Description

@MartinEmrich

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.

Activity

  1. github-actions commented on Apr 17, 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