Skip to content

feat(logging): add config option to suppress fallback/rate-limit status messages - #27134

Closed
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:feat/suppress-fallback-status-27131
Closed

zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:feat/suppress-fallback-status-27131

Conversation

@zccyman

@zccyman zccyman commented May 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Hermes sends internal lifecycle status messages (rate-limit, fallback switching) directly through the gateway status callback, flooding the main chat with technical debugging noise. No config option exists to suppress these selectively.

Closes #27131

Solution

Add logging.suppress_fallback_messages: true config key in config.yaml:

  • CLI log: Messages still printed via _vprint(force=True) — full debug visibility preserved
  • Gateway chat: Fallback/rate-limit messages are not forwarded to status_callback — clean chat UI
  • Other messages: Errors, warnings, tool failures remain visible (default behavior unchanged)

Changes

run_agent.py (+29 lines):

  • Read logging.suppress_fallback_messages from config in __init__, store as self._suppress_fallback_status
  • Extend _emit_status() docstring with suppress behavior
  • Add keyword-based message matching (Rate limited, switching to fallback, trying fallback, etc.) — skip status_callback call when matched

tests/run_agent/test_suppress_fallback_status.py (new, 109 lines):

  • 6 tests covering: normal forwarding, suppress fallback, non-fallback passthrough, default behavior, final error suppression, no-callback safety

Test Results

6 passed (new tests)
8 passed (existing empty_response + fallback tests — no regression)

Config Usage

# config.yaml
logging:
  suppress_fallback_messages: true

Default: false (existing behavior preserved, zero-change for users who do not opt in).

…us messages

When 'logging.suppress_fallback_messages: true' is set in config.yaml,
fallback and rate-limit lifecycle messages are still printed to the CLI
log but NOT forwarded to status_callback (gateway chat channel).

This keeps production gateway channels clean while preserving full
debug visibility in logs. Other status messages (errors, warnings,
tool failures) remain visible by default.

Closes NousResearch#27131
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles labels May 16, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Note: #27131 (which this closes) was itself closed as duplicate of #19572. Competing with open PR #4242 (silent_fallback option) and #12610 (email-specific suppression). Consider consolidating with the existing proposals.

@zccyman

zccyman commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @alt-glitch for the cross-reference.

Closing in favor of #4242 — it's the more comprehensive approach:

Good convergent design — both identify the same noise problem. #4242's approach is the better one to ship. 🙏

@zccyman

zccyman commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Closing — #4242 is the more comprehensive approach for silent fallback.

@zccyman zccyman closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles 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 type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add config option to suppress fallback/rate-limit status messages from gateway channel

2 participants