hermes - 💡(How to fix) Fix Gateway: /stop and /interrupt are fed to agent as steer text instead of interrupting it

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

gateway/run.py::_handle_active_session_busy_message reads effective_mode = self._busy_input_mode and then branches into steer/queue/interrupt without first checking whether event.text is one of the known gateway control commands. So in steer mode, /stop text gets passed to running_agent.steer("/stop") and the agent treats it as text.

Fix Action

Fix / Workaround

(Locally patched in gateway/run.py ~line 2547. Happy to send a PR — opening this issue first to confirm direction.)

Code Example

Delivered /steer to agent after tool batch (N chars): /stop

---

effective_mode = self._busy_input_mode
_text = (event.text or "").lstrip()
if _text.startswith("/"):
    first = _text.split(maxsplit=1)[0][1:].split("@", 1)[0].lower()
    if first in ("stop", "interrupt"):
        effective_mode = "interrupt"
RAW_BUFFERClick to expand / collapse

Bug

When the gateway's busy-input mode is steer (or queue), sending /stop or /interrupt to an actively running agent from a gateway platform (Slack, Telegram, Discord, etc.) does not interrupt the agent. Instead, the slash command text is fed into running_agent.steer() and the agent receives /stop as a mid-turn user instruction — which it just incorporates as more context.

Repro

  1. Set gateway busy_input_mode: steer (the recommended default for active-conversation platforms).
  2. From Slack/Telegram/Discord, send a prompt that triggers a long-running turn (lots of tool calls).
  3. Mid-turn, send /stop (or !stop on Slack via the bang-rewrite path, since native slashes don't fire in Slack threads).
  4. Observe: agent keeps running. agent.log shows e.g.:
    Delivered /steer to agent after tool batch (N chars): /stop

Expected

/stop and /interrupt should always interrupt the running agent, regardless of busy_input_mode. They're control commands, not user input.

Root cause

gateway/run.py::_handle_active_session_busy_message reads effective_mode = self._busy_input_mode and then branches into steer/queue/interrupt without first checking whether event.text is one of the known gateway control commands. So in steer mode, /stop text gets passed to running_agent.steer("/stop") and the agent treats it as text.

Suggested fix

Before the steer/queue branching block, parse the first token of event.text. If it resolves to stop or interrupt (using the existing is_gateway_known_command helper or a small allowlist), override effective_mode = "interrupt" so the existing interrupt branch fires.

Sketch:

effective_mode = self._busy_input_mode
_text = (event.text or "").lstrip()
if _text.startswith("/"):
    first = _text.split(maxsplit=1)[0][1:].split("@", 1)[0].lower()
    if first in ("stop", "interrupt"):
        effective_mode = "interrupt"

(Locally patched in gateway/run.py ~line 2547. Happy to send a PR — opening this issue first to confirm direction.)

Why this hurts on Slack specifically

Slack blocks native slash commands inside threads. The existing !cmd rewrite path (gateway/platforms/slack.py ~line 1814) gracefully converts !stop/stop, so users in threads already have a working command path — except this bug means it doesn't actually stop the agent. End result: from a Slack thread, there is no working way to interrupt an in-flight agent, since both native /stop and !stop get steered as text.

Environment

  • Hermes Agent installed via hermes update workflow
  • macOS 26.4.1
  • Default busy_input_mode: steer (configured)
  • Slack gateway in Socket Mode

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 Gateway: /stop and /interrupt are fed to agent as steer text instead of interrupting it