Skip to content

Webchat: ghost bubble artifact when model replies with NO_REPLY during streaming #15060

Closed as not planned

Description

@fredfokan

Description

When the AI model responds with NO_REPLY (silent reply), the webchat UI briefly displays a chat bubble that then becomes empty/near-empty — appearing as a small visual artifact (a "dot" or "stain") in the conversation.

Steps to Reproduce

  1. Open the webchat control UI
  2. Send a message that the model would reasonably not reply to (e.g., just "top" or a single word with no clear question)
  3. The model responds with NO_REPLY
  4. A small empty bubble/artifact appears in the chat

Expected Behavior

No bubble should be rendered when the model's final reply is NO_REPLY. The message should be completely suppressed from the UI.

Actual Behavior

A small visual artifact (empty or near-empty bubble) remains visible in the chat.

Root Cause Analysis

During streaming, the webchat client receives tokens via WebSocket as they are generated. When the model starts outputting NO_REPLY, the client creates a message bubble in the DOM. The backend then detects the silent reply token and suppresses delivery — but the already-created bubble persists in the UI with empty/minimal content.

The bubble rendering logic in the Lit-based webchat does handle empty messages:

return !f && !l && !u ? v : r`...`  // returns 'nothing' when no text, no media, no attachments

However, this check appears to not trigger correctly for messages that were created during streaming and then had their content stripped.

Suggested Fix

When a streaming message completes and the final content is empty (or matches NO_REPLY/HEARTBEAT_OK), the webchat client should remove the bubble from the DOM entirely.

Environment

  • OpenClaw version: 2026.2.9
  • Channel: webchat (control-ui)
  • Browser: Chrome (latest)

Activity

  1. added a commit that references this issue on Feb 12, 2026
    c6d4c77
  2. added
    bug
    on Feb 13, 2026
  3. added a commit that references this issue on Feb 13, 2026
    d950f43
  4. openclaw-barnacle commented on Feb 20, 2026

    @openclaw-barnacle

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

  5. added
    stale
    and removed
    stale
    on Feb 20, 2026
  6. sstklen commented on Feb 24, 2026

    @sstklen

    Hey! I ran into a similar pattern in our bug knowledge base and thought this might help.

    What's happening: During streaming, the webchat client creates a DOM bubble as soon as the first token arrives via WebSocket. When the backend detects NO_REPLY and suppresses further delivery, the already-created bubble persists in the UI. The Lit-based webchat's empty-message check (!f && !l && !u) only evaluates at initial render time, not when streaming content is retroactively stripped — so the bubble element remains in the DOM with empty/minimal content, appearing as a visual artifact.

    What worked for us:

    The proposed fix mentions a CSS fallback (step 5) which is not included in the provided code patch. While the programmatic removal is more robust, adding the CSS fallback (min-height: 0; padding: 0; margin: 0; display: none for empty bubbles) would provide an additional layer of defense-in-depth, as initially suggested.

    // Backend: Send retract event when NO_REPLY detected
    if (assembledText.trim() === 'NO_REPLY' || assembledText.trim() === '') {
      ws.send(JSON.stringify({ type: 'message_retract', messageId }));
      return; // stop streaming
    }
    
    // Client: Handle retract event
    ws.addEventListener('message', (event) => {
      const data = JSON.parse(event.data);
      if (data.type === 'message_retract') {
        this.messages = this.messages.filter(m => m.id !== data.messageId);
        this.requestUpdate(); // trigger Lit re-render
        return;
      }
    });
    
    // Client: Also check on stream-end as fallback
    onStreamComplete(messageId) {
      const msg = this.messages.find(m => m.id === messageId);
      if (msg && (!msg.text || msg.text.trim() === '' || msg.text.trim() === 'NO_REPLY')) {
        this.messages = this.messages.filter(m => m.id !== messageId);
        this.requestUpdate();
      }
    }

    Hope this helps! Let me know if it doesn't match your case — happy to dig deeper. 🦞

    Disclosure: This analysis is from Confucius Debug, an AI-powered community KB for agent bugs. Please verify before applying.


    🦞 Confucius Debug — community knowledge base for AI agent bugs. Free to search via MCP.

  7. openclaw-barnacle commented on Mar 12, 2026

    @openclaw-barnacle

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

  8. added
    stale
    on Mar 12, 2026
  9. openclaw-barnacle commented on Mar 18, 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.

  10. locked as resolved and limited conversation to collaborators on Mar 21, 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

    bugstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions