Skip to content

fix(gateway): default Telegram to final-answer-first - #54742

Open
evgyur wants to merge 4 commits into
NousResearch:mainfrom
evgyur:fix/telegram-final-answer-first
Open

fix(gateway): default Telegram to final-answer-first#54742
evgyur wants to merge 4 commits into
NousResearch:mainfrom
evgyur:fix/telegram-final-answer-first

Conversation

@evgyur

@evgyur evgyur commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • default Telegram gateway display to final-answer-first: no persistent streaming, tool-progress, interim assistant messages, or long-running heartbeat messages unless users opt in
  • keep Discord/other platform streaming behavior unchanged
  • update display/default-config regression tests for the quieter Telegram contract

Why

Telegram is a durable mobile inbox. Progress bubbles, interim assistant fragments, and heartbeat/status messages persist in chat history and can be confusing when the chat is mirrored or inspected from another Telegram client. Final answers still send normally; users can explicitly re-enable streaming/progress/interim chatter per platform.

Test plan

  • python -m pytest -q tests/gateway/test_display_config.py tests/gateway/test_per_platform_streaming_defaults.py -o 'addopts='
  • python -m py_compile gateway/display_config.py hermes_cli/config.py tests/gateway/test_display_config.py tests/gateway/test_per_platform_streaming_defaults.py
  • git diff --check

@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: LGTM

Well-scoped behavioral change: Telegram defaults now keep persistent progress/interim chatter off, preventing bot-authored fragments from lingering in mobile chat history. The config defaults, platform tier, and generated config are all updated consistently. Tests cover the new defaults and the opt-in path.

Looks Good

  • Clear rationale in comments about userbot/Business mirroring concerns
  • Consistent changes across display_config.py, config.py, and test files
  • New tests verify default config doesn't re-enable Telegram progress via globals
  • cleanup_progress: True added for Telegram — good UX detail

Reviewed by Hermes Agent

@evgyur
evgyur force-pushed the fix/telegram-final-answer-first branch from 9688179 to 9fd1671 Compare June 29, 2026 08:45
@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter area/config Config system, migrations, profiles 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 P3 Low — cosmetic, nice to have labels Jun 29, 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: LGTM

Clean fix to default Telegram to final-answer-first mode. The change is well-documented and the tests are updated to reflect the new defaults. The rationale for keeping persistent progress/interim chatter off by default is clear.

Looks Good

  • Minimal, focused change
  • Good test coverage (updated existing tests)
  • Clear documentation of the rationale
  • Users can still opt into progress explicitly per platform
  • Follows existing patterns in the codebase

Reviewed by Hermes Agent

@teknium1 teknium1 added the sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform label Jul 15, 2026
@evgyur
evgyur force-pushed the fix/telegram-final-answer-first branch from 9fd1671 to cf22087 Compare July 24, 2026 03:31

@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 Telegram UX work. Current main intentionally implements the opposite default.

Problems

  • gateway/display_config.py:123-124 would reverse maintainer commit 0325e18f3426b91d0213cc064cbe7355bf028690 (#33187), which restored interim commentary and long-running notifications after finding that final-answer-first left Telegram users with only a typing indicator during long turns.
  • The persistent-heartbeat concern is already addressed in gateway/run.py:19358-19436: the gateway retains one heartbeat message ID and edits it in place instead of sending a new message each interval. The documented Telegram contract likewise keeps those two signals on while leaving tool_progress and verbose busy detail off (website/docs/user-guide/messaging/index.md:621-640).

Suggested changes

  • Retain the current defaults; users can already opt out per platform through display.platforms.telegram.interim_assistant_messages and long_running_notifications.

Automated hermes-sweeper review.

Comment thread gateway/display_config.py
# turn start and final answer. Otherwise it looks like "typing..." for
# 30 minutes with nothing happening. Opt in to verbose iteration detail
# via display.platforms.telegram.busy_ack_detail / tool_progress.
# Telegram is usually a durable mobile inbox. Bot-authored progress and

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 reverses the explicit maintainer decision in 0325e18f (#33187): Telegram should retain real mid-turn commentary because suppressing it left users with only a typing indicator during long turns. The existing per-platform setting already lets users opt out.

Comment thread gateway/display_config.py
# 30 minutes with nothing happening. Opt in to verbose iteration detail
# via display.platforms.telegram.busy_ack_detail / tool_progress.
# Telegram is usually a durable mobile inbox. Bot-authored progress and
# interim assistant/commentary fragments stay in chat history and can look

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 addresses durable-chat noise without disabling the liveness signal: gateway/run.py:19358-19436 edits a single heartbeat message in place. Please preserve this default unless maintainers choose to reverse the #33187 product decision.

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/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter 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/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants