#Raw XML in Chat

1 messages · Page 1 of 1 (latest)

trail ferry
#
  • Version: 2026.3.7
  • Both web UI and TUI affected
  • Tool calls render as raw XML in chat bubbles

Can someone please provide guidance on removing raw XML from gateway chat and telegram chat?

dim etherBOT
#

Most of the time “raw XML tool calls in bubbles” is just verbose / reasoning visibility being enabled for that session.

1) Turn off the stuff that makes tool internals visible

In the chat where you’re seeing it (Gateway web chat and the Telegram chat), send:

/verbose off
/reasoning off

This is per-session, so you may need to do it in each conversation once.

Docs/FAQ: https://docs.openclaw.ai/help/faq#how-do-i-stop-internal-system-messages-from-showing-in-chat
Thinking/verbose docs: https://docs.openclaw.ai/tools/thinking

2) If it keeps coming back, fix the session default

In Control UI → Sessions, open that session and set Verbose back to inherit (and reasoning visibility off).

#

Also double-check you didn’t set a config default like:

  • agents.defaults.verboseDefault: "on" (or "full")

3) If the XML looks like <invoke name="...">...</invoke>

That pattern is usually a model/provider issue (commonly MiniMax leaking tool calls as XML-in-text). In that case the cleanest workaround is: switch to a tool-native model (Anthropic/OpenAI) for that agent, or at least for tool-heavy sessions.

If you paste 5–10 lines of one of the XML bubbles (redact secrets), and tell which model/provider you’re using (/status shows it), I can tell you which bucket you’re in and what the best fix is.

trail ferry
#

<parameter name="yieldMs">30000</parameter>
</invoke>
</function_calls>
<function_calls>
<invoke name="exec">
<parameter name="command">find /tmp/cpgio-tradeshow-capture -type f | grep -v node_modules | grep -v ".git/" | sort 2>&1</parameter>
<parameter name="yieldMs">10000</parameter>
</invoke>
</function_calls>

dim etherBOT
#

That snippet (<function_calls> … <invoke name="exec"> …) is not the UI “showing tool internals” — it’s the model outputting the tool call markup as plain text, and OpenClaw is forwarding it because tool-calling isn’t being handled natively for that provider/model.

So the fix is on the model/provider configuration, not a chat setting.

Most common cause (Ollama / local models)

If you’re using Ollama via the OpenAI-compatible /v1 URL, switch to the native Ollama API, otherwise tool calling is unreliable and you’ll see raw tool calls leak into chat:

  • Wrong (causes leaks): baseUrl: "http://host:11434/v1" with api: "openai-completions"
  • Correct: baseUrl: "http://host:11434" (no /v1) with api: "ollama"

Docs (this warning is explicitly called out):
https://docs.openclaw.ai/providers/ollama

If you’re on an OpenAI-compatible proxy (vLLM/llama.cpp/etc.)

Make sure the upstream actually supports OpenAI tool calling for the API mode you picked. Some combos don’t support streaming + tool calling correctly; the result is the model “roleplaying” tool calls in text (what you’re seeing).

Quick sanity checks

#
  1. In the affected chat, run /status and paste the provider/model line.
  2. Paste your models.providers.<your-provider> block (redact keys). Especially baseUrl + api.

If you confirm you’re on Ollama /v1, the fix is simply switching to api:"ollama" + base URL without /v1 and restarting the gateway. After that, new messages should stop showing XML.

trail ferry
#

🦞 OpenClaw 2026.3.7 (3caab92)
🧠 Model: anthropic/claude-sonnet-4-6 ·
🔑 token (anthropic:claude-max)
đź§® Tokens: 3 in / 41 out
🗄️ Cache: 99% hit · 11k cached, 153 new
📚 Context: 11k/200k (5%) ·
đź§ą Compactions: 0
🧵 Session: agent:main:telegram:direct: • updated just now
⚙️ Runtime: direct · Think: adaptive
🪢 Queue: collect (depth 0)

