Skip to content

[BUG] NO_REPLY fragment leaks to webchat UI #39335

Closed
BingqingLyu/openclaw
#103

Description

@emdash-dot

Bug

When the agent responds with NO_REPLY (e.g., after a memory flush prompt), a partial fragment ("NO") sometimes appears in the webchat UI on the next user message's response.

Reproduction Steps

  1. System sends a memory flush prompt to agent
  2. Agent appends to memory, responds with NO_REPLY
  3. User sends next message immediately after
  4. Agent responds to user's message
  5. Bug: UI displays "NO" fragment at top of agent's response (see screenshot effect)

Expected Behavior

NO_REPLY should be fully suppressed and never visible to the user in any form.

Observed Behavior

Partial "NO" appears as a separate text block above the actual response, confusing the user (appeared agent was refusing the request).

Environment

  • Channel: webchat (openclaw-control-ui)
  • Likely timing overlap or compaction artifact

Impact

User confusion — looks like agent is saying "no" to their request when it's actually a leaked system protocol.


Reported via EmDash agent on behalf of user

Activity

  1. changed the title [-]NO_REPLY fragment leaks to webchat UI[/-] [+][BUG] NO_REPLY fragment leaks to webchat UI[/+] on Mar 8, 2026
  2. rnrnstar2 commented on Mar 8, 2026

    @rnrnstar2

    Priority: P1 - NO_REPLY機能の回帰。ユーザーにNO_REPLYタグがそのまま表示され、UX品質を著しく損なう。

  3. liangruochong44-ui commented on Mar 8, 2026

    @liangruochong44-ui

    分析建议

    这个问题可能是以下原因导致:

    1. 消息拼接问题:前端在处理流式响应时,可能没有正确过滤 标记
    2. 时序问题:内存 flush 后立即发送下一条消息时,前一条消息的响应可能残留

    建议排查方向:

    • 检查 中消息渲染逻辑,确认是否在显示前过滤了协议级响应
    • 检查 webchat 频道的 message handler,确认 NO_REPLY 是否被正确转换为空响应

    可能修复位置:

      • 消息过滤逻辑
      • 消息处理
  4. liangruochong44-ui commented on Mar 8, 2026

    @liangruochong44-ui

    分析建议

    这个问题可能是以下原因导致:

    1. 消息拼接问题:前端在处理流式响应时,可能没有正确过滤 NO_REPLY 标记
    2. 时序问题:内存 flush 后立即发送下一条消息时,前一条消息的响应可能残留

    建议排查方向:

    • 检查 openclaw-control-ui 中消息渲染逻辑,确认是否在显示前过滤了协议级响应
    • 检查 webchat 频道的 message handler,确认 NO_REPLY 是否被正确转换为空响应

    可能修复位置:

    • packages/webchat/src/components/MessageList.tsx - 消息过滤逻辑
    • packages/gateway/src/channels/webchat/handler.ts - 消息处理
  5. rnrnstar2 commented on Mar 8, 2026

    @rnrnstar2

    🔥 P1 Priority - NO_REPLY fragment leaks to webchat UI, showing "NO" fragment to users. User-visible bug affecting UI reliability. Requires response stream handling fix.

  6. openclaw-barnacle commented on Apr 23, 2026

    @openclaw-barnacle

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

  7. added
    stale
    on Apr 23, 2026
  8. steipete commented on Apr 24, 2026

    @steipete
    Contributor

    Closing this as implemented after Codex review.

    Current main already suppresses streamed NO_REPLY lead fragments in gateway chat events and filters silent assistant rows from chat.history, with matching regression tests and changelog entries showing the fix shipped in v2026.3.2.

    What I checked:

    • Gateway suppresses NO_REPLY lead fragments before broadcast: src/gateway/server-chat.ts:704 clears exact suppressed control replies, src/gateway/server-chat.ts:708 buffers lead fragments instead of broadcasting them, and src/gateway/server-chat.ts:712 strips a glued leading NO_REPLY token before emitting chat text. (src/gateway/server-chat.ts:704)
    • Regression test covers the reported NO leak: src/gateway/server-chat.agent-events.test.ts:255 explicitly asserts that streaming NO, NO_, NO_RE, NO_REPLY does not leak into the final chat message. (src/gateway/server-chat.agent-events.test.ts:255)
    • Control UI filters silent assistant history rows: ui/src/ui/controllers/chat.ts:43 identifies assistant silent replies, ui/src/ui/controllers/chat.ts:74 hides them from history results, and ui/src/ui/controllers/chat.ts:451 ignores silent streaming/final payloads. (ui/src/ui/controllers/chat.ts:43)
    • Control UI tests lock in history and streaming filtering: ui/src/ui/controllers/chat.test.ts:95 ignores NO_REPLY delta updates, ui/src/ui/controllers/chat.test.ts:136 drops NO_REPLY finals from another run, and ui/src/ui/controllers/chat.test.ts:525 plus ui/src/ui/controllers/chat.test.ts:727 verify assistant NO_REPLY rows are filtered from chat.history while user text is preserved. (ui/src/ui/controllers/chat.test.ts:95)
    • Changelog records the fix as shipped: Under release 2026.3.2, CHANGELOG.md:3347 says Gateway/WebChat suppresses NO_REPLY lead-fragment deltas to prevent partial NO leaks, and CHANGELOG.md:3369 says WebChat filters NO_REPLY-only transcript entries from chat.history and adds client-side guards. (CHANGELOG.md:3254)
    • Latest release still contains the implemented behavior: The latest release commit 00bd2cf7a376f1fba26291c6c4766f1f15cbdfa5 contains the same gateway suppression and Control UI filtering code and the same regression test. (00bd2cf7a376)

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review notes: reviewed against cb2c36b04975; fix evidence: release v2026.3.2.

  9. locked as resolved and limited conversation to collaborators on Apr 27, 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

    stale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions