openclaw - ✅(Solved) Fix [Bug]: Discord block streaming mode accumulates duplicate tool progress entries [1 pull requests, 2 comments, 3 participants]

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…
GitHub stats
openclaw/openclaw#72205Fetched 2026-04-27 05:33:19
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1labeled ×1

Tool execution logs accumulate redundant entries during status updates in block streaming mode.

Root Cause

Tool execution logs accumulate redundant entries during status updates in block streaming mode.

Fix Action

Fixed

PR fix notes

PR #72213: fix(discord): deduplicate tool progress entries in block streaming mode [AI-assisted]

Description (problem / solution / changelog)

🤖 AI-assisted (built with Hermes orchestration). Test level: fully tested. Prompt summary available on request.

Summary

  • Problem: In Discord block streaming mode, tool progress lines show duplicate entries for the same tool (e.g., session_status appearing multiple times).
  • Why it matters: Duplicate progress lines clutter the streaming preview and confuse users about actual tool activity.
  • What changed: Extended the dedup check in pushPreviewToolProgress to compare against all existing entries (not just the last one), with bare name normalization (stripping the "tool: " prefix).
  • What did NOT change (scope boundary): No changes to tool execution logic, event dispatching, or any other streaming mode.

Change Type (select all)

  • Bug fix

Scope (select all touched areas)

  • Extensions (Discord)

Linked Issue/PR

  • Closes #72205
  • This PR fixes a bug or regression

Root Cause

  • Root cause: pushPreviewToolProgress only compared the new entry against the last entry in the array (lines[lines.length - 1] !== line). When onToolStart emits "tool: session_status" and onItemEvent later emits "session_status", they differ in the "tool: " prefix and both pass the dedup check, resulting in duplicate entries for the same tool.
  • Missing detection / guardrail: No test for duplicate tool progress entries across different event sources (onToolStart vs onItemEvent).
  • Contributing context: The two code paths (onToolStart at line ~990 and onItemEvent at line ~997) independently push tool names with different formatting conventions.

Regression Test Plan

  • Coverage level that should have caught this:
    • Unit test
  • Target test or file: extensions/discord/src/monitor/message-handler.process.test.ts
  • Scenario the test should lock in: When pushPreviewToolProgress is called with entries that differ only by the "tool: " prefix (e.g., "tool: session_status" then "session_status"), only one entry should remain.
  • Why this is the smallest reliable guardrail: Directly tests the dedup function with the exact input pattern that caused the bug.
  • Existing test that already covers this: N/A
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • Discord block streaming mode no longer shows duplicate tool names in the "Working…" progress section.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? No
  • This fix only affects display-layer dedup logic for tool progress previews. No security-sensitive data flows are touched.

Changed files

  • extensions/discord/src/monitor/message-handler.process.test.ts (modified, +22/-0)
  • extensions/discord/src/monitor/message-handler.process.ts (modified, +7/-1)

Code Example

Working…
- session_status

---

Working…
- session_status
- tool: session_status
- session_status

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Tool execution logs accumulate redundant entries during status updates in block streaming mode.

Steps to reproduce

  1. Start openclaw with 2026.4.23 version.
  2. Change channels.discord.streaming.mode to "block".
  3. Make openclaw call a tool in discord channel.

Expected behavior

Tool progress should either:

  • Show each unique tool execution only once, or
  • Replace previous entries instead of accumulating them

Actual behavior

FIrst it shows:

Working…
- session_status

But very soon, the message was edited like:

Working…
- session_status
- tool: session_status
- session_status

which includes two times tool call messages.

OpenClaw version

2026.4.23

Operating system

macOS 13.7.8

Install method

No response

Model

minimax/MiniMaxM2.7

Provider / routing chain

openclaw -> minimax.io

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: Discord users using block streaming mode Severity: low (Impact the look only) Frequency: always Consequence: Output two tool call messages.

Additional information

No response

extent analysis

TL;DR

The issue can be fixed by modifying the logging mechanism in openclaw to prevent redundant entries during status updates in "block" streaming mode.

Guidance

  • Review the logging logic in openclaw to identify why duplicate entries are being added during status updates.
  • Consider implementing a check to ensure that only unique tool execution logs are displayed, or that previous entries are replaced instead of accumulated.
  • Investigate the channels.discord.streaming.mode configuration option to see if there are any settings that can be adjusted to prevent redundant logging.
  • Verify that the issue is specific to the "block" streaming mode and does not occur in other modes.

Example

No code snippet can be provided without more information about the openclaw logging mechanism.

Notes

The issue seems to be specific to the "block" streaming mode and the minimax/MiniMaxM2.7 model, but more testing may be needed to confirm this.

Recommendation

Apply a workaround to modify the logging mechanism, as the root cause of the issue is likely related to the openclaw configuration or code.

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…

FAQ

Expected behavior

Tool progress should either:

  • Show each unique tool execution only once, or
  • Replace previous entries instead of accumulating them

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 - ✅(Solved) Fix [Bug]: Discord block streaming mode accumulates duplicate tool progress entries [1 pull requests, 2 comments, 3 participants]