Assistant bubble shows raw </tool_call> closing tags as visible text (XML dialect leak)
Description
When the agent uses the XML tool-call dialect (deepseek model), the </tool_call> closing tags bleed into the assistant's visible text content in the chat bubble instead of being stripped by the parser.
What the user sees
I'll pull together some context and check current details on Tokyo in October before building your itinerary.
</tool_call> </tool_call> </tool_call> </tool_call>
The four closing tags appear as literal text in the bubble, one per tool call made in that turn.
Reproduction
Ask a question that triggers multiple parallel tool calls on the deepseek-v4-flash model (e.g. a trip itinerary prompt that fires web_search + web_fetch + memory_recall simultaneously). The XML closing tags for each tool call render as text.
Root cause
The XML dialect parser strips <tool_call>…</tool_call> blocks from the streamed content to render them as tool-use chips. The opening block is consumed correctly but the closing </tool_call> tags are not being removed from the text segment — likely because the closing tag arrives in a different streaming chunk and the text accumulator has already flushed the preceding text.
Screenshot evidence
Observed at ~12:23 on 2026-09-25 during Tokyo itinerary request on thread-eabcf6e9.
Impact
Every multi-tool-call turn on deepseek shows garbage XML in the response. High visibility — affects every complex agent turn.
XML tool-call closing tags </tool_call> appear as visible text in assistant bubble when using deepseek model with multiple parallel tool calls
Labelled priority: p1.
Agent transcript (record [25]) — raw model output showing the tag leak
The assistant message at transcript record index 25 (turn covering Tokyo itinerary request):
{
"role": "assistant",
"content": " I'll pull together some context and check current details on Tokyo in October before building your itinerary.\n\n\n\n\n</tool_call>\n</tool_call>\n</tool_call>\n</tool_call>",
"extra_metadata": {
"reasoning_content": "The user is asking me to build a day-by-day Tokyo itinerary for 3 days in mid-October, staying in Shinjuku. Let me first check my memory for any relevant facts about the user, since this involves a named person's past decisions/preferences.\n\nLet me recall memory first, and then research current info about Tokyo in October.\n\nKey things to do:\n1. Check memory for user context (maybe they've mentioned preferences before)\n2. Research Tokyo mid-October weather, attractions, typical indoor/outdoor mix\n3. Build the itinerary with nearby venues, travel times, weather adjustments\n4. Include emergency numbers and hotel address (need the hotel address \u2014 if I don't know it, I should ask or note it)\n\nWait, the user says \"my hotel address\" \u2014 I don't know their hotel address. I should either ask for it or note that they need to fill it in. Actually, let me check memory first. If nothing, I'll need to ask or leave a placeholder. Given the instruction to act on obvious defaults, but I literally cannot know their hotel address. I'll build the itinerary and leave a placeholder for the hotel address, while asking them to share it. Actually, the better approach: build the itinerary fully, note that I need the hotel address to fill in, and provide a placeholder. But the user asked specifically to include \"my hotel address at the bottom\" \u2014 so they may expect me to know it. I don't. I'll ask for it but still deliver the full itinerary with a placeholder.\n\nActually, let me reconsider: should I research live? The current date is 2026-09-25. The trip is mid-October 2026. I could use web_search for current info on Tokyo October weather and maybe any venue closures. Given the instruction to answer live questions with tools, and this is an itinerary that would benefit from accurate data, I should do some research. But I also have good general knowledge of Tokyo. Let me do a couple of quick web searches to verify weather averages for October and any known information.\n\nLet me plan:\n1. memory_recall for user context\n2. web_search for Tokyo October weather, maybe checking for any notable closures\n3. Build itinerary\n\nActually, let me be efficient. I'll do memory recall + a couple web searches in one batch.\n\nFor the itinerary: 3 days in mid-October, based in Shinjuku. October in Tokyo: average highs ~22\u00b0C (72\u00b0F), lows ~15\u00b0C, mild. Some rain (October is transition into dry season, actually October has moderate rainfall, ~200mm, one of the wetter months but not the rainiest; typhoon season tapers off in October). So mix of indoor/outdoor with indoor backup.\n\nClassic Shinjuku-based 3-day route:\n- Day 1: Shinjuku area itself \u2014 Shinjuku Gyoen (outdoor garden, good
The leak is in content[0].text — the model output text contains bare </tool_call> closing tags. The content[1–4] entries are the correctly-parsed tool_use blocks; their opening <tool_call>…</tool_call> wrappers were consumed by the XML parser, but the parser left the closing tags in the text segment.
Transcript file path (QA machine)
/Users/alan/.openhuman/users/69de186d2c2521812c1936d1/workspace/session_raw/thread-eabcf6e9-e7af-42b1-8255-ee04f360026d-c62c64bec775a7da2030aa7e3c502caa.orchestrator-57c4fd2d66355aa9fd1aea283ce94119.jsonl
Filtered core log (11:20–11:35, thread-eabcf6e9)
11:19:31:INF:store [approval::store] migrated v1 schema column="tool_call_id"
11:19:39:INF:log [web-channel] routing chat turn to 'orchestrator' provider_role='chat' (client_id=mK6QO2R1e7J9yBoJ, thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d) log.target="openhuman_core::web_chat::session" log.module_path="openhuman_core::web_chat::session" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/session.rs" log.line=92
11:19:39:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("ad3c93e6-c015-4694-b94d-be16437d8a0a") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:19:39:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("ad3c93e6-c015-4694-b94d-be16437d8a0a") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:19:39:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/toolkits reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("ad3c93e6-c015-4694-b94d-be16437d8a0a") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:19:40:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/connections reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("ad3c93e6-c015-4694-b94d-be16437d8a0a") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:19:41:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/tools reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("ad3c93e6-c015-4694-b94d-be16437d8a0a") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:19:48:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("ad3c93e6-c015-4694-b94d-be16437d8a0a") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:19:53:INF:turn_run_finalize [tinyagents] turn prompt summary model="openrouter/deepseek/deepseek-v4-flash" system_segments=2 system_bytes=33871 system_segment_bytes=[22975, 10896] model_calls=1 tool_calls=0 input_tokens=8584 cached_input_tokens=0 output_tokens=36
11:19:56:INF:log [transcript_ingest] ingested /Users/alan/.openhuman/users/69de186d2c2521812c1936d1/workspace/session_raw/thread-eabcf6e9-e7af-42b1-8255-ee04f360026d-c62c64bec775a7da2030aa7e3c502caa.orchestrator-57c4fd2d66355aa9fd1aea283ce94119.jsonl: extracted=0 stored=0 deduped=0 reflections=0/0 (deduped=0) thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d log.target="openhuman_core::agent::learning::transcript_ingest" log.module_path="openhuman_core::agent::learning::transcript_ingest" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/agent/learning/transcript_ingest/mod.rs" log.line=193
11:20:02:INF:log [web-channel] reusing cached session agent id=orchestrator for client=mK6QO2R1e7J9yBoJ thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d log.target="openhuman_core::web_chat::session" log.module_path="openhuman_core::web_chat::session" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/session.rs" log.line=341
11:20:02:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("0c47e6aa-fd6f-44d3-acc4-5eaf112fe5a9") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:20:05:INF:turn_run_finalize [tinyagents] turn prompt summary model="openrouter/deepseek/deepseek-v4-flash" system_segments=2 system_bytes=33871 system_segment_bytes=[22975, 10896] model_calls=1 tool_calls=0 input_tokens=8633 cached_input_tokens=8448 output_tokens=35
11:20:07:INF:log [transcript_ingest] ingested /Users/alan/.openhuman/users/69de186d2c2521812c1936d1/workspace/session_raw/thread-eabcf6e9-e7af-42b1-8255-ee04f360026d-c62c64bec775a7da2030aa7e3c502caa.orchestrator-57c4fd2d66355aa9fd1aea283ce94119.jsonl: extracted=0 stored=0 deduped=0 reflections=0/0 (deduped=0) thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d log.target="openhuman_core::agent::learning::transcript_ingest" log.module_path="openhuman_core::agent::learning::transcript_ingest" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/agent/learning/transcript_ingest/mod.rs" log.line=193
11:20:10:WRN:log [web-channel] progress bridge did not drain within 3s; delivering anyway client=mK6QO2R1e7J9yBoJ thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=0c47e6aa-fd6f-44d3-acc4-5eaf112fe5a9 log.target="openhuman_core::web_chat::run_task" log.module_path="openhuman_core::web_chat::run_task" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/run_task.rs" log.line=274
11:20:28:INF:log [web-channel] reusing cached session agent id=orchestrator for client=mK6QO2R1e7J9yBoJ thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d log.target="openhuman_core::web_chat::session" log.module_path="openhuman_core::web_chat::session" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/session.rs" log.line=341
11:20:29:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("e4b1c6d8-dccb-4098-aeef-84ff4a2a8d72") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:20:32:INF:log [web_channel][bridge] time-to-first-visible kind=tool_call first_tool_ms=3642 first_text_ms=Some(3095) round=1 tool=memory_recall request_id=e4b1c6d8-dccb-4098-aeef-84ff4a2a8d72 log.target="openhuman_core::web_chat::turn_timing" log.module_path="openhuman_core::web_chat::turn_timing" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/turn_timing.rs" log.line=48
11:20:37:INF:turn_run_finalize [tinyagents] turn prompt summary model="openrouter/deepseek/deepseek-v4-flash" system_segments=2 system_bytes=33871 system_segment_bytes=[22975, 10896] model_calls=2 tool_calls=1 input_tokens=17487 cached_input_tokens=16896 output_tokens=159
11:20:39:INF:log [transcript_ingest] ingested /Users/alan/.openhuman/users/69de186d2c2521812c1936d1/workspace/session_raw/thread-eabcf6e9-e7af-42b1-8255-ee04f360026d-c62c64bec775a7da2030aa7e3c502caa.orchestrator-57c4fd2d66355aa9fd1aea283ce94119.jsonl: extracted=0 stored=0 deduped=0 reflections=0/0 (deduped=0) thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d log.target="openhuman_core::agent::learning::transcript_ingest" log.module_path="openhuman_core::agent::learning::transcript_ingest" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/agent/learning/transcript_ingest/mod.rs" log.line=193
11:20:42:WRN:log [web-channel] progress bridge did not drain within 3s; delivering anyway client=mK6QO2R1e7J9yBoJ thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=e4b1c6d8-dccb-4098-aeef-84ff4a2a8d72 log.target="openhuman_core::web_chat::run_task" log.module_path="openhuman_core::web_chat::run_task" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/run_task.rs" log.line=274
11:20:48:INF:log [web-chat:suggestions] emitting chat_suggestions thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=e4b1c6d8-dccb-4098-aeef-84ff4a2a8d72 count=3 log.target="openhuman_core::web_chat::suggestions" log.module_path="openhuman_core::web_chat::suggestions" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/suggestions.rs" log.line=185
11:22:58:INF:log [running_subagents] stop_for_thread thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d cancelled=0 live_entries=0 log.target="openhuman_core::agent::orchestration::running_subagents::cancel" log.module_path="openhuman_core::agent::orchestration::running_subagents::cancel" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs" log.line=135
11:22:58:INF:log [web-channel] stop thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d turn=None parallel=0 subagents_cancelled=0 completions_discarded=0 log.target="openhuman_core::web_chat::ops::channel_ops" log.module_path="openhuman_core::web_chat::ops::channel_ops" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/ops/channel_ops.rs" log.line=129
11:23:03:INF:log [web-channel] reusing cached session agent id=orchestrator for client=mK6QO2R1e7J9yBoJ thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d log.target="openhuman_core::web_chat::session" log.module_path="openhuman_core::web_chat::session" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/session.rs" log.line=341
11:23:04:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/toolkits reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("47905976-6308-427d-b0f9-66b51ef35db9") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:23:04:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/connections reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("47905976-6308-427d-b0f9-66b51ef35db9") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:23:05:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/tools reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("47905976-6308-427d-b0f9-66b51ef35db9") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:23:13:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("47905976-6308-427d-b0f9-66b51ef35db9") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:23:31:INF:turn_run_finalize [tinyagents] turn prompt summary model="openrouter/deepseek/deepseek-v4-flash" system_segments=2 system_bytes=33871 system_segment_bytes=[22975, 10896] model_calls=1 tool_calls=0 input_tokens=8953 cached_input_tokens=3059 output_tokens=285
11:23:31:WRN:log [web-channel] dropping session agent after failed turn — next turn cold-boots from the durable transcript client=mK6QO2R1e7J9yBoJ thread=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=47905976-6308-427d-b0f9-66b51ef35db9 log.target="openhuman_core::web_chat::run_task" log.module_path="openhuman_core::web_chat::run_task" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/run_task.rs" log.line=304
11:23:31:WRN:log [web-channel] run_chat_task failed client_id=mK6QO2R1e7J9yBoJ thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=47905976-6308-427d-b0f9-66b51ef35db9 error=driver failed: The model returned an empty response. Please try again. log.target="openhuman_core::web_chat::ops::start_chat" log.module_path="openhuman_core::web_chat::ops::start_chat" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/ops/start_chat.rs" log.line=573
11:23:31:WRN:observability [observability] web_channel.run_chat_task skipped expected empty-provider-response error: run_chat_task failed client_id=mK6QO2R1e7J9yBoJ thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=47905976-6308-427d-b0f9-66b51ef35db9 error=driver failed: The model returned an empty response. Please try again. domain="web_channel" operation="run_chat_task" kind="empty_provider_response" error=run_chat_task failed client_id=mK6QO2R1e7J9yBoJ thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d request_id=47905976-6308-427d-b0f9-66b51ef35db9 error=driver failed: The model returned an empty response. Please try again.
11:24:48:INF:turn_run_finalize [tinyagents] turn prompt summary model="openrouter/deepseek/deepseek-v4-flash" system_segments=1 system_bytes=4458 system_segment_bytes=[4458] model_calls=1 tool_calls=0 input_tokens=4339 cached_input_tokens=610 output_tokens=371
11:25:16:INF:log [web-channel] routing chat turn to 'orchestrator' provider_role='chat' (client_id=mK6QO2R1e7J9yBoJ, thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d) log.target="openhuman_core::web_chat::session" log.module_path="openhuman_core::web_chat::session" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/session.rs" log.line=92
11:25:16:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("bb1230cc-3e61-4382-8af2-046876da92aa") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:25:16:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman service=openrouter/deepseek/deepseek-v4-flash reason=Inference thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("bb1230cc-3e61-4382-8af2-046876da92aa") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:25:16:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/toolkits reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("bb1230cc-3e61-4382-8af2-046876da92aa") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:25:18:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/connections reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("bb1230cc-3e61-4382-8af2-046876da92aa") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
11:25:19:INF:log [web-channel] egress-surface emitting external_transfer_pending provider=openhuman_backend service=/agent-integrations/composio/tools reason=Integration thread_id=thread-eabcf6e9-e7af-42b1-8255-ee04f360026d client_id=mK6QO2R1e7J9yBoJ request_id=Some("bb1230cc-3e61-4382-8af2-046876da92aa") log.target="openhuman_core::web_chat::egress_surface" log.module_path="openhuman_core::web_chat::egress_surface" log.file="/Users/runner/work/openhuman/openhuman/crates/openhuman-core/src/web_chat/egress_surface.rs" log.line=90
This is fixed on main since 61e2c7b10a (2026-09-28), shipped in v0.64.7. It can be closed.
Where the bug was. The markup parser is tinytools-agent, vendored two levels down (vendor/tinyagents/vendor/tinytools). Its tag grammar pairs <tool_call> markers positionally, and next_opener() never treats a closing marker as an opener, so a </tool_call> with no opener before it was never recognised as protocol furniture and stayed in the narrative. That is exactly the content in the transcript above: the four calls reached the harness over the structured channel (they are tool_use blocks, not text), and the model also typed one habitual </tool_call> per call into its text. Nothing to do with chunk boundaries; the stream scrubber holds back partial markers.
The fix is tinyhumansai/tinytools#27 (merged 2026-09-25, f06fe986): a closing tag-family marker that sits before the next opener, or has none after it, is swept as Decoded::Noise. It reached tinyagents main in 444b3a15 (2026-09-28) and this repo at 61e2c7b10a the same day. Every tinyagents pin on main since then contains it, including the current one (efea56c3 → tinytools 8e5008c3).
Verification, using the exact content[0].text from the transcript above as the model's text, with web_search / web_fetch / memory_recall offered:
| tinytools | parse_text |
StreamScrubber, fragments of 1 / 3 / 7 chars and whole |
|---|---|---|
aa44e48 (parent of the fix) |
all four </tool_call> kept in the text |
all four kept |
09adfff (current main) |
"I'll pull together … itinerary." |
same, trailing newlines only |
I also streamed the full tagged form (<tool_call>\n{…}\n</tool_call> × 4, one-line variant too) through the current scrubber at 1, 2, 3, 5, 7, 11 and 16-char fragmentations, including a closer split as </tool_ + call>: 4 calls released, no marker in the text, in every case.
Triage: valid — Current review confirms this is a concrete, in-scope engineering issue or request: “Assistant bubble shows raw </tool_call> closing tags as visible text (XML dialect leak)”. No complete resolution is evident in current main.
Triage: needs opinion — “Assistant bubble shows raw </tool_call> closing tags as visible text (XML dialect leak)” needs a maintainer decision on product scope/priority or fresh reproduction evidence before its status can be settled. Please advise whether to pursue, narrow, or close it.
Triage correction: valid — Current review confirms “Assistant bubble shows raw </tool_call> closing tags as visible text (XML dialect leak)” is an actionable, in-scope gap; no complete resolution is evident in current main.
As @shaurya703 found, this is fixed: tinytools#27 makes the text-dialect parser treat a stray </tool_call> as noise, and that fix is in the TinyTools version on current main (since v0.64.7). Thanks for verifying it. Closing.