Skip to content

feat(display): add suppress_retry_status platform config flag - #32569

Open
smeck42 wants to merge 1 commit into
NousResearch:mainfrom
smeck42:feat/suppress-retry-status-config
Open

feat(display): add suppress_retry_status platform config flag#32569
smeck42 wants to merge 1 commit into
NousResearch:mainfrom
smeck42:feat/suppress-retry-status-config

Conversation

@smeck42

@smeck42 smeck42 commented May 26, 2026

Copy link
Copy Markdown

Summary

Introduces a per-platform boolean flag display.platforms.<platform>.suppress_retry_status (default: false).

When enabled:

  • Suppresses retry/empty-response/thinking-only/fallback lifecycle status bubbles (⚠️ Empty response from model — retrying, ↻ Thinking-only response — prefilling to continue, etc.)
  • Converts the internal (empty) sentinel to a silent empty response instead of the generic ⚠️ The model returned no response… warning

Use case: Deployments where agent personas legitimately produce empty model responses — for example, a persona instructed to stay silent when a message is directed at a different participant. In these cases the retry infrastructure correctly exhausts its retries, but the resulting status spam is confusing and misleading to end users.

Default is false, so existing behaviour is fully preserved for all users who do not set this flag.

Changed files

  • gateway/display_config.py — new key suppress_retry_status: False in _GLOBAL_DEFAULTS
  • gateway/run.py — new helper _resolve_suppress_retry_status(); two conditional guards in _normalize_empty_agent_response and the (empty) substitution path
  • run_agent.py — two new methods _should_suppress_retry_status() / _emit_retry_status(); retry/prefill/fallback call-sites changed from _emit_status_emit_retry_status

Test plan

  • Default behaviour unchanged: with suppress_retry_status absent or false, retry bubbles and (empty) substitution behave as before
  • With suppress_retry_status: true on a platform: trigger a thinking-only response → no retry bubbles appear in the platform channel, empty response delivered silently
  • Verify _normalize_empty_agent_response still returns the warning message when flag is false and api_calls > 0

🤖 Generated with Claude Code

Introduces a per-platform boolean flag
`display.platforms.<platform>.suppress_retry_status` (default: false).

When enabled, suppresses the retry/empty-response/thinking-only/fallback
lifecycle status bubbles (⚠️ Empty response from model — retrying,
↻ Thinking-only response — prefilling to continue, etc.) and converts the
internal "(empty)" sentinel to a silent empty response instead of the
generic ⚠️ warning message.

This is useful for deployments where agent personas legitimately produce
empty model responses — for example, when a persona is instructed to stay
silent when a message is directed at a different participant. In these cases
the retry infrastructure correctly exhausts its retries, but the resulting
status spam is confusing and misleading to end users.

Default is false, so existing behaviour is fully preserved.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 26, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Overlaps with several open PRs addressing retry/status suppression: #18064, #24387, #4242, #25748, #24519, #30574. Related issue #19572 tracks the general feature request. Please coordinate to avoid further saturation.

@smeck42

smeck42 commented May 26, 2026

Copy link
Copy Markdown
Author

Thanks for the pointers. I've reviewed all six PRs and the tracking issue.

The closest overlap is with #24519 (gateway-layer empty-response filter) and #24387 (agent-global suppress_retry_warnings). The key differences in this PR:

  1. Platform-granularity — the flag lives in display.platforms.<platform>, so suppression can be enabled on e.g. a Telegram persona bot while leaving a CLI or admin platform fully verbose. None of the referenced PRs offer per-platform targeting.

  2. Intentional-silence use case — the motivating scenario here is a multi-persona deployment where an agent correctly returns an empty response (it's not the addressee). The retry infrastructure does the right thing, but the resulting status bubbles are misleading to end users because there was no error. This framing is distinct from fix(agent): suppress intermediate retry status messages in chat thread #18064/feat(fallback): add silent_fallback option to suppress status messages #4242 (network/fallback errors) and fix: suppress internal status banners on customer-facing platforms (refs #28208) #30574 (customer-facing filter).

  3. (empty) sentinel path — this PR also covers the silent conversion of the internal (empty) sentinel, which fix(gateway): suppress empty-response lifecycle status in chats #24519 and feat(agent): add retry warning suppression config #24387 do not.

Happy to coordinate — if the maintainers prefer to consolidate into one of the existing PRs or a fresh joint PR, I can contribute the platform-granularity piece there instead.

@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 per-platform display proposal. The exact configuration key is not present on current main, but this patch needs rework before it can be salvaged.

Problems

  • The retry loop was extracted after this PR: current empty-response status messages are buffered in agent/conversation_loop.py:4923, :4969, :5004, and :5023, then emitted through run_agent.py:1009-1035. The changed legacy run_agent.py call sites no longer cover the live path.
  • Current main separates intentional silence from failures: exact NO_REPLY/[SILENT] markers are filtered at gateway/response_filters.py:13-79 and suppressed at gateway/run.py:12146-12156 (commit 293c04fef6ba34ea18090ccb555c401c23454944). Suppressing arbitrary blank outputs would also hide the diagnostic warning intentionally retained at gateway/run.py:2641-2648.
  • A second normalizer call exists at gateway/run.py:19044-19048 and is not covered by this patch.

Suggested changes

  • Rebase the design on the current buffered-status flush path and add tests for default, enabled, and intentional-silence behavior.
  • Preserve warnings for unmarked exhausted failures; use the exact silence markers for persona-directed non-delivery.

This is an automated hermes-sweeper review.

Comment thread run_agent.py
@@ -15091,7 +15123,7 @@ def _stop_spinner():
"Empty response after tool calls — nudging model "

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.

Current main no longer executes this retry block from run_agent.py: the live empty-response transitions are now in agent/conversation_loop.py, where they call _buffer_status() and later flush centrally. Please rework this against the current buffer/flush path rather than adding another per-call emission wrapper.

Comment thread gateway/run.py
@@ -1111,6 +1133,8 @@ def _normalize_empty_agent_response(
if agent_result.get("partial"):

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 suppresses the diagnostic for every blank post-API response, including genuine degraded failures. Current main distinguishes intentional silence via exact NO_REPLY/[SILENT] markers in gateway/response_filters.py; preserving that distinction avoids silently hiding malformed or failed model output.

@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-broad Sweeper blast radius: broad — a core path most sessions hit labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit 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/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants