Skip to content

Feishu streaming card produces duplicate/truncated messages with long replies #65993

@Dany-Deng-cn

Description

@Dany-Deng-cn

Bug Description

When using Feishu channel with streaming: true and renderMode: "card" (default configuration), long replies produce duplicate or truncated message blocks.

Reproduction steps:

  1. Configure Feishu channel with streaming enabled
  2. Send a request that generates a long reply (> ~1000 chars)
  3. Observe the output in Feishu app

Expected behavior:
A single streaming card message with smooth incremental updates, followed by a final complete message.

Actual behavior:

  • Case A (light): One streaming card + one additional non-streaming block with partial content
  • Case B (severe): Multiple message blocks, with content from early blocks lost or duplicated

Technical Analysis

Root cause (suspected): File dist/monitor-DS-8NLOO.js, line 693:

this.updateThrottleMs = 100;

The queueStreamingUpdate() function applies 100ms throttling per update. When blocks arrive faster than 100ms intervals, updates are skipped/delayed and content is lost. When final arrives and triggers closeStreaming(), accumulated but unsent text is truncated, then sendChunkedTextReply sends the full content via fallback path, causing duplicates.

Why Telegram/Discord don't have this issue: They use editMessageText on a draft message (no throttle). Feishu uses throttled card updates via FeishuStreamingSession.

Workaround

Setting agents.defaults.blockStreamingDefault: "off" in config partially mitigates the issue but does not fully resolve it.

Environment

  • OpenClaw version: 2026.4.8
  • Feishu plugin version: 2026.4.8
  • Node.js version: v22.x
  • Deployment: Linux VM

Metadata

Metadata

Assignees

Labels

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