hermes - 💡(How to fix) Fix [Bug] busy_input_mode: queue only works during gateway drain, not normal task execution [1 comments, 2 participants]

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…
GitHub stats
NousResearch/hermes-agent#14905Fetched 2026-04-24 10:44:22
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

The busy_input_mode: queue configuration in display.busy_input_mode only takes effect during gateway drain (restart/shutdown). During normal task execution, new incoming messages always interrupt the running agent with "⚡ Interrupting current task...", regardless of the config setting.

This contradicts the expected behavior documented in the code comments and the CLI's behavior:

# cli.py line 1846 (CLI mode — works correctly)
# busy_input_mode: "interrupt" (Enter interrupts current run) or "queue" (Enter queues for next turn)

Root Cause

gateway/run.py lines 1249-1250:

def _queue_during_drain_enabled(self) -> bool:
    return self._restart_requested and self._busy_input_mode == "queue"

This function gates queue mode behind _restart_requested, meaning queue mode only activates during gateway shutdown drain.

The function _handle_active_session_busy_message (line ~1554, "Normal busy case" branch) does not check self._busy_input_mode at all — it unconditionally interrupts the running agent.

Fix Action

Fix / Workaround

I have a working local patch that I can submit as a PR if helpful. The change is ~25 lines, fully backward compatible (default behavior unchanged when busy_input_mode != "queue").

Code Example

# cli.py line 1846 (CLI mode — works correctly)
# busy_input_mode: "interrupt" (Enter interrupts current run) or "queue" (Enter queues for next turn)

---

def _queue_during_drain_enabled(self) -> bool:
    return self._restart_requested and self._busy_input_mode == "queue"
RAW_BUFFERClick to expand / collapse

Bug: busy_input_mode: queue only works during gateway drain, not normal task execution

Description

The busy_input_mode: queue configuration in display.busy_input_mode only takes effect during gateway drain (restart/shutdown). During normal task execution, new incoming messages always interrupt the running agent with "⚡ Interrupting current task...", regardless of the config setting.

This contradicts the expected behavior documented in the code comments and the CLI's behavior:

# cli.py line 1846 (CLI mode — works correctly)
# busy_input_mode: "interrupt" (Enter interrupts current run) or "queue" (Enter queues for next turn)

Expected Behavior

When display.busy_input_mode: queue is set, new messages received while the agent is executing a task should:

  1. Not interrupt the running agent
  2. Be queued for processing as the next turn after the current task completes
  3. User receives an acknowledgment that the message was queued

Actual Behavior

Regardless of busy_input_mode setting, new messages during normal task execution:

  1. Always interrupt the running agent
  2. Show "⚡ Interrupting current task (X min elapsed, iteration N/M)..."
  3. The agent abandons the current tool-calling loop

Root Cause

gateway/run.py lines 1249-1250:

def _queue_during_drain_enabled(self) -> bool:
    return self._restart_requested and self._busy_input_mode == "queue"

This function gates queue mode behind _restart_requested, meaning queue mode only activates during gateway shutdown drain.

The function _handle_active_session_busy_message (line ~1554, "Normal busy case" branch) does not check self._busy_input_mode at all — it unconditionally interrupts the running agent.

Reproduction Steps

  1. Set display.busy_input_mode: queue in profile config.yaml
  2. Configure gateway with Discord platform
  3. Send Zeus a long-running task: "list all files recursively in /root and analyze"
  4. While agent is processing, send a second message: "hi, are you busy?"
  5. Observe: agent shows "⚡ Interrupting..." instead of "⏳ Message queued..."

Environment

  • Hermes version: 0.10.0
  • Commit: ce089169
  • Platform: Discord (gateway mode)
  • Profile config has display.busy_input_mode: queue

Suggested Fix

Add early return in _handle_active_session_busy_message checking _busy_input_mode before the interrupt logic. The pending_messages mechanism already handles queue processing — only the ack message and skip-interrupt logic need to be added.

I have a working local patch that I can submit as a PR if helpful. The change is ~25 lines, fully backward compatible (default behavior unchanged when busy_input_mode != "queue").

Impact

  • Users configure queue mode expecting it to work, but get interrupt behavior
  • Long-running tasks lose context when users send follow-up clarifications
  • Inconsistent behavior between CLI mode (works) and gateway mode (broken)

extent analysis

TL;DR

The issue can be fixed by modifying the _handle_active_session_busy_message function to check the _busy_input_mode and handle queue mode correctly.

Guidance

  • The root cause of the issue is the _queue_during_drain_enabled function, which only enables queue mode during gateway shutdown drain, and the _handle_active_session_busy_message function, which unconditionally interrupts the running agent.
  • To fix the issue, an early return should be added to _handle_active_session_busy_message to check _busy_input_mode before the interrupt logic.
  • The pending_messages mechanism already handles queue processing, so only the ack message and skip-interrupt logic need to be added.
  • A working local patch can be submitted as a PR to fix the issue.

Example

def _handle_active_session_busy_message(self, message):
    if self._busy_input_mode == "queue":
        # Handle queue mode and send ack message
        # ...
        return
    # Existing interrupt logic

Notes

  • The fix should be fully backward compatible, with default behavior unchanged when busy_input_mode != "queue".
  • The issue only affects gateway mode, while CLI mode works correctly.

Recommendation

Apply workaround: Modify the _handle_active_session_busy_message function to check _busy_input_mode and handle queue mode correctly, as this will fix the inconsistent behavior between CLI mode and gateway 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 [Bug] busy_input_mode: queue only works during gateway drain, not normal task execution [1 comments, 2 participants]