#Tool usage appears in chat instead of being executed
1 messages Ā· Page 1 of 1 (latest)
Let me check the local docs/reference checkout first so I donāt guess.
I found a couple likely paths, Iām narrowing to the one that matches ātool calls get spoken instead of executed.ā
That usually ends up being one of two things:
-
Text leak only
The model is emitting raw tool-call XML like<function>...</function>and Discord shows it as assistant text. There was a recent fix for Gemma-style tool-call text leaks in2026.4.15, but Iād still want the exact build. -
Tools are not actually being called
This is very often a model/backend compatibility issue, especially with Ollama, LM Studio, llama.cpp, or other OpenAI-compatible local backends. In that case the model ādescribesā the tool call instead of emitting a real structured one.
Can you paste these?
openclaw --version
openclaw status --all
openclaw models status
And also tell me:
- what model/provider youāre using
- whether the bot is printing literal tags like
<function>/<tool_call> - whether this is a local OpenAI-compatible backend (Ollama, LM Studio, llama.cpp, inferrs, etc.)
If it is a local/OpenAI-compatible backend, the two doc bits Iād check first are:
Relevant compat knobs there are:
compat.requiresStringContent: truecompat.supportsTools: false
If you paste the outputs plus one example of the ātool call as textā message, I can probably narrow it down fast.
Openclaw version is 2026.4.15 (041266a). The status and models status both go way over the text limit and I can't attach files.
I'm using zai/glm-5-turbo
In the TUI the bot is printing literal tags, in signal it's printing code-like text
Let me check ā session_status is a tool call so it'll probably show as text again š
Based on the runtime info in my config, I'm on zai/glm-5-turbo.
5m
try another tool use?
5m
I'm going to attempt an actual tool call now ā not writing it as text, but invoking it properly.
session_status
If that still shows as text, then yeah, tool calling is broken on this model/runtime combo and it's not something I can fix from my end.
@cold moss can I get the information you need to you in a different way?
Yeah, absolutely. You do not need to paste the huge full outputs.
The smallest useful thing would be one of these:
Best option
Paste just one short raw example of what the agent prints when it tries a tool call, for example the literal <function>... / code-like block, with secrets redacted.
Also useful
Paste these tiny outputs:
openclaw config get agents.defaults.model
openclaw config get agents.defaults.models
If agents.defaults.models is too big, just paste the zai/glm-5-turbo part.
Most useful log snippet
Reproduce one failed tool call, then paste only the matching lines from the log around it, like the first ~20 relevant lines containing tool, function, glm, or zai.
If that helps, you can also just answer these in plain text:
- Does it print literal XML-ish tags like
<function>? - Or is it more like JSON / code block text?
- Did this start immediately on
2026.4.15with no model change?
My current guess is still that zai/glm-5-turbo is emitting tool-call text instead of structured tool calls, so a tiny raw sample is probably the fastest way to confirm it.
Yeah, absolutely. You do not need to paste the huge full outputs.
Best options, smallest to biggest:
- Best: paste one short raw example of the broken tool call output, exactly as shown, with secrets redacted
- Also great: upload a screenshot of the TUI/Signal output
- Small config bits:
If the second one is too big, just paste theopenclaw config get agents.defaults.model openclaw config get agents.defaults.modelszai/glm-5-turbopart
If you want, the single most useful thing is just:
- trigger one tool call
- copy the literal text it prints (
<function>..., JSON-ish blob, etc.)
- paste that here
That should be enough to confirm whether zai/glm-5-turbo is emitting fake text tool calls instead of structured ones.
ā°āÆ openclaw config get agents.defaults.model 20:24:41
openclaw config get agents.defaults.models
š¦ OpenClaw 2026.4.15 (041266a)
Say "stop" and I'll stopāsay "ship" and we'll both learn a lesson.
{
"primary": "zai/glm-5-turbo",
"fallbacks": [
"openrouter/auto",
"mlx_qwen/mlx-community/Qwen3.5-9B-MLX-4bit"
]
}
š¦ OpenClaw 2026.4.15 (041266a)
I don't judge, but your missing API keys are absolutely judging you.
{
"google/gemini-2.5-pro": {
"alias": "gemini"
},
"openrouter/nvidia/nemotron-3-super-120b-a12b:free": {},
"openrouter/nvidia/nemotron-nano-12b-v2-vl:free": {},
"openrouter/auto": {
"alias": "OpenRouter"
},
"zai/glm-5": {
"alias": "GLM-5"
},
"zai/glm-5v-turbo": {
"alias": "GLM-5v-turbo"
},
"zai/glm-5.1": {
"alias": "GLM-5.1"
}
}
Output:
Any new and interesting plugins/skills available?
<tool_call>exec</arg_value>command</arg_key><arg_value>openclaw skills search 2>&1 || openclaw
skill search 2>&1 || openclaw plugins search 2>&1 || true</arg_value></tool_call>
/clear
NO
Can you run a tool call real quick
<tool_call>session_statusführung</arg_value>
connected | idle
agent main | session main (openclaw-tui) | zai/glm-5-turbo | think medium | reasoning | tokens
43k/203k (21%)
Yep, thatās enough to diagnose.
This is not a Signal/TUI rendering bug. Your model is emitting fake text tool calls like:
<tool_call>...- malformed payloads like
session_statusführung
That means zai/glm-5-turbo is not producing a proper structured tool call on your setup, itās writing tool syntax into the assistant text stream.
First thing Iād try
Z.AI has tool_stream on by default. Turn it off for that model:
{
agents: {
defaults: {
models: {
"zai/glm-5-turbo": {
params: { tool_stream: false },
},
},
},
},
}
Then restart:
openclaw gateway restart
Docs:
If that still breaks
Iād stop using zai/glm-5-turbo for tool-heavy agent runs. The Z.AI docs default to zai/glm-5.1, not glm-5-turbo, so Iād switch the primary model next and retest.
One important detail: your fallbacks probably wonāt save this, because the run is not āfailingā hard enough to trigger fallback, itās just emitting garbage tool text.
If you want, try just the tool_stream: false change first and tell me whether the next tool call still prints raw tags.
This feels like a regression as it wasn't happening before I updated. It still prints raw tags.
Iām checking whether thereās already a post-2026.4.15 fix on main for raw tool-call text leaking, so I can tell you if this is āknown + fixedā versus ānew bug, needs issue.ā
Yeah, I think youāre right, this does smell like a regression.
I found a follow-up fix on main after 2026.4.15 for one class of raw tool-call text leaks, but your example is still uglier than that, malformed <tool_call>...<arg_key>... text, and tool_stream: false didnāt fix it. So Iād treat this as a real bug/regression with the zai/glm-5-turbo tool-call path on 2026.4.15.
What Iād do now
Immediate workaround
Stop using zai/glm-5-turbo for tool-heavy runs for now.
Proper next step
Please file a GitHub issue here:
https://github.com/openclaw/openclaw/issues
You can pretty much paste this:
Title
Regression in 2026.4.15: zai/glm-5-turbo prints raw <tool_call> tags instead of executing tools
Body
OpenClaw version: 2026.4.15 (041266a)
Model:
- primary: zai/glm-5-turbo
- fallbacks: openrouter/auto, mlx_qwen/mlx-community/Qwen3.5-9B-MLX-4bit
Symptoms:
- tool calls are emitted as assistant text instead of being executed
- in TUI it prints literal raw tags
- in Signal it prints code-like tool-call text
Example output:
<tool_call>exec</arg_value>command</arg_key><arg_value>...</arg_value></tool_call>
and
<tool_call>session_statusführung</arg_value>
What I tried:
- set `agents.defaults.models["zai/glm-5-turbo"].params.tool_stream = false`
- restarted gateway
- still reproduces
Notes:
- this was not happening before updating to 2026.4.15
- looks like a regression in the Z.AI / GLM tool-call path
If you want, I can also help you trim that into a cleaner issue report before you post it.
I've just tried it in glm-5.1, same issue. Is there any way to roll back version to verify?
Iām checking the update/downgrade docs so I donāt guess the rollback steps.
Yep, you can roll back to verify.
Docs: https://docs.openclaw.ai/install/updating
If you installed via npm / normal package install
This is the easiest path:
openclaw update --tag <known-good-version> --dry-run
openclaw update --tag <known-good-version>
openclaw doctor
openclaw gateway restart
A couple important notes:
--tagworks for package installs only
- if itās a downgrade, OpenClaw should prompt for confirmation
- you can also pin directly with npm:
npm i -g openclaw@<version> openclaw doctor openclaw gateway restart
If you installed from source / git
Use the repo checkout route:
git fetch origin
git checkout "$(git rev-list -n 1 --before=\"2026-01-01\" origin/main)"
pnpm install && pnpm build
openclaw gateway restart
Then go back to latest with:
git checkout main && git pull
Useful tip
If you just want to confirm regression, do a one-off rollback to the last version you know worked, test one tool call, then come back to current.
If rollback fixes it, thatās really strong evidence for the GitHub issue. If you want, tell me how you installed OpenClaw and I can point you at the exact rollback command.
I am getting a similar issue but also worse ones - zai models just return no tokens due to some missing openai dependency - and also some tool output is printed to the gateway logs
Let me check the docs/source for that āmissing openai dependencyā symptom so I donāt send you on a wild goose chase.
First thing, can you paste:
openclaw --version
The āmissing openai dependencyā bit sounds a lot like the recent bundled plugin runtime deps change. Thereās a doctor check for that now.
Iād try this first:
openclaw doctor --fix
openclaw gateway restart
Docs: