#Tool usage appears in chat instead of being executed

1 messages Ā· Page 1 of 1 (latest)

visual sigil
#

For some reason, since the update to 2026.4.15, any time my agent runs a tool, it shows up as text that the bot says rather than being actually executed.

modest aspenBOT
cold mossBOT
#

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:

  1. 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 in 2026.4.15, but I’d still want the exact build.

  2. 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: true
  • compat.supportsTools: false

If you paste the outputs plus one example of the ā€œtool call as textā€ message, I can probably narrow it down fast.

visual sigil
#

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?

cold mossBOT
#

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.15 with 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:
    openclaw config get agents.defaults.model
    openclaw config get agents.defaults.models
    
    If the second one is too big, just paste the zai/glm-5-turbo part

If you want, the single most useful thing is just:

  1. trigger one tool call
  2. copy the literal text it prints (<function>..., JSON-ish blob, etc.)
#
  1. paste that here

That should be enough to confirm whether zai/glm-5-turbo is emitting fake text tool calls instead of structured ones.

visual sigil
#

ā•°āÆ 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%)

cold mossBOT
#

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.

visual sigil
#

This feels like a regression as it wasn't happening before I updated. It still prints raw tags.

cold mossBOT
#

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.

visual sigil
#

I've just tried it in glm-5.1, same issue. Is there any way to roll back version to verify?

cold mossBOT
#

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:

  • --tag works 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.

robust matrix
#

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

cold mossBOT
#

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: