Skip to content

fix(gateway): handle Telegram start command#20449

Closed
tzedekr wants to merge 1 commit into
NousResearch:mainfrom
tzedekr:fix/telegram-start-command-clean
Closed

fix(gateway): handle Telegram start command#20449
tzedekr wants to merge 1 commit into
NousResearch:mainfrom
tzedekr:fix/telegram-start-command-clean

Conversation

@tzedekr

@tzedekr tzedekr commented May 5, 2026

Copy link
Copy Markdown

Summary

  • Register /start as a gateway-known command so Telegram's default Start button is handled instead of rejected as unknown.
  • Add a Telegram command menu helper that also best-effort forces the chat menu button into command mode.
  • Add focused tests covering menu registration, non-fatal menu-button failures, and gateway command recognition for /start.

Verification

  • python -m pytest tests/gateway/test_telegram_command_menu.py -q
  • Secret scan of the clean outgoing diff found no credential literals; only inert test-token fixtures are present.

Notes

  • This clean branch is based on current origin/main and contains only the Telegram /start fix commit.

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter P2 Medium — degraded but workaround exists labels May 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Overlaps with #11640 which implements the same /start command handling. Consider coordinating to avoid merge conflicts.

@teknium1

Copy link
Copy Markdown
Contributor

This has been implemented on current main by the Telegram /start salvage work. Automated hermes-sweeper review.

Evidence:

  • hermes_cli/commands.py:66 registers start as a gateway_only command: CommandDef("start", "Acknowledge platform start pings without a reply", "Session", gateway_only=True).
  • gateway/run.py:6589 handles /start on the running-agent fast path as a platform ping and returns "", so it does not interrupt an active session.
  • gateway/run.py:7034 handles /start on the normal slash-command path the same way.
  • Tests now cover the behavior in tests/gateway/test_gateway_command_help.py:29 and tests/gateway/test_session_race_guard.py:334 / :350.
  • The implementation is in commit efa952531ba99cd4e1c6eb80e755ade60d04560a (fix: ignore Telegram start pings), contained in release tag v2026.5.28.

Prior discussion is reflected here: the overlap noted in this PR was later salvaged through PR #33151, which merged the CommandDef plus dual-intercept /start pattern onto main.

@teknium1 teknium1 closed this Jun 11, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 11, 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 platform/telegram Telegram bot adapter sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants