feat(display): add suppress_retry_status platform config flag - #32569
feat(display): add suppress_retry_status platform config flag#32569smeck42 wants to merge 1 commit into
Conversation
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.
|
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
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
left a comment
There was a problem hiding this comment.
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 throughrun_agent.py:1009-1035. The changed legacyrun_agent.pycall sites no longer cover the live path. - Current main separates intentional silence from failures: exact
NO_REPLY/[SILENT]markers are filtered atgateway/response_filters.py:13-79and suppressed atgateway/run.py:12146-12156(commit293c04fef6ba34ea18090ccb555c401c23454944). Suppressing arbitrary blank outputs would also hide the diagnostic warning intentionally retained atgateway/run.py:2641-2648. - A second normalizer call exists at
gateway/run.py:19044-19048and 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.
| @@ -15091,7 +15123,7 @@ def _stop_spinner(): | |||
| "Empty response after tool calls — nudging model " | |||
There was a problem hiding this comment.
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.
| @@ -1111,6 +1133,8 @@ def _normalize_empty_agent_response( | |||
| if agent_result.get("partial"): | |||
There was a problem hiding this comment.
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.
Summary
Introduces a per-platform boolean flag
display.platforms.<platform>.suppress_retry_status(default:false).When enabled:
⚠️ Empty response from model — retrying,↻ Thinking-only response — prefilling to continue, etc.)(empty)sentinel to a silent empty response instead of the generic⚠️ The model returned no response…warningUse 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 keysuppress_retry_status: Falsein_GLOBAL_DEFAULTSgateway/run.py— new helper_resolve_suppress_retry_status(); two conditional guards in_normalize_empty_agent_responseand the(empty)substitution pathrun_agent.py— two new methods_should_suppress_retry_status()/_emit_retry_status(); retry/prefill/fallback call-sites changed from_emit_status→_emit_retry_statusTest plan
suppress_retry_statusabsent orfalse, retry bubbles and(empty)substitution behave as beforesuppress_retry_status: trueon a platform: trigger a thinking-only response → no retry bubbles appear in the platform channel, empty response delivered silently_normalize_empty_agent_responsestill returns the warning message when flag is false and api_calls > 0🤖 Generated with Claude Code