Skip to content

[Bug] Webchat: previous assistant message disappears when next message streams (blockStreamingDefault conflict) #33641

@navendugoyal19

Description

@navendugoyal19

Bug Summary

When blockStreamingDefault is set to "on" (or left at default), the webchat Control UI exhibits a rendering bug where the previous assistant message disappears when the next assistant message begins streaming. The message content is still in the session history — refreshing the page brings it back — but the live UI loses it.

This is not related to heartbeats, long messages, or provider errors. It occurs on short messages too.

Steps to Reproduce

  1. Open webchat Control UI at http://127.0.0.1:18789/chat
  2. Send a message that generates a multi-paragraph response
  3. Agent responds successfully (message renders fully)
  4. Send a follow-up message
  5. When the new response begins streaming, the previous message disappears from the chat window
  6. Refreshing the page restores the missing message

Expected Behavior

Previous messages should remain visible in the chat window when new messages stream in.

Actual Behavior

The previous assistant message vanishes from the UI when the next response begins streaming. Only a page refresh restores it.

Root Cause Analysis

Block streaming sends progressive chunks (800-1200 chars) to the UI. The webchat Control UI already has its own native WebSocket-based live rendering. When block streaming runs on top of the native WebSocket rendering, two rendering systems conflict — the block streaming chunk delivery appears to cause the UI to re-render the message container, dropping previously committed messages.

Workaround

Set blockStreamingDefault: "off" in agents.defaults:

{
  "agents": {
    "defaults": {
      "blockStreamingDefault": "off"
    }
  }
}

Then restart the gateway: openclaw gateway restart

This disables block streaming globally. Webchat renders natively via WebSocket and the bug disappears. Channels that need block streaming (Telegram, Discord) should set their own streaming / blockStreaming per-channel config.

Suggested Fix

  • Webchat should ignore or bypass block streaming since it has native WebSocket rendering. Block streaming should only apply to channels that need it (Telegram, Discord, etc.).
  • Alternatively, blockStreamingDefault should default to "off" for webchat sessions, or the webchat UI should be hardened against chunk-delivery re-renders.

Related Issues

Environment

  • OpenClaw version: 2026.3.2
  • OS: macOS 26.3 (Darwin, arm64)
  • Browser: Chrome (macOS)
  • Gateway: Local loopback (127.0.0.1:18789), LaunchAgent
  • Model: anthropic/claude-opus-4-6
  • Channel: webchat (Control UI)
  • Other channels: Telegram configured (streaming: partial)
  • blockStreamingDefault before fix: not set (using default)
  • blockStreamingDefault after fix: "off" — resolved the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked 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