hermes - 💡(How to fix) Fix [Bug]: Gateway multi-tool call chain cannot be interrupted mid-execution

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…

Error Message

| 16:36 | Only after all tools completed, the error report was sent |

RAW_BUFFERClick to expand / collapse

Bug Description

In Discord gateway mode, when the LLM returns multiple consecutive tool calls, user-initiated interrupt commands (e.g., "停下", "停止") are not processed immediately. The interrupt message is queued and only triggers a response after all tool calls have completed.

Expected behavior:

  • User sends interrupt -> immediately interrupt current tool call chain -> show "stopping..." -> respond to new instruction

Actual behavior:

  • User sends interrupt -> message queued -> all tool calls complete -> only then is the interrupt processed

Steps to Reproduce

  1. Send a task to Hermes in Discord that triggers multiple tool calls
  2. While tools are executing (seeing tool call logs), immediately send "停下" or "停止"
  3. Observe: the interrupt is ignored, all tools complete before any response

Reproduction evidence (2026-05-30):

TimeEvent
16:35User sent "停止吧,别测了"
16:35Tool call chain executing: write_file x4, terminal x3
16:36Only after all tools completed, the error report was sent

Environment

  • Hermes Agent: v0.15.1
  • Platform: Discord gateway
  • busy_input_mode: interrupt
  • Python: 3.11.2
  • OS: Linux (Oracle VPS)

Related Issues

  • #28809 - cooperative cancellation token for concurrent tool execution
  • #26813 - /stop and /interrupt are fed as steer text instead of interrupting
  • #21611 - Task completes silently - final message only sent after user interrupt

Suggested Fix Direction

  1. Add interrupt check points in the tool call loop
  2. In gateway/run.py interrupt path, actively cancel queued tool calls
  3. Reference #28809 cooperative cancellation token approach

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

hermes - 💡(How to fix) Fix [Bug]: Gateway multi-tool call chain cannot be interrupted mid-execution