hermes - 💡(How to fix) Fix /steer command not recognized in Telegram DM (sent as plain text, not COMMAND)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

  1. In hermes_cli/commands.py, telegram_bot_commands() skips commands that require arguments:
    if _requires_argument(cmd.args_hint):
        continue
  2. /steer has args_hint="<prompt>", so it is not registered in the Telegram BotCommand menu.
  3. When a command is missing from the menu, Telegram sends /steer Use Polish as a plain text message with no message.entities of type bot_command.
  4. The gateway only triggers slash-command handlers when COMMAND entity is present (or when the message is parsed as a direct command match). Without it, the text goes through normal chat processing.

Fix Action

Workaround

Use /queue (which is registered in the menu) to append to the next turn's prompt, though this differs semantically from mid-run steering.

Code Example

if _requires_argument(cmd.args_hint):
       continue
RAW_BUFFERClick to expand / collapse

Problem

The /steer slash command does not work in Telegram DM because it is excluded from the bot's setMyCommands menu, causing Telegram to send it as a plain text message instead of a COMMAND entity.

Version

0.13.0 (installed via pip install hermes-agent)

Reproduction Steps

  1. Open Telegram DM with the bot.
  2. Type and send: /steer Use Polish
  3. The bot treats it as a regular user message instead of executing the steer command.

Root Cause

  1. In hermes_cli/commands.py, telegram_bot_commands() skips commands that require arguments:
    if _requires_argument(cmd.args_hint):
        continue
  2. /steer has args_hint="<prompt>", so it is not registered in the Telegram BotCommand menu.
  3. When a command is missing from the menu, Telegram sends /steer Use Polish as a plain text message with no message.entities of type bot_command.
  4. The gateway only triggers slash-command handlers when COMMAND entity is present (or when the message is parsed as a direct command match). Without it, the text goes through normal chat processing.

Expected Behavior

/steer <prompt> should work in Telegram DM regardless of whether it appears in the bot's command menu.

Possible Fixes

  • Option A: Register /steer in setMyCommands with an optional argument or a generic placeholder so Telegram recognizes it as a command.
  • Option B: In the gateway's Telegram adapter, also check for messages that start with /steer even when no bot_command entity is present (fallback parsing for commands excluded from the menu).
  • Option C: Change _requires_argument() heuristic so commands like /steer (which have a mandatory arg but are still useful as menu items) can be included.

Workaround

Use /queue (which is registered in the menu) to append to the next turn's prompt, though this differs semantically from mid-run steering.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING