Repository navigation
fix(auto-reply): suppress silent tokens with trailing punctuation or quotes - #93510
bluecanarybe wants to merge 1 commit into
Conversation
…quotes The silent-reply matcher (isSilentReplyText) only accepted a token-only reply matching /^\s*NO_REPLY(?:\s+NO_REPLY)*\s*$/. When a model emitted a near-miss such as NO_REPLY., NO_REPLY!, or "NO_REPLY", the strict match failed and the literal token leaked to the user across every suppression site (cron announce, channel sends, subagent announce, etc.). Widen the exact matcher to tolerate optional wrapping quotes and trailing terminal punctuation (. ! ? …) around an otherwise token-only reply, while still rejecting substantive replies that merely end with the token (regression guard for openclaw#19537, which has word content before the token). Add unit coverage for the trailing-punctuation and quoted-token cases.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open: this PR is a correct narrow bugfix with sufficient Telegram proof, but it overlaps with #98224 and the broader canonical report at #98166, while also changing exported helper/message-delivery semantics. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this PR as superseded by #98224. So I’m closing this here and keeping the remaining discussion on #98224. Review detailsBest possible solution: Close this PR as superseded by #98224. Do we have a high-confidence way to reproduce the issue? Yes at high confidence from source and proof: current main uses the strict exact matcher, and Mantis Telegram Desktop proof shows a baseline Is this the best way to solve the issue? Yes for the narrow trailing-punctuation and quote cases: the shared classifier is the right owner boundary. The broader best fix still needs maintainer coordination with #98224 and the exported SDK contract. Security review: Security review cleared: The diff only changes TypeScript silent-token matching and unit tests, with no dependency, workflow, secret, package-resolution, or code-execution surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 9f98b6e174d1. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIF evidence showing the silent reply token is no longer sent as a chat message.
Motion-trimmed clips: |
|
Superseded by the broader, landed #98224 ( |
|
🦞👀 Reason: structured ClawSweeper close marker: close-required (sha=2bedc609b9112f7c3a8675c36fa1ce93f8114f07) Usage: |




Problem
The silent-reply suppressor
isSilentReplyTextonly matches a strictly token-only reply:When a model emits a near-miss —
NO_REPLY.,NO_REPLY!, or"NO_REPLY"— the strict match fails and the literal token leaks to the user verbatim. BecauseisSilentReplyTextis the shared matcher used at ~40 suppression sites (cronannouncedelivery, channel sends, subagent announce, Slack/Teams, etc.), a single trailing period defeats suppression everywhere at once.This shows up in practice as
NO_REPLY.appearing in chat threads where the assistant intended to stay silent.Fix
Widen
getSilentExactRegexto tolerate, around an otherwise token-only reply:",',«»,“”,‘’).,!,?,…) and whitespaceThe
^anchor plus a quote/whitespace-only lead still rejects substantive replies that merely end with the token (regression guard for #19537), since those contain word content before the token.Tests
Added unit coverage in
tokens.test.tsfor:./!/?/…All existing
isSilentReplyText/isSilentReplyPayloadTextcases — including the #19537 substantive-reply guards — continue to pass. Verified the new regex against the full case matrix (22 cases, all green).