From 92dcdbff664a78e7761afcc2e65215826e894a1b Mon Sep 17 00:00:00 2001 From: Teknium Date: Fri, 3 Apr 2026 14:59:51 -0700 Subject: [PATCH] fix: clarify interrupt re-queue label, document busy_input_mode behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The '📨 Queued:' label was misleading — it looked like the message was silently deferred when it was actually being sent immediately after the interrupt. Changed to '⚡ Sending after interrupt:' with multi-message count when the user typed several messages during agent execution. Added comment documenting that this code path only applies when busy_input_mode == 'interrupt' (the default). Based on PR #4821 by iRonin. Co-authored-by: iRonin --- cli.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cli.py b/cli.py index 4e96107e..8e1054e8 100644 --- a/cli.py +++ b/cli.py @@ -6266,8 +6266,11 @@ class HermesCLI: ).start() - # Combine all interrupt messages (user may have typed multiple while waiting) - # and re-queue as one prompt for process_loop + # Re-queue the interrupt message (and any that arrived while we were + # processing the first) as the next prompt for process_loop. + # Only reached when busy_input_mode == "interrupt" (the default). + # In "queue" mode Enter routes directly to _pending_input so this + # block is never hit. if pending_message and hasattr(self, '_pending_input'): all_parts = [pending_message] while not self._interrupt_queue.empty(): @@ -6278,7 +6281,12 @@ class HermesCLI: except queue.Empty: break combined = "\n".join(all_parts) - print(f"\n📨 Queued: '{combined[:50]}{'...' if len(combined) > 50 else ''}'") + n = len(all_parts) + preview = combined[:50] + ("..." if len(combined) > 50 else "") + if n > 1: + print(f"\n⚡ Sending {n} messages after interrupt: '{preview}'") + else: + print(f"\n⚡ Sending after interrupt: '{preview}'") self._pending_input.put(combined) return response