openclaw - 💡(How to fix) Fix [Bug]: Feishu sends duplicate replies when DeepSeek V4 reasoning_content is present

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When using DeepSeek V4 Flash/Pro with thinking=high on the Feishu channel, the model"s reasoning_content leaks into delivery as a separate message, causing visible duplicate replies in the chat.

Root Cause

The problem is in the payload assembly pipeline:

  • DeepSeek returns reasoning_content as a separate field alongside content in the API response (per their docs)
  • OpenClaw"s openai-completions provider correctly captures reasoning_content into type: "thinking" content blocks
  • However, in buildEmbeddedRunPayloads() (src/agents/pi-embedded-runner/run/payloads.ts), the .map() return only propagates isError, not isReasoning
  • Since isReasoning never reaches downstream filters, Feishu dispatcher treats type: "thinking" blocks as normal text payloads and sends them as separate messages

Fix Action

Fix / Workaround

  1. Log shows dispatch complete (queuedFinal=true, replies=2) or replies=3 where normal is replies=1
  2. User sees the model"s chain-of-thought reasoning text as a separate message followed by the actual answer
  3. Makes it look like the bot sent duplicate replies
  • DeepSeek returns reasoning_content as a separate field alongside content in the API response (per their docs)
  • OpenClaw"s openai-completions provider correctly captures reasoning_content into type: "thinking" content blocks
  • However, in buildEmbeddedRunPayloads() (src/agents/pi-embedded-runner/run/payloads.ts), the .map() return only propagates isError, not isReasoning
  • Since isReasoning never reaches downstream filters, Feishu dispatcher treats type: "thinking" blocks as normal text payloads and sends them as separate messages

The isReasoning flag needs to be propagated through the payload pipe so downstream channel dispatchers can filter or merge thinking blocks instead of sending them as separate messages.

RAW_BUFFERClick to expand / collapse

Summary

When using DeepSeek V4 Flash/Pro with thinking=high on the Feishu channel, the model"s reasoning_content leaks into delivery as a separate message, causing visible duplicate replies in the chat.

Environment

  • OpenClaw: v2026.5.2
  • Channel: Feishu (websocket)
  • Model: deepseek/deepseek-v4-flash with thinkingDefault: "high"
  • Config: blockStreamingDefault: "off"

Symptoms

  1. Log shows dispatch complete (queuedFinal=true, replies=2) or replies=3 where normal is replies=1
  2. User sees the model"s chain-of-thought reasoning text as a separate message followed by the actual answer
  3. Makes it look like the bot sent duplicate replies

Root Cause

The problem is in the payload assembly pipeline:

  • DeepSeek returns reasoning_content as a separate field alongside content in the API response (per their docs)
  • OpenClaw"s openai-completions provider correctly captures reasoning_content into type: "thinking" content blocks
  • However, in buildEmbeddedRunPayloads() (src/agents/pi-embedded-runner/run/payloads.ts), the .map() return only propagates isError, not isReasoning
  • Since isReasoning never reaches downstream filters, Feishu dispatcher treats type: "thinking" blocks as normal text payloads and sends them as separate messages

Related Issues

  • #73186 (open): Thinking/reasoning content leaks into cron announce delivery for Matrix/Feishu
  • #67791 (closed): Feishu blockStreamingCoalesce regression (different root cause)
  • #80033 (merged): add supportedReasoningEfforts to DeepSeek V4 model entries

Suggested Fix

The isReasoning flag needs to be propagated through the payload pipe so downstream channel dispatchers can filter or merge thinking blocks instead of sending them as separate messages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Feishu sends duplicate replies when DeepSeek V4 reasoning_content is present