You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 13, 2026. It is now read-only.
Sometimes when doing tool calls, the LLM starts streaming the tool result duplicated.
I put Claude Code investigating this issue and it says:
Root Cause
The regex on line 24 of leaked_output_sanitize.go:
var leakedMetaMarkerPattern = regexp.MustCompile(`(?i)<[|\|]\s*(?:assistant|tool|end[_▁]of[_▁]sentence|end[_▁]of[_▁]thinking|end[_▁]of[
_▁]toolresults|end[_▁]of[_▁]instructions)\s*[|\|]>`)
Tokens NOT matched:
<|Tool|>[...]: The regex matches bare tool between delimiters, but the actual leaked token includes a JSON payload after closing | >, and the content between <|Tool|> and <|end▁of▁toolresults|> is not stripped
<|Assistant▁END▁OF▁TOOL_CALLS|>: Compound token not in the alternation group — only simple assistant is matched
📷 复现步骤
No response
🚦 期望结果
I manually edited the HTML to show how expected behavior should look:
📦 部署方式
Docker
📌 软件版本
4.4.3
💻 系统环境
macOS
📌 系统版本
No response
🐛 问题描述
Sometimes when doing tool calls, the LLM starts streaming the tool result duplicated.
I put Claude Code investigating this issue and it says:
📷 复现步骤
No response
🚦 期望结果
I manually edited the HTML to show how expected behavior should look:
📝 补充信息
No response