fix(gateway): suppress silent placeholder replies in live chats#9956
Open
luoxiao6645 wants to merge 1 commit into
Open
fix(gateway): suppress silent placeholder replies in live chats#9956luoxiao6645 wants to merge 1 commit into
luoxiao6645 wants to merge 1 commit into
Conversation
5f34c3a to
a82048f
Compare
This was referenced May 26, 2026
aldoeliacim
added a commit
to aldoeliacim/hermes-agent
that referenced
this pull request
Jun 8, 2026
…-inflate intentional silence (NousResearch#13248) Builds on NousResearch#9956's response_filters boundary: - Document NO_REPLY as the canonical harness-emitted SILENT_REPLY_TOKEN and list it explicitly in LIVE_GATEWAY_SILENT_MARKERS so the control-token contract no longer depends on the canonicalizer incidentally folding NO_REPLY -> 'no reply'. - In _handle_message_with_agent, distinguish INTENTIONAL silence (a recognized silence marker on a non-failed turn) from an empty-generation FAILURE, and skip _normalize_empty_agent_response for the former so a deliberate NO_REPLY turn stays silent instead of being rewritten into 'no response was generated' chat noise. Empty failures still surface the user notice. - Tests: lock the canonical-token suppression contract independent of the canonicalizer, the failed-output passthrough, prose-mention passthrough, and the intentional-silence-vs-empty-failure distinction at the handler level.
aldoeliacim
added a commit
to aldoeliacim/hermes-agent
that referenced
this pull request
Jun 11, 2026
…-inflate intentional silence (NousResearch#13248) Builds on NousResearch#9956's response_filters boundary: - Document NO_REPLY as the canonical harness-emitted SILENT_REPLY_TOKEN and list it explicitly in LIVE_GATEWAY_SILENT_MARKERS so the control-token contract no longer depends on the canonicalizer incidentally folding NO_REPLY -> 'no reply'. - In _handle_message_with_agent, distinguish INTENTIONAL silence (a recognized silence marker on a non-failed turn) from an empty-generation FAILURE, and skip _normalize_empty_agent_response for the former so a deliberate NO_REPLY turn stays silent instead of being rewritten into 'no response was generated' chat noise. Empty failures still surface the user notice. - Tests: lock the canonical-token suppression contract independent of the canonicalizer, the failed-output passthrough, prose-mention passthrough, and the intentional-silence-vs-empty-failure distinction at the handler level.
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(No message),(No reply),[SILENT], and similar silence markers from being sent to Discord and other live chat platformsProblem
In live gateway chats, the model can decide it should stay silent but still emit placeholder text such as
(No message),(No reply), or[SILENT].The gateway was treating those placeholders as normal text and delivering them to Discord instead of suppressing delivery entirely.
Root Cause
The original live reply path had no normalization step for silence markers before adapter delivery. After the initial fix, the non-streaming path was covered, but the streaming consumer could still send the same placeholders through its send/edit/commentary/fallback paths.
Changes
gateway/response_filters.pyTesting
venv\\Scripts\\python -m pytest tests/gateway/test_live_silent_responses.py tests/gateway/test_stream_consumer.py -q -n 0Closes #9840