-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Discord leaks internal tool-call traces (NO_REPLY, commentary, to=functions) to channel #44905
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
Discord channels occasionally surface internal LLM tool-call artifacts that should never be visible to end-users. The leaked content includes:
NO_REPLYto=functions.memory_searchcommentary{"query":"...","maxResults":5})recipient_name/parametersenvelope fieldsOther channels (Telegram, WhatsApp, Signal) do not exhibit this issue.
Expected Behavior
NO_REPLYshould be consumed silently — never sent to any channel.commentary,to=functions.*, tool-call JSON, and other internal envelope fields should be stripped before delivery.Actual Behavior
Discord intermittently delivers raw internal messages as visible chat messages in the channel.
Root Cause Analysis
Traced through the delivery pipeline in
v2026.3.8:1. Discord missing from
PLAIN_TEXT_SURFACES(src/infra/outbound/sanitize-text.ts)normalizePayloadsForChannelDelivery()callssanitizeForPlainText()only for surfaces in this set. Discord payloads skip sanitization entirely.2.
sanitizeTextContent()does not strip tool-routing traces (src/auto-reply/extract-text.ts)This strips thinking tags and Minimax XML, but does not catch:
NO_REPLYto=functions.*commentary3.
sendDiscordText()has no pre-send filter (src/infra/send/discord.ts)The Discord send path serializes and posts the text chunk directly — no final sanitization gate.
4.
NO_REPLYsuppression has a gap (src/infra/outbound/normalize.ts)In
normalizeReplyPayloadsForDelivery, silent payloads are only suppressed whenmergedMedia.length === 0. Payloads with media attached can pass through withNO_REPLYstill in the text.High-Probability Trigger Scenarios
NO_REPLYreturn branchesSuggested Fix
Add a universal outbound sanitizer in
normalizePayloadsForChannelDelivery(or equivalent) that runs for all channels, not just plain-text surfaces:Also enhance
sanitizeTextContent()to strip the same patterns at the extraction layer.Environment