Skip to content

fix(clarify): set awaiting_text=True for all clarify entries including multiple-choice#25610

Closed
alaamohanad169-ship-it wants to merge 2 commits into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/clarify-mattermost-text-fallback
Closed

fix(clarify): set awaiting_text=True for all clarify entries including multiple-choice#25610
alaamohanad169-ship-it wants to merge 2 commits into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/clarify-mattermost-text-fallback

Conversation

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Summary

On Mattermost, clarify with multiple choices renders a numbered list but the user reply is never intercepted because awaiting_text was False when choices were provided. Now awaiting_text is always True.

The _approval_callback method in HermesCLI (cli.py) hardcoded timeout = 60
instead of reading the approvals.timeout config value. This meant the config
setting was silently ignored for CLI interactive approval prompts.

One-line change: replace timeout = 60 with
timeout = int(CLI_CONFIG.get("approvals", {}).get("timeout", 60)).

Other approval paths (tools/approval.py and hermes_cli/callbacks.py) already
read the config correctly.
…g multiple-choice

When choices were provided, awaiting_text was set to False, which meant
get_pending_for_session() would never match the entry for text-fallback
adapters like Mattermost. The user's typed reply was never intercepted,
causing the agent to block until timeout.

Button-based adapters (e.g. Telegram) resolve via resolve_gateway_clarify
directly and don't check awaiting_text, so they're unaffected.

Now awaiting_text is always True so both button and text-fallback paths work.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists labels May 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #25584 / #25587 — third submission of the same fix for #25567 (clarify multiple-choice text fallback missing awaiting_text=True).

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 duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants