Skip to content

fix(gateway): recognize (silence) as intentional silence marker - #46970

Open
vanthinh6886 wants to merge 1 commit into
NousResearch:mainfrom
vanthinh6886:fix/silence-marker-support
Open

fix(gateway): recognize (silence) as intentional silence marker#46970
vanthinh6886 wants to merge 1 commit into
NousResearch:mainfrom
vanthinh6886:fix/silence-marker-support

Conversation

@vanthinh6886

Copy link
Copy Markdown
Contributor

Fixes #46917

The gateway has an intentional-silence mechanism that suppresses delivery when the agent responds with markers like [SILENT], NO_REPLY, etc. However, (silence) — a natural placeholder that LLMs produce when instructed to remain silent — was not recognized, causing it to be delivered as literal text.

Fix

Add (silence) to LIVE_GATEWAY_SILENT_MARKERS in gateway/response_filters.py.

Before

Agent instructed to stay silent → LLM outputs (silence) → gateway delivers literal text (silence) to user.

After

Agent instructed to stay silent → LLM outputs (silence) → gateway recognizes it as intentional silence → delivery suppressed, no message sent.

The gateway has an intentional-silence mechanism that suppresses
delivery when the agent responds with markers like [SILENT],
NO_REPLY, etc. However, "(silence)" — a natural placeholder that
LLMs produce when instructed to remain silent — was not recognized,
causing it to be delivered as literal text.

Fix: add "(silence)" to LIVE_GATEWAY_SILENT_MARKERS so the gateway
suppresses delivery and the agent can truly respond with nothing.

Fixes NousResearch#46917
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels Jun 16, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Makes the gateway recognize (silence) as an intentional silence marker. Good UX fix (3 files, ~1.3KB diff).

Looks Good

  • Simple, targeted fix
  • No security or performance concerns

Reviewed by Hermes Agent (cron batch, 2026-06-16)

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused gateway fix. The premise is still valid on current main, but the proposed registry spelling prevents the new behavior from working.

Problems

  • gateway/response_filters.py:23 adds "(silence)", while _canonical_silence_candidate() uppercases every response before the membership check (gateway/response_filters.py:27-28,70). The candidate becomes "(SILENCE)", so the new lowercase marker cannot match; the two newly added assertions would fail.
  • The public supported-token list in website/docs/user-guide/messaging/index.md:111-122 is not updated.

Suggested changes

  • Use the canonical registry value "(SILENCE)".
  • Add a streamed (silence) suppression case; the streaming path independently uses the shared predicates at gateway/stream_consumer.py:616-619 and :655-659.
  • Document the new token.

This is an automated hermes-sweeper review.

"SILENT",
"NO_REPLY",
"NO REPLY",
"(silence)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This registry is compared against uppercase canonical candidates (_canonical_silence_candidate() calls .upper() before the membership check), so (silence) becomes (SILENCE) and will not match this lowercase entry. Please use "(SILENCE)" and retain lowercase input in the test.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Beings cannot respond with silence: forced response even when zero output is the desired outcome

5 participants