fix(gateway): respect busy_input_mode queue for normal busy sessions#12235
fix(gateway): respect busy_input_mode queue for normal busy sessions#12235dpaluy wants to merge 1 commit into
Conversation
When busy_input_mode is set to 'queue', the gateway now queues incoming messages during active agent runs instead of interrupting the agent. Previously, only the drain case respected the queue setting; the normal busy case always interrupted regardless of configuration. Changes: - gateway/run.py: Add queue-mode branch in _handle_active_session_busy_message that stores the message via merge_pending_message_event, sends a debounced 'Queued for next turn' ack (reusing _busy_ack_ts), and returns without calling agent.interrupt() - tests/gateway/test_busy_session_ack.py: Add _busy_input_mode param to _make_runner helper, add TestBusySessionQueueMode with 4 tests covering queue-mode no-interrupt, queued ack text, debounce behavior, and interrupt mode regression Fixes: NousResearch#11118
|
Superseded by #14762 (merged as commit 9d147f7). We went with @whitehatjr1001's implementation from #13894 because the diff was smaller (shared ack-building code via a single |
|
Real-world validation: Tested this branch in production on a Telegram gateway — fix works exactly as intended for the subagent/delegation use case. Setup:
Test:
Log confirmation: No Why this matters: This PR is the cleanest fix (#12235 vs #13894 vs #8544) — minimal scope, no default changes, good test coverage. LGTM. |
When busy_input_mode is set to 'queue', the gateway now queues incoming messages during active agent runs instead of interrupting the agent. Previously, only the drain case respected the queue setting; the normal busy case always interrupted regardless of configuration.
Changes:
Fixes: #11118
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs