fix: suppress reasoning payloads from generic channel dispatch path (WhatsApp/web leak)#24991
Merged
steipete merged 7 commits intoopenclaw:mainfrom Feb 24, 2026
Merged
Conversation
3 tasks
steipete
added a commit
that referenced
this pull request
Feb 24, 2026
a65e7a9 to
1b22a99
Compare
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
52767c5 to
969b68a
Compare
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
steipete
added a commit
to stakeswky/openclaw
that referenced
this pull request
Feb 24, 2026
When reasoningLevel is 'on', reasoning content was being sent as a visible message to WhatsApp and other non-Telegram channels via two paths: 1. Block reply: emitted via onBlockReply in handleMessageEnd 2. Final payloads: added to replyItems in buildEmbeddedRunPayloads Telegram has its own dispatch path (bot-message-dispatch.ts) that splits reasoning into a dedicated lane and handles suppression. The generic dispatch-from-config.ts path used by WhatsApp, web, etc. had no such filtering. Fix: - Add isReasoning?: boolean flag to ReplyPayload - Tag reasoning payloads at both emission points - Filter isReasoning payloads in dispatch-from-config.ts for both block reply and final reply paths Telegram is unaffected: it uses its own deliver callback that detects reasoning via the 'Reasoning:\n' prefix and routes to a separate lane. Fixes openclaw#24954
54c342f to
2aa85fc
Compare
Prithvirajbilla
pushed a commit
to Prithvirajbilla/openclaw
that referenced
this pull request
Feb 24, 2026
Prithvirajbilla
pushed a commit
to Prithvirajbilla/openclaw
that referenced
this pull request
Feb 24, 2026
Prithvirajbilla
pushed a commit
to Prithvirajbilla/openclaw
that referenced
this pull request
Feb 24, 2026
Prithvirajbilla
pushed a commit
to Prithvirajbilla/openclaw
that referenced
this pull request
Feb 24, 2026
Prithvirajbilla
pushed a commit
to Prithvirajbilla/openclaw
that referenced
this pull request
Feb 24, 2026
3 tasks
This was referenced Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
abdelkadermeflahi6-web
referenced
this pull request
Feb 24, 2026
abdelkadermeflahi6-web
referenced
this pull request
Feb 24, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
2 tasks
This was referenced Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
reasoningLevelis"on"(either explicitly via/reasoning onor auto-enabled), reasoning/thinking content was being sent as a visible message to WhatsApp and other non-Telegram channels.Two paths caused the leak:
handleMessageEndemits reasoning viaonBlockReplywhenincludeReasoningis truebuildEmbeddedRunPayloadsadds reasoning text toreplyItemswhenreasoningLevel === "on"Telegram has its own dispatch path (
bot-message-dispatch.ts) that splits reasoning into a dedicated lane and handles suppression viasplitTelegramReasoningText. The genericdispatch-from-config.tspath used by WhatsApp, web, and other channels had no such filtering.Fix
isReasoning?: booleanflag toReplyPayloadhandlers.messages.tsandpayloads.ts)isReasoningpayloads indispatch-from-config.tsfor both block reply and final reply pathsTelegram is unaffected: it uses its own
delivercallback that detects reasoning via theReasoning:\nprefix and routes to a separate lane.Tests
dispatch-from-config.test.tscovering both suppression pathsFixes #24954
Greptile Summary
Fixed reasoning/thinking content leak to WhatsApp, web, and other non-Telegram channels by adding an
isReasoningflag toReplyPayloadand filtering these payloads in the generic dispatch path (dispatch-from-config.ts).The fix addresses two leak paths:
handleMessageEndwhenincludeReasoningis truebuildEmbeddedRunPayloadswhenreasoningLevel === "on"Telegram is unaffected since it uses a dedicated dispatch path (
bot-message-dispatch.ts) withsplitTelegramReasoningTextthat routes reasoning to a separate lane. This change only affects the generic dispatch path used by WhatsApp, web, and extension channels (msteams, feishu, matrix, mattermost, bluebubbles).Confidence Score: 5/5
isReasoningflag is properly tagged where reasoning payloads are created, and both the block reply and final reply paths in the generic dispatcher correctly filter these payloads. Telegram's existing reasoning handling is preserved through its separate dispatch path. The two new tests cover both suppression scenarios comprehensively.Last reviewed commit: a65e7a9