dim etherBOT
#

Good — that /status output means you’re not on a local/Ollama /v1 setup. You’re on:

  • Model: anthropic/claude-sonnet-4-6
  • Auth: anthropic:claude-max

And the XML you pasted (<function_calls><invoke name="exec">…) is the tool-call markup format.

The key question

Are you seeing that XML only when tools run (exec/read/web_fetch/etc.), i.e. as “extra bubbles” around tool execution?

If yes, this is almost always because Verbose is enabled for that session (or defaulted on in config). In that mode, OpenClaw will surface tool-call details — and for some backends those details look exactly like the XML you pasted.

Fix (per chat/session)

In the chat where it happens (Telegram + web UI/TUI session), send:

#
/verbose off

(If you want to confirm first: send /verbose with no args; it will tell you the current level.)

Fix (make it stay off)

  • Control UI → Sessions → set Verbose back to inherit (not on/full)
  • Check config for agents.defaults.verboseDefault and make sure it’s not set to "on" or "full"

Docs: https://docs.openclaw.ai/help/faq#how-do-i-stop-internal-system-messages-from-showing-in-chat


If /verbose off is already set and the XML still appears

Then it’s not “tool debug bubbles” — it means the model is emitting <function_calls>…</function_calls> as plain assistant text (i.e. it’s leaking into the user-facing response). In that case, next step is: paste one full message showing:

  1. the XML bubble, and
#
  1. whether the tool actually executed right after it (did you get an exec result?)

…and I’d treat it as a bug worth a GitHub issue, because user-facing output should not include that markup.

trail ferry
#

What should I prompt to get the tool debug bubbles?

dim etherBOT
#

Send a standalone slash command in the chat where you want the debug bubbles:

  • Minimal tool debug bubbles (tool start summaries):

    /verbose on
    
  • Maximum detail (also sends tool outputs as separate bubbles, truncated):

    /verbose full
    

To check what it’s currently set to:

/verbose
#

Turn it back off:

/verbose off

If you also want to see reasoning bubbles:

/reasoning on

Telegram-only “stream reasoning into the draft while generating”:

/reasoning stream

Docs: https://docs.openclaw.ai/tools/thinking

trail ferry
#

I just asked can we jump back into github and this is what it returned:

<function_calls>
<invoke name="exec">
<parameter name="command">cat /Users/mainstreet/.openclaw/workspace/memory/2026-03-09.md 2>/dev/null; cat /Users/mainstreet/.openclaw/workspace/memory/2026-03-08.md 2>/dev/null | tail -50</parameter>
<parameter name="yieldMs">5000</parameter>
</invoke>
</function_calls>

What were we working on? I don't have a daily note from today yet and my exec is being finicky this session. Last thing I have in MEMORY.md is the X/Twitter API setup and the feature_mailer cron for Vietnam Streets. Were we in the middle of something specific on GitHub, or starting fresh?

dim etherBOT
#

I can’t see your local MEMORY.md / daily notes from here (I checked my own memory store and there’s nothing about “Vietnam Streets”), so I can’t truthfully answer “what were we working on?” directly.

What I can do is tell you how to recover it quickly, and why you’re getting that XML.

Why you’re seeing <function_calls>…</function_calls>

That’s the model printing a tool call as text instead of OpenClaw executing the tool. In other words: tool calling for exec isn’t actually happening in that session.

The most common reason on 2026.3.7 is: your tool policy doesn’t include runtime tools.

Check your tool profile / allowlist

Make sure you’re not on a restricted profile like messaging or minimal:

  • In config, tools.profile should be coding or full.
    • coding includes group:runtime → exec + process.

Docs: https://docs.openclaw.ai/gateway/configuration-reference#tool-profiles

#

(After changing config, restart the gateway.)

How to figure out what you were doing (without needing exec tool)

Option A: Look at session transcripts on disk

Your sessions live under:

Run in your terminal:

openclaw sessions --active 1440
# or
openclaw sessions --active 10080 --json