[GH-ISSUE #5276] [Engine] Opening tag spelled out as plain text "<toolcall>" (no underscore) is not recognised, the turn ends and the client hangs #3140

Closed
opened 2026-11-07 14:38:24 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @abram1984 on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5276

Area

[Engine]

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

Reproduction status

Reproduced locally

What happened

Sometimes the model (Qwen 3.8 Flash Next, UD-Q4_K_XL) does not emit the special <tool_call> token to open a call. It writes the opening tag as ordinary text, and misspells it: <toolcall>, with no underscore. The closing tag in the same answer is the normal </tool_call>. The parser does not see the block as a call, so it is returned to the client as plain assistant text. The model then stops, because it is waiting for a tool result, and the agent run hangs.

This is what the client showed, with paths and values replaced. The app is OpenMinis, talking to /v1/messages.

<toolcall>
<function=bash>
<parameter=command>
cd <project dir> && rg -o '<pattern>' landing.html | sort | uniq -c
</parameter>
<parameter=tooltitle>
<short title>
</parameter>
</function>
</tool_call>

The body is a valid call: the right function, the right parameter syntax, and the closing tags are in place. Only the opening tag is wrong.

Calls also end up as text in another client (Kelivo). I have not checked whether it is this same misspelled tag.

Suggestion

When an answer contains </tool_call> and the text before it is <function=NAME> followed by parameters for a declared tool, a near-miss opening tag could be accepted as the start of the call. Examples are <toolcall>, <tool-call> and <tool_call written as text tokens. The rule could also be narrower: accept it only when the closing tag is the real special token. Calls quoted inside a code fence should stay as text, as now (#4613).

#4071, #4189 and #4751 are about calls that come back as text. None of them shows this misspelled opening tag, as far as I can see.

Strata version

Strata 0.2.10, source at ffa80d73 (2026-11-02)

Graphics card, memory and system

RTX 4060 Ti 16 GB (PCIe 3.0 x8) and RTX 3060 12 GB (PCIe 2.0 x4), driver 595.104.02. Ryzen 7 5700X, 96 GB DDR4. Pop!_OS 24.04 (noble).

Model, size and settings

Qwen 3.8 Flash Next, unsloth UD-Q4_K_XL, 384K context, --kv int8. Config sampling: temperature 1.0, top_p 0.95, top_k 20 (the model card defaults). The client may override these.

Logs

I could not match an engine log line to this exact answer. The closest line from the same morning is:
1 <tool_call> block(s) in the answer did not read as a call of a declared tool and went back as text (a name the request did not declare, or a form the template does not use); the names the model wrote: bash
It may or may not be the same request.

Originally created by @abram1984 on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5276 ### Area [Engine] ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### Reproduction status Reproduced locally ### What happened Sometimes the model (Qwen 3.8 Flash Next, UD-Q4_K_XL) does not emit the special `<tool_call>` token to open a call. It writes the opening tag as ordinary text, and misspells it: `<toolcall>`, with no underscore. The closing tag in the same answer is the normal `</tool_call>`. The parser does not see the block as a call, so it is returned to the client as plain assistant text. The model then stops, because it is waiting for a tool result, and the agent run hangs. This is what the client showed, with paths and values replaced. The app is OpenMinis, talking to `/v1/messages`. ``` <toolcall> <function=bash> <parameter=command> cd <project dir> && rg -o '<pattern>' landing.html | sort | uniq -c </parameter> <parameter=tooltitle> <short title> </parameter> </function> </tool_call> ``` The body is a valid call: the right function, the right parameter syntax, and the closing tags are in place. Only the opening tag is wrong. Calls also end up as text in another client (Kelivo). I have not checked whether it is this same misspelled tag. ## Suggestion When an answer contains `</tool_call>` and the text before it is `<function=NAME>` followed by parameters for a declared tool, a near-miss opening tag could be accepted as the start of the call. Examples are `<toolcall>`, `<tool-call>` and `<tool_call` written as text tokens. The rule could also be narrower: accept it only when the closing tag is the real special token. Calls quoted inside a code fence should stay as text, as now (#4613). ## Related #4071, #4189 and #4751 are about calls that come back as text. None of them shows this misspelled opening tag, as far as I can see. ### Strata version Strata 0.2.10, source at ffa80d73 (2026-11-02) ### Graphics card, memory and system RTX 4060 Ti 16 GB (PCIe 3.0 x8) and RTX 3060 12 GB (PCIe 2.0 x4), driver 595.104.02. Ryzen 7 5700X, 96 GB DDR4. Pop!_OS 24.04 (noble). ### Model, size and settings Qwen 3.8 Flash Next, unsloth UD-Q4_K_XL, 384K context, `--kv int8`. Config sampling: temperature 1.0, top_p 0.95, top_k 20 (the model card defaults). The client may override these. ### Logs I could not match an engine log line to this exact answer. The closest line from the same morning is: `1 <tool_call> block(s) in the answer did not read as a call of a declared tool and went back as text (a name the request did not declare, or a form the template does not use); the names the model wrote: bash` It may or may not be the same request.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6651531822 --> @github-actions[bot] commented on GitHub (Nov 5, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6652049487 --> @github-actions[bot] commented on GitHub (Nov 5, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Nov 7, 2026):

Fixed: the <toolcall> and <tool-call> openers are now read as a tool call when a call of a declared tool follows, so plain prose never triggers it (63fd75922, b1541ab24).

Released in Strata v0.2.12: https://github.com/Niko1221/Strata/releases/tag/v0.2.12

<!-- gh-comment-id:6704754464 --> @Niko1221 commented on GitHub (Nov 7, 2026): Fixed: the `<toolcall>` and `<tool-call>` openers are now read as a tool call when a call of a declared tool follows, so plain prose never triggers it (63fd75922, b1541ab24). Released in Strata v0.2.12: https://github.com/Niko1221/Strata/releases/tag/v0.2.12
Author
Owner

@abram1984 commented on GitHub (Nov 7, 2026):

Thanks for the quick fix! I'll update to 0.2.12 today and keep an eye on it with OpenMinis and UD-Q4_K_XL. If the misspelled opener shows up again, I'll reopen with the raw answer text.

<!-- gh-comment-id:6705590863 --> @abram1984 commented on GitHub (Nov 7, 2026): Thanks for the quick fix! I'll update to 0.2.12 today and keep an eye on it with OpenMinis and UD-Q4_K_XL. If the misspelled opener shows up again, I'll reopen with the raw answer text.
Author
Owner

@rugabunda commented on GitHub (Nov 7, 2026):

Problem persists: https://github.com/Niko1221/Strata/issues/4189

<!-- gh-comment-id:6712310071 --> @rugabunda commented on GitHub (Nov 7, 2026): Problem persists: https://github.com/Niko1221/Strata/issues/4189
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3140
No description provided.