fix(reply): filter short trailing acks after message-tool sends#96763
fix(reply): filter short trailing acks after message-tool sends#96763zw-xysk wants to merge 1 commit into
Conversation
After an agent delivers its main reply via the message tool, models often append a short meta-ack (已发, OK, Done, Sent, etc.) that becomes a second visible message. Add isMessagingToolAck to detect these by pattern. Fixes openclaw#96681 Co-Authored-By: Claude (via Anthropic API) <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed June 25, 2026, 7:54 AM ET / 11:54 UTC. Summary PR surface: Source +28. Total +28 across 3 files. Reproducibility: yes. at source level: current main has a 10-character duplicate floor and final/follow-up paths have no meta-ack filter, so short acknowledgements can pass. I did not establish a live channel reproduction in this read-only review. 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: Use a route-scoped whole-text meta-ack filter with focused positive and false-positive tests in both final and follow-up paths, then add redacted real channel proof before closing the linked issue. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main has a 10-character duplicate floor and final/follow-up paths have no meta-ack filter, so short acknowledgements can pass. I did not establish a live channel reproduction in this read-only review. Is this the best way to solve the issue? No: the route-scoped dedupe seam is appropriate, but this implementation is not the best fix because the classifier is both overbroad and undercovered. A safer solution needs whole-text matching, false-positive tests, sibling-path coverage, and real channel proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4ecb45bf7729. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +28. 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
|
|
All core CI green (lint, test, compile). @clawsweeper re-review |
Fixes #96681
What Problem This Solves
After an agent uses the
messagetool (action=send) to deliver its main reply, models often append a short trailing ack —已发,OK,Done,Sent,Got it, etc. These carry no information beyond the already-sent message but appear as a second visible message in the channel.The existing
filterMessagingToolDuplicatesuses a 10-char minimum, so short acks escape dedup.Evidence
Fix
messaging-dedupe.ts: addedisMessagingToolAck()— pattern-matches short trailing acks (Chinese + English) when a message-tool send has occurredreply-payloads-dedupe.ts: wired ack check alongside existing duplicate checkTest results
What was not tested
End-to-end with real Telegram/Discord channel. Logic is text-only, media payloads preserved.
Changes
3 files, +30/-2. Lockfile unchanged.