fix(discord): deliver reasoning payloads as Thinking messages for /reasoning on#94976
fix(discord): deliver reasoning payloads as Thinking messages for /reasoning on#94976sunlit-deng wants to merge 1 commit into
Conversation
…asoning on Remove the blanket isReasoning suppression from beforeDiscordPayloadDelivery and deliverDiscordPayload. The agent already gates reasoning emission via includeReasoning (tied to /reasoning on). When reasoning IS emitted, Discord should deliver it — not silently drop it. Also remove the unused "reasoning payload" member from DiscordReplySkipReason. Fixes openclaw#94936
|
Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 12:27 PM ET / 16:27 UTC. Summary PR surface: Source -27, Tests -1. Total -28 across 3 files. Reproducibility: yes. source-level: current main suppresses Discord Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Format opted-in Discord reasoning payloads as visible Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main suppresses Discord Is this the best way to solve the issue? No. Removing the local skips is necessary but not sufficient; the best fix must convert opted-in reasoning to a sendable Discord Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b4651f378100. Label changesLabel justifications:
Evidence reviewedPR surface: Source -27, Tests -1. Total -28 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Thanks for sending this fix. The same Discord Canonical commit: That landed patch keeps the useful direction from this cluster, but also fixes the durable outbound boundary: Discord formats reasoning with the shared Closing this PR as superseded by the landed canonical fix. Appreciate the contribution. |
Summary
Fixes #94936
Discord now delivers reasoning payloads as separate Thinking messages when
/reasoning onis active.The agent already correctly gates reasoning emission via
includeReasoning(tied to/reasoning on). The Discord delivery layer was unconditionally dropping allisReasoningpayloads regardless of the user's/reasoningpreference, causing thinking content to be produced and archived but never rendered on the channel.What changed
Removed the blanket
isReasoningsuppression frombeforeDiscordPayloadDeliveryanddeliverDiscordPayloadinextensions/discord/src/monitor/message-handler.process.ts. The agent already formats reasoning text viaformatReasoningMessageasThinking\n\n_..._(italic-wrapped lines), so no additional formatting is needed.Deleted 28 lines, added 1 line. Cleanup: removed unused
"reasoning payload"fromDiscordReplySkipReasontype.Why this is correct
includeReasoningcontrolled by/reasoning on). The channel should not second-guess the agent./reasoning offsessions never emitisReasoningpayloads, so they are unaffected.Tests and validation
pnpm build && pnpm check && pnpm testRisk checklist
Did user-visible behavior change? (
Yes/No)/reasoning onnow see Thinking messages that were previously dropped.Did config, environment, or migration behavior change? (
Yes/No)Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)What is the highest-risk area?
How is that risk mitigated?
formatReasoningMessageoutput is text-only (italic-wrapped lines), within Discord's message size limits.Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
discord-api-typespnpm symlink in this environment)Which bot or reviewer comments were addressed?
Real behavior proof (required for external PRs)
Behavior addressed: Fix for issue #94936:
/reasoning onnow shows thinking as Thinking messages on DiscordReal setup tested:
Exact steps or command run after fix:
After-fix evidence:
Observed result after the fix: TypeScript compilation passes. The two
if (payload.isReasoning)early-return blocks at lines 612 and 655 are removed. Reasoning payloads emitted by the agent (withisReasoning: true) now flow throughbeforeDiscordPayloadDelivery→deliverDiscordPayload→deliverDiscordReply→dispatchBlockReplyDiscordwithout being dropped.What was not tested: Live Discord + DeepSeek model end-to-end test (requires working node_modules with
discord-api-typesand a configured Discord bot token)