Skip to content

fix(gateway): honor queue mode in runner PRIORITY interrupt path#15385

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-73a33188
Apr 24, 2026
Merged

fix(gateway): honor queue mode in runner PRIORITY interrupt path#15385
teknium1 merged 1 commit into
mainfrom
hermes/hermes-73a33188

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

display.busy_input_mode: queue now actually queues text follow-ups at every entry point. The runner-level PRIORITY block in _handle_message was still calling running_agent.interrupt() regardless of config, even though the adapter-level busy handler already honored queue mode (commit 9d147f7).

Changes

  • gateway/run.py: queue-mode branch before the PRIORITY interrupt — calls _queue_or_replace_pending_event() and returns None
  • tests/gateway/test_busy_session_ack.py: regression test driving the full _handle_message path in queue mode

Attribution

Salvage of #12070 by @knockyai — authorship preserved via cherry-pick. The original PR's config fan-out (propagating display.busy_input_mode into each platform's extra) was dropped as redundant: the runner already loads this value directly via _load_busy_input_mode().

Validation

scripts/run_tests.sh tests/gateway/test_busy_session_ack.py tests/gateway/test_restart_drain.py tests/gateway/test_duplicate_reply_suppression.py → 45 passed

Closes #12070.

When display.busy_input_mode is 'queue', the runner-level PRIORITY block
in _handle_message was still calling running_agent.interrupt() for every
text follow-up to an active session. The adapter-level busy handler
already honors queue mode (commit 9d147f7), but this runner-level path
was an unconditional interrupt regardless of config.

Adds a queue-mode branch that queues the follow-up via
_queue_or_replace_pending_event() and returns without interrupting.

Salvages the useful part of #12070 (@knockyai). The config fan-out to
per-platform extra was redundant — runner already loads busy_input_mode
directly via _load_busy_input_mode().
@teknium1 teknium1 merged commit 3e6c108 into main Apr 24, 2026
8 of 11 checks passed
@teknium1 teknium1 deleted the hermes/hermes-73a33188 branch April 24, 2026 22:18
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels Apr 24, 2026
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 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.

3 participants