Skip to content

Feishu streaming card output produces cumulative token duplication #38943

@vulturekun

Description

@vulturekun

Bug Description

When channels.feishu.streaming: true with renderMode: "card", Feishu bot replies exhibit cumulative token duplication — each new streaming chunk re-sends all previous content, resulting in a staircase-like repetition pattern in the final message.

Environment

  • OpenClaw version: 2026.3.2
  • Channel: Feishu
  • Model backend: Claude Opus 4.6 via CLIProxyAPI (OpenAI-compatible proxy)
  • OS: Debian Linux (systemd user service)

Configuration

{
  "channels": {
    "feishu": {
      "streaming": true,
      "renderMode": "card",
      "textChunkLimit": 2000,
      "blockStreaming": false
    }
  }
}

Reproduction

  1. Enable streaming: true + renderMode: "card" in Feishu channel config
  2. Send a message to any agent via Feishu DM or group chat
  3. Observe the reply — each token appends to the card but also re-renders all previous tokens

Actual Behavior

The card output shows cumulative duplication like this:

找到了
找到了「清明
找到了「清明归骨」
找到了「清明归骨」项目,当
找到了「清明归骨」项目,当前阶段是
找到了「清明归骨」项目,当前阶段是 Phase
找到了「清明归骨」项目,当前阶段是 Phase 5 精修。
找到了「清明归骨」项目,当前阶段是 Phase 5 精修。让我查看
...

Each streaming update appends the new token and repeats all prior content, so the final message contains massive duplication. This affects all agents with streaming enabled.

Expected Behavior

Each streaming card update should replace the card content with the latest cumulative text, not append the cumulative text to the existing card content. The final rendered message should contain no duplication.

Workaround

Setting streaming: false at the channel level resolves the issue — agents wait for the full response before sending a single complete message. Per-bot override ("streaming": false on individual bot entries) also works.

Additional Context

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