Skip to content

Bug: clarify multiple-choice text fallback never intercepts user reply on Mattermost #25567

@gambini-spb

Description

@gambini-spb

Summary

clarify with multiple choices works on Telegram (inline buttons).
On Mattermost the question is rendered as a numbered text list, but the
user's typed reply is never intercepted. The agent blocks on
wait_for_response until the 10-minute timeout, then gets an empty
response.

Root cause

tools/clarify_gateway.py:95 sets awaiting_text = not bool(choices),
which is False when choices are provided. get_pending_for_session
(line 171) returns only entries with awaiting_text == True, so the
user's reply is never matched against the pending clarify.

Steps to reproduce

  1. Run Hermes gateway with Mattermost adapter
  2. Trigger clarify with multiple choices
  3. Numbered list is sent correctly
  4. Reply with a number (e.g. "2") or choice text
  5. Agent times out after 10 minutes with
    [user did not respond within 10m]

Expected behavior

When the base send_clarify uses the numbered-text fallback for
multiple-choice clarify, the next user message in that session should be
intercepted and resolved, just as it already works for open-ended clarify
(choices=None).

Environment

  • Hermes HEAD: 942adf6
  • Platform: Mattermost

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliverycomp/toolsTool registry, model_tools, toolsetstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions