Skip to content

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

Closed as not planned

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

Activity

  1. added
    bug
    on Mar 4, 2026
  2. Dingding-leo commented on Mar 4, 2026

    @Dingding-leo

    Thanks for the detailed bug report! This is a clear regression in 2026.3.2.

    Root cause analysis is spot on:

    • Gateway relies on tags to trigger events
    • When thinking is enabled, models may output without tags
    • TUI receives nothing → no display

    Suggested fix approach:

    1. Graceful fallback (recommended):

      • Treat any text content as valid output, not just wrapped content
      • Send for any non-thinking text
    2. Thinking-aware parsing:

      • Detect thinking blocks (e.g., )
      • Only strip those, send remaining text as response
    3. Model-side fix:

      • Ensure model always outputs tags even with thinking enabled
      • But this depends on model provider

    Quick workaround for users:

    • Disable thinking in config to restore previous behavior
    • Or wait for fix in next release

    Would you like me to help investigate the gateway code to identify where to add the fallback?

  3. added
    regression
    on Mar 4, 2026
  4. byungsker commented on Mar 4, 2026

    @byungsker
  5. openclaw-barnacle commented on Apr 14, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  6. added
    stale
    on Apr 14, 2026
  7. openclaw-barnacle commented on Apr 21, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh repro steps.

  8. locked as resolved and limited conversation to collaborators on Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugregressionstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions