Skip to content

[Bug] Feishu streaming card: abnormal typewriter effect and final content truncated to last character #88929

Closed

Description

@airbing11

Summary

When Feishu channel streaming is enabled with card render mode, replies show an abnormal typewriter effect (1-2 characters at a time) and the final card content is truncated — often leaving only the last character (e.g. "?"), with all other text lost.

Environment

  • OpenClaw version: 2026.5.28 (also reproduced on 2026.5.27)
  • Feishu plugin: @openclaw/feishu@2026.5.28
  • Model: deepseek/deepseek-v4-flash
  • Agent: main
  • Deployment: Tencent Cloud Lighthouse, Ubuntu, Feishu websocket
  • Feishu client: Both mobile & desktop — same issue

Configuration

"feishu": {
  "enabled": true,
  "appId": "cli_a968b21595b89bdf",
  "streaming": true,
  "renderMode": "card",
  "blockStreaming": false,
  "textChunkLimit": 8000
}

Steps to Reproduce

  1. Set channels.feishu.streaming: true
  2. Set renderMode: "card"
  3. Set blockStreaming: false
  4. Send a message via Feishu DM that triggers a longer reply (tool call + summary, or multi-paragraph text)
  5. Observe the streaming card during generation and the final card content

Expected Behavior

  • Smooth typewriter streaming effect on Feishu card
  • Final card shows complete reply content
  • Tool call output and final summary are both visible

Actual Behavior

  • Typewriter effect is abnormal (characters appear 1-2 at a time, not smooth streaming)
  • Final card content is truncated; only the last few characters remain (often just "?")
  • Intermediate streaming may show partial text, but final rendered card loses most content

Control Groups

Config Result
streaming: false + renderMode: card ✅ Complete content, no truncation
streaming: true + renderMode: raw ⚠️ Complete content, but no stable card typewriter UX
QQ Bot streaming: true ✅ Works normally (not a global streaming issue)

Workaround

"feishu": {
  "streaming": false,
  "renderMode": "card",
  "blockStreaming": false
}

Content is complete but without typewriter effect.

Additional Notes

  • Issue present since 2026.5.27, still unfixed in 2026.5.28
  • Changelog does not mention Feishu streaming fixes for this behavior
  • Possibly related to CardKit streaming card update/finalize race (partial → idle → final)
  • Gateway log snippet (dispatch to close: ~9s, close happens ~7s after dispatch complete):
feishu[default] Started streaming: cardId=7646292918105738171
feishu[default]: dispatch complete (queuedFinal=true, replies=1)
feishu[default] Closed streaming: cardId=7646292918105738171

Related Issues

Attachments

Screenshot of final truncated Feishu card (showing only "?") will be added as a comment after issue creation.

Activity

  1. clawsweeper commented on Jun 1, 2026

    @clawsweeper
    Contributor

    ClawSweeper status: review started.

    I am starting a fresh review of this issue: [Bug] Feishu streaming card: abnormal typewriter effect and final content truncated to last character This is item 1/1 in the current shard. Shard 0/1.

    This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

    Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

  2. airbing11 commented on Jun 1, 2026

    @airbing11
    ContributorAuthor

    Screenshot: Final truncated card on Feishu (streaming: true)

    The card only shows "?" after streaming completes:

    Image
  3. sgh6688 commented on Jun 4, 2026

    @sgh6688

    I hit the same symptom after upgrading, and traced one extra footgun in @openclaw/feishu@2026.5.26 that may explain why more users suddenly see this even when they did not intentionally turn streaming on.

    From the installed package:

    • streamingEnabled = account.config?.streaming !== false && renderMode !== "raw" in the bundled Feishu runtime (dist/monitor.account-CmXHWuwG.js, around line 1338)
    • onPartialReply immediately queues partial snapshot updates when streamingEnabled is true (same file, around line 1632)

    That means Feishu streaming is effectively opt-out, not opt-in: if channels.feishu.streaming is omitted, the plugin still enters streaming-card mode.

    On my upgraded instance, the user-visible symptom was exactly the same: Feishu replies started appearing 1-2 characters / small fragments at a time, and some replies did not end up showing the complete final message.

    Confirmed workaround on my side:

    "channels": {
      "feishu": {
        "streaming": false,
        "blockStreaming": false
      }
    }

    Then restart gateway / the host process. After that, Feishu went back to sending only the final complete reply.

    So besides the streaming-card overwrite bug itself, there is also a product/defaults problem here: the current default is surprising and user-visible. It would help to do one of these:

    1. Default Feishu to streaming: false until card streaming is reliable.
    2. If keeping the current default, add an explicit migration note / docs warning that Feishu streaming is enabled unless users set streaming: false.
  4. airbing11 commented on Jun 4, 2026

    @airbing11
    ContributorAuthor

    Cross-ref: same CardKit streaming overwrite behavior reported in #90185 (Bug 3) and #88867. Workaround remains \streaming: false.

  5. airbing11 commented on Jun 4, 2026

    @airbing11
    ContributorAuthor

    Thanks @sgh6688 for the additional trace — that opt-out default (\streaming !== false) matches what we saw after upgrading without explicitly enabling streaming. Same workaround here (\streaming: false\ +
    enderMode: card). Agree that defaulting to off (or documenting the migration) would help until CardKit streaming is reliable.

  6. WeipengMO commented on Jun 5, 2026

    @WeipengMO

    Additional feedback: Feishu message length is truncated when using streaming + tool calls

    Environment

    • OpenClaw: 2026.6.1
    • Feishu plugin: @openclaw/feishu@2026.6.1
    • Model: longcat/LongCat-2.0-Preview
    • Channel: feishu (websocket)

    Configuration

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

    Issue

    When the agent invokes a tool call, the tool result displayed in the Feishu card contains only a very small amount of text, and the tool output is truncated. The same request shows the full text in the OpenClaw WebUI.

    Specific behavior:

    • The tool output in the Feishu card only shows the last few characters.
    • The final response may also show only the last character, such as "?".
    • After disabling streaming, the content is displayed completely, but the typewriter effect is lost.
      Impact

    Tool outputs are almost unusable, which seriously affects the workflow. This appears to be the same underlying issue described in #88867.

  7. icophy commented on Jun 5, 2026

    @icophy

    I have been running OpenClaw on Feishu DM with a tool-heavy cron agent (20+ tool calls per session, daily cadence) for several months, so wanted to add a datapoint from the other end of the spectrum: 2026.3.11 with no explicit streaming config does not show this truncation, which aligns with @sgh6688's finding that the opt-out default was introduced in 2026.5.26.

    That said, the truncation-after-tool-call pattern @WeipengMO describes is not just a streaming default issue — it looks like a card content overwrite race. My mental model:

    1. Tool call completes → partial streaming update queue is still in-flight
    2. Final card content write races with the last partial update
    3. Last partial update "wins" and overwrites the full result with just its last chunk

    If this is right, setting blockStreaming: true should be a reliable temporary fix (block accumulates until tool call boundary, then flushes once), at the cost of losing the typewriter effect during tool execution. Worth trying as a diagnostic step before the underlying flush-on-tool-result logic is fixed.

    A few questions for the maintainers:

    • Is there a streaming.flushOnToolResult or similar config to force a card commit after each tool call completes? That would let tool-heavy agents keep streaming on prose while avoiding the overwrite race on tool output.
    • Is the blockStreaming boundary respected per-tool-call, or only at the top-level message boundary?

    Happy to dig into the bundled runtime further if a specific line range would help narrow the race window.


    Context: Running OpenClaw as a persistent cron agent on Feishu DM — the streaming reliability in tool-heavy sessions is a real concern for this use case.

  8. WeipengMO commented on Jun 5, 2026

    @WeipengMO

    blockStreaming: true causes completely empty reply on Feishu

    Summary

    Setting blockStreaming: true in feishu channel config causes a different (worse) issue than the original streaming truncation.

    Config

    "feishu": {
      "streaming": true,
      "renderMode": "card",
      "blockStreaming": true
    }

    Actual result

    Feishu returns:

    ⚠️ This reply completed without visible content. The turn may have been interrupted; please retry or ask me to recover from recent context.

    The reply is completely empty — not even partial content is visible. This is different from the original truncation issue where at least the last few characters were shown.

    Environment

    • OpenClaw: 2026.6.1
    • Feishu plugin: @openclaw/feishu@2026.6.1
    • Model: longcat/LongCat-2.0-Preview
    • Deployment: cloud Ubuntu server, feishu websocket connection

    Comparison of all config combinations

    streaming blockStreaming Result
    true false Content truncated (last few chars only) — original issue
    true true Completely empty reply — this issue
    false — Content complete and correct

    Conclusion

    blockStreaming is not a valid workaround for the streaming truncation bug. The root cause appears to be in the CardKit streaming finalize logic, where the final content fails to be properly written to the card.

  9. airbing11 commented on Jun 5, 2026

    @airbing11
    ContributorAuthor

    Cross-plugin repro request: has anyone reproduced this on the official Feishu plugin @larksuite/openclaw-lark (not the bundled @openclaw/feishu)?

    On our side, the bundled plugin on 2026.5.27/2026.5.28 shows the same symptom as reported here (streaming: true + renderMode: card → typewriter chunks + final card truncated to last char). Workaround remains streaming: false.

    It would help triage to know whether:

    1. @larksuite/openclaw-lark with streaming: true avoids the "only last character" finalize bug, or
    2. It shows a different but related streaming-card content-loss pattern (especially with tool calls).

    If you have tested the official plugin, please share plugin version + config + whether the issue appears on plain long replies vs tool-heavy turns.

  10. icophy commented on Jun 5, 2026

    @icophy

    @WeipengMO Thanks for actually running the full matrix — that settles it. My blockStreaming: true suggestion was wrong as a workaround; an empty reply is strictly worse than a truncated one, and your table makes the picture clean: only streaming: false is safe. Good correction.

    The fact that blockStreaming: true produces empty rather than partial content is itself diagnostic. If the truncation case shows "last char only" but the blocked case shows nothing at all, the two paths are finalizing the card differently — the streaming path writes incremental chunks and then a (broken) final overwrite, while the blocked path seems to skip the content write entirely and only emit the placeholder. So the bug likely isn't one race; it's that the final card-content write is unreliable in both finalize paths. That lines up with your CardKit-finalize hypothesis.

    @airbing11 A version datapoint for your cross-plugin triage: I'm running 2026.3.11 with the bundled @openclaw/feishu, renderMode: card (default), and no explicit streaming key — and I do not see truncation, even on tool-heavy turns. Combined with the reports here on 2026.5.27/5.28/6.1, that points at a regression introduced when the streaming default flipped to opt-out somewhere after 2026.3.11. I haven't tested @larksuite/openclaw-lark, so I can't speak to whether the official plugin shares the finalize path — but if someone can confirm the official plugin on a pre-5.26 build, that would bracket the regression window from both sides.

    One concrete ask that might speed up root-cause: does the final card payload in the truncated case actually contain full text on the wire (i.e. is it a render bug), or is the truncation already present in the outgoing update (a content-assembly bug)? A single captured CardKit request body would disambiguate render-vs-assembly.


    Context: running a Feishu-channel agent on 2026.3.11 with a tiered-memory stack; this thread matches our interest in tool-call/streaming finalize edge cases.

  11. lukemyself-hub commented on Jun 6, 2026

    @lukemyself-hub

    Still reproducing on 2026.6.1 — this regression has not been fixed in 5.28 → 5.x → 6.1.

    Environment

    • OpenClaw: 2026.6.1 (2e08f0f)
    • Feishu plugin: @openclaw/feishu@2026.6.1
    • OS: macOS
    • Model: deepseek/deepseek-v4-pro
    • Channel: Feishu websocket, DM (1:1)
    • Config: defaults (streaming: true, renderMode: "auto", blockStreaming unset)
    • Feishu clients: reproduced on both desktop and mobile — identical truncation on both

    Symptom

    Every single reply gets truncated to its trailing 1–3 characters in the rendered bubble:

    User input Agent's full text (from session jsonl) Rendered in Feishu
    /feishu Multi-paragraph markdown list ending in …我就能直接帮你~ ~
    Hi 嗨!我回来了… + trailing inline `NO_REPLY` NO_REPLY
    我看不到你发的信息… 抱歉…现在能看到这条吗? ?

    The pattern is consistent — only the trailing chunk of the message survives, suggesting the streaming-card snapshot update is being treated as a delta (or the final overwrite carries only the tail).

    Workaround

    Setting streaming: false + blockStreaming: false bypasses the streaming-card path entirely and renders content correctly via plain post messages. So the bug is isolated to the streaming-card snapshot/finalize path, not the underlying message API.

    Possibly related

    Same symptom as #88867. Architectural root cause likely overlaps with #55027 (block chunks dropped at monitor.account.js:1791 when streamingEnabled is false).

  12. sliverp commented on Jun 8, 2026

    @sliverp
    Member

    fix in #90181

  13. airbing11 commented on Jun 10, 2026

    @airbing11
    ContributorAuthor

    Reopening: still reproducing on v2026.6.5 after #90181

    This issue was closed as fixed via #90181, but the bug is still reproducible on the shipped release that includes that fix.

    Environment (verified 2026-06-10)

    • OpenClaw: 2026.6.5 (5181e4f)
    • Install: nvm global only (/root/.nvm/versions/node/v22.22.2/lib/node_modules/openclaw/)
    • Gateway: systemd, ExecStart points to nvm openclaw.mjs gateway
    • Deployment: Tencent Cloud Lighthouse, Ubuntu, Feishu websocket
    • Model: deepseek/deepseek-v4-flash

    Verification that #90181 is present in dist

    grep -rn "resolveStreamingCardAppendContent" \
      /root/.nvm/versions/node/v22.22.2/lib/node_modules/openclaw/dist/
    # → no matches (function removed as expected)

    So this is not "still on 6.1 without the patch". The suffix-only helper is gone, but user-visible behavior is unchanged.

    Config

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

    (Gateway restarted after config change.)

    Actual behavior on 2026.6.5

    1. During streaming: typewriter effect is abnormal — text appears 1–2 characters at a time (very fragmented).
    2. After streaming completes: final card still truncated — often only the last character remains (e.g. ? / ?).

    Control

    Config Result
    streaming: false + renderMode: card Complete content

    Conclusion

    #90181 fixed the CardKit suffix-only payload path, but does not fully resolve #88929 in production:

    • Final card truncation (? only) still happens on 2026.6.5.
    • Abnormal fragmented typewriter UX also persists.

    Likely remaining causes (as discussed in thread): reply-dispatcher snapshot/merge logic, onPartialReply → onIdle → final race (#68491), and/or tool-call finalize paths.

    Requesting this stay open until a release verified end-to-end on Feishu (plain long reply + tool-heavy turn) with streaming: true + renderMode: card.

    Thanks!

  14. airbing11 commented on Jun 10, 2026

    @airbing11
    ContributorAuthor

    @sliverp Could you reopen this issue? Still reproducing on 2026.6.5 (5181e4f) with #90181 present in dist (
    esolveStreamingCardAppendContent gone) — see my comment above for full repro details. Final card still shows only the last character (e.g. ?). Workaround remains streaming: false. Thanks!

  15. airbing11 commented on Jun 10, 2026

    @airbing11
    ContributorAuthor

    Additional datapoint: conversation list preview vs card body mismatch

    Still reproducing on 2026.6.5 (5181e4f) with streaming: true, renderMode: card, blockStreaming: false (and #90181 present in dist — resolveStreamingCardAppendContent not found).

    Observed behavior

    1. In the chat thread (streaming card body): abnormal typewriter — text appears 1–2 characters at a time; after streaming completes, the card shows only the last character or punctuation (e.g. ? / ?).
    2. In the left conversation list (preview under the contact): the same reply appears to show the full (or much more complete) message text.

    Why this matters

    This looks like the same split reported in #88867 — full text may be available for the summary / list preview path while the CardKit content element body remains truncated.

    In streaming-card.ts, close() updates both:

    • content element via updateCardContent / replaceCardContent (what users see in the card bubble)
    • summary + streaming_mode: false via settings PATCH (often what drives conversation-list preview)

    So the bug may not be “model didn’t generate full text” but “content element finalize/replace fails or stays on last partial chunk while summary gets the full text at closeout.”

    #90181 fixed suffix-only payloads during streaming updates, but this datapoint suggests close-time content element vs summary divergence may still need a separate fix (possibly related to onIdle → close before deliver(final), or failed replaceCardContent).

    Workaround remains streaming: false + renderMode: card.

    Happy to provide gateway logs if helpful — did not attach screenshots for this comment.

  16. locked as resolved and limited conversation to collaborators on Jun 13, 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

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions