Skip to content

[Bug]: Feishu/Lark: streaming card sessions are created even when channels.feishu.streaming=false (final message may show only tail / truncated) #10078

Description

@lllyys

Issue Draft: Feishu/Lark streaming card still used when streaming=false

Title

Feishu/Lark: streaming card sessions are created even when channels.feishu.streaming=false (final message may show only tail / truncated)

Summary

In the Feishu/Lark channel, outbound replies sometimes use a streaming card (create card → update blocks → close) even though the config explicitly disables streaming:

  • channels.feishu.streaming = false
  • channels.feishu.accounts[<accountId>].streaming = false

When a streaming card is used, the final rendered message in Feishu can end up showing only the last part of the assistant’s output (appearing like earlier content is missing / overwritten).

Gateway logs confirm streaming is still being started (Created streaming card / Started streaming session / Updating streaming card...) during these cases.

Environment

  • Platform: macOS (Apple Silicon)
  • Channel: Feishu/Lark
  • OpenClaw version: TBD (openclaw --version)
  • Feishu domain: feishu

Current Config (relevant)

{
  "channels": {
    "feishu": {
      "streaming": false,
      "blockStreaming": true,
      "textChunkLimit": 8000,
      "chunkMode": "newline",
      "accounts": {
        "<accountId>": {
          "streaming": false,
          "blockStreaming": true
        }
      }
    }
  }
}

Steps to Reproduce

  1. Configure Feishu channel with streaming disabled (see config above).
  2. Chat with the bot and trigger an assistant reply (can be moderately long; may include markdown formatting).
  3. Observe in gateway logs that a streaming card is still created and updated, e.g.:
    • Created streaming card: <id>
    • Started streaming session: cardId=<id>, messageId=<id>
    • Updating streaming card with block text: <n> chars
  4. Observe in Feishu client that after completion, the final message may appear truncated (only the tail remains).

Expected Behavior

  • When channels.feishu.streaming=false (and/or account override streaming=false), no streaming card should be created.
  • Replies should be sent as normal text messages (or chunked text) without streaming updates.

Actual Behavior

  • Despite streaming=false, logs show streaming card sessions being created/updated.
  • In Feishu UI, the final message can end up showing only the last part of the assistant output.

Logs (redacted)

(From /tmp/openclaw/openclaw-2026-02-06.log)

2026-02-06T02:39:52.175Z [feishu-streaming] Created streaming card: 76035764525602
2026-02-06T02:39:52.775Z [feishu-streaming] Sent streaming card message: om_x100b5761094bc4c3a622fe7bc657f
2026-02-06T02:39:52.777Z [feishu-streaming] Started streaming session: cardId=76035764525602, messageId=om_x100b5761094bc4c3a622fe7bc657f
2026-02-06T02:39:52.778Z [feishu-message] Started streaming card for chat <redacted_chat_id>
2026-02-06T02:40:01.562Z [feishu-message] Updating streaming card with block text: 569 chars

2026-02-06T02:42:48.848Z [feishu-streaming] Created streaming card: 76035771739124259
2026-02-06T02:42:49.520Z [feishu-streaming] Sent streaming card message: om_x100b57611c5d70c2c545de6dba5b5
2026-02-06T02:42:49.521Z [feishu-streaming] Started streaming session: cardId=76035771739124259, messageId=om_x100b57611c5d70c2c545de6dba5b5
2026-02-06T02:42:49.523Z [feishu-message] Started streaming card for chat <redacted_chat_id>

2026-02-06T02:43:57.745Z [feishu-streaming] Created streaming card: 76035774721058687
2026-02-06T02:43:58.332Z [feishu-streaming] Sent streaming card message: om_x100b5761181380c3b24ae8f43383b
2026-02-06T02:43:58.334Z [feishu-streaming] Started streaming session: cardId=76035774721058687, messageId=om_x100b5761181380c3b24ae8f43383b
2026-02-06T02:43:58.335Z [feishu-message] Started streaming card for chat <redacted_chat_id>
2026-02-06T02:44:11.781Z [feishu-message] Updating streaming card with block text: 810 chars

Notes / Hypotheses

  • Might be related to how outbound reply code instantiates FeishuStreamingSession:
    • const streamingSession = (feishuCfg.streaming ?? true) && ... ? new FeishuStreamingSession(...) : null;
    • It should respect feishuCfg.streaming=false consistently (including per-account overrides).
  • There may also be interaction with autoRichText (Markdown → Feishu post) or other reply paths.

Suggested Fix

  • Ensure outbound logic never creates a FeishuStreamingSession when config disables streaming (global or account-level).
  • Add a regression test to verify streaming=false results in normal text sends only.
  • Optional: add a debug log that prints the resolved effective feishuCfg.streaming value per account/chat for easier diagnosis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions