hermes - 💡(How to fix) Fix Feature: /queue cancel command to clear queued prompts

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…

Fix Action

Fix / Workaround

Current workarounds

  • Extend the queue/buffer management in the CLI input handler and gateway session dispatch to expose a clear_queue() method.
  • Add /queue cancel and /queue list to the command parser (likely in hermes_cli/commands.py and gateway command routing).
  • When /queue cancel is issued, drain the pending message buffer and print confirmation.
  • The cancel command itself should never be queued — it must be processed immediately, similar to /stop.

Code Example

[Agent is processing a long task...]
User types: "actually, ignore that"
User types: "check the logs instead"

Agent completes current turn.

[Currently — both messages execute in sequence]
[Proposed — user can cancel before they execute]

User types: /queue list
> 3 messages queued:
>   1. "actually, ignore that" (pending)
>   2. "check the logs instead" (pending)

User types: /queue cancel
> Cleared 2 queued messages. Queue is now empty.
RAW_BUFFERClick to expand / collapse

Problem

When the agent is busy processing a turn, any prompts sent by the user are silently queued and executed once the current turn completes. There is currently no way to inspect or clear this queue without waiting for the current turn to finish.

This creates several pain points:

  1. Accidental queuing — A user sends a message meant as a note or question while the agent is mid-task, and it gets queued and executed automatically after the current turn, potentially disrupting flow or causing unintended actions.
  2. No visibility — Users have no way to know whether messages are being queued or dropped.
  3. No cancellation — Once a message is queued, there is no way to cancel/remove it short of waiting for it to execute or resetting the entire session with /new.
  4. Queue buildup — On longer-running tasks, multiple queued messages can accumulate with no way to review or clear them.

This is particularly acute on gateway platforms (Telegram, Discord, etc.) where accidental sends during processing are common, and on the CLI when typing ahead while the agent works.

Current workarounds

  • Use /stop or Ctrl+C to interrupt the current turn, which cancels everything but does not distinguish between the active turn and queued messages.
  • Use /new to reset the entire session, losing all context.
  • Simply wait for the queued messages to execute one by one.

None of these provide a way to selectively inspect or clear the pending queue.

Proposed solution

Add a /queue cancel (or /queue clear) command to the CLI and gateway command parsers that:

  1. Lists any currently queued (pending) prompts that have been buffered while the agent was busy.
  2. Clears/discards all queued messages so they do not execute.
  3. Provides clear feedback: e.g. "Cleared 3 queued messages."

Optionally, also support a /queue list subcommand (or have /queue cancel with no arguments show the queue first, prompting for confirmation).

Implementation sketch

  • Extend the queue/buffer management in the CLI input handler and gateway session dispatch to expose a clear_queue() method.
  • Add /queue cancel and /queue list to the command parser (likely in hermes_cli/commands.py and gateway command routing).
  • When /queue cancel is issued, drain the pending message buffer and print confirmation.
  • The cancel command itself should never be queued — it must be processed immediately, similar to /stop.

Relationship to existing proposals

A comprehensive auto-queue proposal exists in #13072 that covers queue management as part of a larger feature. This request is intentionally smaller in scope — just the ability to clear the pending queue, which could serve as a foundation for the broader feature or be implemented independently as a quick usability improvement.

Expected behavior

[Agent is processing a long task...]
User types: "actually, ignore that"
User types: "check the logs instead"

Agent completes current turn.

[Currently — both messages execute in sequence]
[Proposed — user can cancel before they execute]

User types: /queue list
> 3 messages queued:
>   1. "actually, ignore that" (pending)
>   2. "check the logs instead" (pending)

User types: /queue cancel
> Cleared 2 queued messages. Queue is now empty.

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…

FAQ

Expected behavior

[Agent is processing a long task...]
User types: "actually, ignore that"
User types: "check the logs instead"

Agent completes current turn.

[Currently — both messages execute in sequence]
[Proposed — user can cancel before they execute]

User types: /queue list
> 3 messages queued:
>   1. "actually, ignore that" (pending)
>   2. "check the logs instead" (pending)

User types: /queue cancel
> Cleared 2 queued messages. Queue is now empty.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING