Repository navigation
Description
Summary
A token-only silent reply leaks to the channel as visible prose when the model emits the sentinel with stray leading/trailing punctuation — most commonly a hallucinated leading dot, .NO_REPLY. We've observed this reproduce on ordinary traffic (a Slack agent posting a literal .NO_REPLY instead of staying silent).
Version
Root cause
In src/auto-reply/tokens.ts, isSilentReplyText() matches the sentinel with an exact regex:
new RegExp(`^\\s*${escaped}(?:\\s+${escaped})*\\s*$`, "i")A leading . (or any non-whitespace punctuation) sits before ^\s*NO_REPLY, so the match fails and the reply is delivered. The sibling matchers in isSilentReplyPayloadText() don't catch it either: isSilentReplyEnvelopeText requires a {…} JSON envelope, and isReasoningPrefixedSilentReplyText requires a reasoning prefix. So .NO_REPLY, NO_REPLY., *NO_REPLY*, ...NO_REPLY... all leak.
Reproduction
import { isSilentReplyPayloadText } from "./auto-reply/tokens";
isSilentReplyPayloadText("NO_REPLY"); // true (suppressed, correct)
isSilentReplyPayloadText(".NO_REPLY"); // false (LEAKS — bug)
isSilentReplyPayloadText("*NO_REPLY*"); // false (LEAKS)Suggested fix
Normalize leading/trailing non-alphanumeric (Unicode-aware) chars and re-test, in isSilentReplyText — keeping it a token-only check so mixed content ("the sentinel is NO_REPLY, fyi") is unaffected:
function stripEdgeNonAlnum(text) {
return text.replace(/^[^\p{L}\p{N}]+/u, "").replace(/[^\p{L}\p{N}]+$/u, "");
}
function isSilentReplyText(text, token = SILENT_REPLY_TOKEN) {
if (!text) return false;
if (getSilentExactRegex(token).test(text)) return true;
const normalized = stripEdgeNonAlnum(text);
return normalized !== text && getSilentExactRegex(token).test(normalized);
}Verified against the installed dist build: with this change, .NO_REPLY / NO_REPLY. / *NO_REPLY* / ...NO_REPLY... all suppress, while real replies and prose that merely mention the token still deliver. Happy to send a PR if useful.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 30, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 30, 2026, 10:22 AM ET / 14:22 UTC.
Summary
Keep open: current main and the latest release still use an exact silent-token matcher, while the overlapping open PR only covers trailing punctuation/quotes and does not cover leading-dot or star-wrapped token-only leaks.
Reproducibility: yes. at source level: current main's exact regex rejects
.NO_REPLY,NO_REPLY.,*NO_REPLY*, and...NO_REPLY..., and those payloads then miss the shared suppression classifier. I did not run a live Slack or channel delivery path in this read-only review.Root-cause cluster
Relationship:
canonicalCanonical: #98166
Summary: This issue is the narrow remaining report for leading/trailing punctuation wrapped token-only
NO_REPLY; the open PR is a partial fix candidate for trailing punctuation and quotes, while the older broad issue covers a larger product/security policy question.Members:
partial_overlap: fix(auto-reply): suppress silent tokens with trailing punctuation or quotes #93510 - The PR covers quoted and trailing-punctuated token-only silent replies, but not leading-dot or star-wrapped variants reported here.partial_overlap: Feature: post-process NO_REPLY to suppress partial leaks #42472 - That open issue asks for broad mixed-contentNO_REPLYpost-processing, which is related but wider and more product-sensitive than token-only edge punctuation.partial_overlap: fix: tighten isSilentReplyText to match whole-text only #19576 - That merged PR introduced the whole-text-only matcher behavior that this issue would broaden while preserving the inverse false-positive guard.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Needs maintainer review because the fix should align with the overlapping open PR and would broaden an exported silent-reply helper contract.
Review details
Best possible solution:
Define one shared token-only silent-reply classifier that tolerates maintainer-approved edge punctuation, preserves substantive replies, and lands in coordination with the overlapping open PR.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level: current main's exact regex rejects
.NO_REPLY,NO_REPLY.,*NO_REPLY*, and...NO_REPLY..., and those payloads then miss the shared suppression classifier. I did not run a live Slack or channel delivery path in this read-only review.Is this the best way to solve the issue?
Unclear until maintainers settle the exported helper contract. The best implementation shape is the shared classifier, but it should be aligned with #93510 and the existing substantive-reply guards.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
isSilentReplyText, which is exported through plugin SDK subpaths, so maintainers should decide the supported edge-punctuation contract before merging a broad classifier change.Codex review notes: model internal, reasoning high; reviewed against 6cb82eaab865.
Label changes
Label changes:
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.clawsweeper:needs-product-decision: Current issue advisory state selects this label.Label justifications:
P2: This is a normal-priority channel delivery correctness issue with clear source evidence but limited blast radius and an existing overlapping PR path.impact:message-loss: The issue is about silent-reply delivery semantics causing a message that should be suppressed to appear in a channel.Evidence reviewed
What I checked:
isSilentReplyTextstill builds^\s*NO_REPLY(?:\s+NO_REPLY)*\s*$, so leading or trailing non-whitespace punctuation is outside the current match. (src/auto-reply/tokens.ts:29, 6cb82eaab865)isSilentReplyPayloadTextcomposes exact, quoted-JSON, JSON-envelope, and reasoning-prefixed checks; none strips edge punctuation around a token-only payload. (src/auto-reply/tokens.ts:207, 6cb82eaab865)isSilentReplyPayloadTextsucceeds, then only strips known leading/trailing token forms;.NO_REPLYand*NO_REPLY*remain outside that path. (src/auto-reply/reply/normalize-reply.ts:60, 6cb82eaab865)trueforNO_REPLYandfalsefor.NO_REPLY,NO_REPLY.,*NO_REPLY*, and...NO_REPLY.... (src/auto-reply/tokens.ts:29, 6cb82eaab865)v2026.6.10tag contains the same exact regex shape, so this is not fixed in the latest release. (src/auto-reply/tokens.ts:29, aa69b12d0086).NO_REPLYor star-wrapped*NO_REPLY*. (2bedc609b911)Likely related people:
isSilentReplyTextchange that established the strict exact-token boundary this report would broaden. (role: current strict matcher author; confidence: high; commits: 2f2110a32cfe, bb93dba10170; files:src/auto-reply/tokens.ts,src/auto-reply/tokens.test.ts)src/auto-reply/tokens.ts,src/auto-reply/tokens.test.ts,src/auto-reply/reply/typing.ts)NO_REPLYleakage, which is adjacent to this leading-punctuation variant. (role: silent-token hardening contributor; confidence: high; commits: 153e3add6885, 9ce813b414ae, ce345a097c24; files:src/auto-reply/tokens.ts,src/auto-reply/reply/normalize-reply.ts,src/auto-reply/reply/reply-utils.test.ts)src/auto-reply/tokens.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.[AI] fix(auto-reply): strip stray punctuation before silent-reply tok…
[AI] fix: strip only punct not emoji before silent-reply detection
[AI] fix: preserve exact custom-token match before edge-punct normali…
[AI] fix: handle whitespace-wrapped punctuation in silent-reply fallback
fix(auto-reply): strip stray punctuation before silent-reply token de…
steipete commentedon Jul 3, 2026
Fixed on
mainby #98224 (19d621e760be1a62260e36b0b3f18124d797a73b). The canonical matcher now suppresses punctuation-wrapped token-only replies while preserving symbol/emoji-prefixed content; 97 focused tests, exact-head CI, clean autoreview, and native Telegram before/after proof are recorded on the PR. Closing as resolved.fix(auto-reply): strip stray punctuation before silent-reply token de…