Skip to content

feat(cli): configurable busy input mode + fix /queue always working#3298

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-dd753a5f
Mar 27, 2026
Merged

feat(cli): configurable busy input mode + fix /queue always working#3298
teknium1 merged 1 commit intomainfrom
hermes/hermes-dd753a5f

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Two changes salvaged from #3037 by @StefanoChiodino:

1. Fix /queue command always working

On main, /queue follow up while the agent is busy goes to _pending_input (deferred). When the agent finishes and process_command runs, the handler checks self._agent_running — which is now False — and rejects with "Just type your message normally." The prompt never gets queued.

Fix: remove the _agent_running guard. /queue now always queues the prompt into _pending_input, whether the agent is busy or idle.

2. Add display.busy_input_mode config

CLI-only setting that controls what Enter does while the agent is running:

  • interrupt (default): Enter sends the message to the interrupt queue, redirecting the agent. Preserves existing behavior.
  • queue: Enter queues the message for the next turn with a "Queued for the next turn: ..." confirmation. Ctrl+C always interrupts regardless.

Differences from original PR

  • Default is interrupt (preserves existing behavior), not queue
  • No config version bump (unnecessary — _deep_merge handles new keys in existing sections)
  • Simpler normalization (no 6-alias map)
  • Simpler /queue fix: just remove the guard instead of intercepting commands during busy state

Test plan

  • 7 new tests in TestBusyInputMode (config loading, queue routing, /queue behavior)
  • CLI + config tests: 120 passed
Two changes:

1. Fix /queue command: remove the _agent_running guard that rejected
   /queue after the agent finished. The prompt was deferred in
   _pending_input until the agent completed, then the handler checked
   _agent_running (now False) and rejected it. /queue now always queues
   regardless of timing.

2. Add display.busy_input_mode config (CLI-only):
   - 'interrupt' (default): Enter while busy interrupts the current run
     (preserves existing behavior)
   - 'queue': Enter while busy queues the message for the next turn,
     with a 'Queued for the next turn: ...' confirmation
   Ctrl+C always interrupts regardless of this setting.

Salvaged from PR #3037 by StefanoChiodino. Key differences:
- Default is 'interrupt' (preserves existing behavior) not 'queue'
- No config version bump (unnecessary for new key in existing section)
- Simpler normalization (no alias map)
- /queue fix is simpler: just remove the guard instead of intercepting
  commands during busy state
@teknium1 teknium1 merged commit 2d232c9 into main Mar 27, 2026
3 of 4 checks passed
StreamOfRon pushed a commit to StreamOfRon/hermes-agent that referenced this pull request Mar 29, 2026
…ousResearch#3298)

Two changes:

1. Fix /queue command: remove the _agent_running guard that rejected
   /queue after the agent finished. The prompt was deferred in
   _pending_input until the agent completed, then the handler checked
   _agent_running (now False) and rejected it. /queue now always queues
   regardless of timing.

2. Add display.busy_input_mode config (CLI-only):
   - 'interrupt' (default): Enter while busy interrupts the current run
     (preserves existing behavior)
   - 'queue': Enter while busy queues the message for the next turn,
     with a 'Queued for the next turn: ...' confirmation
   Ctrl+C always interrupts regardless of this setting.

Salvaged from PR NousResearch#3037 by StefanoChiodino. Key differences:
- Default is 'interrupt' (preserves existing behavior) not 'queue'
- No config version bump (unnecessary for new key in existing section)
- Simpler normalization (no alias map)
- /queue fix is simpler: just remove the guard instead of intercepting
  commands during busy state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant