Skip to content

[Bug]: TUI Not Displaying Responses When Model Output Lacks <final> Tag #34537

@vincent507cpu

Description

@vincent507cpu

Bug type

Regression (worked before, now fails)

Summary

Environment

  • OpenClaw Version: 2026.3.2
  • Model: minimax-cn/MiniMax-M2.5
  • Deployment: Docker (openclaw-docker-cn-im)
  • Client: openclaw-tui

Description

When using openclaw tui to interact with the agent, responses generated by the model are sometimes not displayed in the TUI interface, even though the model successfully generates a reply.

Steps to Reproduce

  1. Start OpenClaw container: docker run -d ... openclaw-gateway
  2. Connect via TUI: openclaw tui
  3. Send a message that triggers thinking (e.g., a complex prompt)
  4. Observe that the response is not displayed in TUI

Root Cause

The Gateway relies on the presence of tags in the model's output to determine whether to send stream=assistant events to the TUI client.

When the model outputs text without the tag (which happens when thinking is enabled and the model generates thinking content), the Gateway skips sending the stream=assistant event entirely.

Evidence

From session log (8a5909b9-8993-486a-b92c-3b659775e1af.jsonl):

Working case (first message "你好"):
{"type":"text","text":"你好!有什么我可以帮你的吗?"}

  • Gateway sent: seq=9 stream=assistant text=你好!有什么我可以帮你的吗?
  • TUI: ✅ Displayed correctly

Broken case (second message with roleplay prompt):
{"type":"text","text":"记住了~不过我要诚实告诉你:我是个AI助手..."}

  • Gateway sent: NO stream=assistant event
  • TUI: ❌ Not displayed

Suggested Fix

The Gateway should handle responses without tags by:

  1. Treating all text content (regardless of tag) as valid assistant output
  2. Or ensuring the model always outputs proper tags

Steps to reproduce

just talk to an agent, then response will not show.

Expected behavior

Image

Actual behavior

Image

OpenClaw version

2026.3.2

Operating system

macOS 26.3

Install method

docker

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now failsstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions