claude-code - 💡(How to fix) Fix Add /cancel to clear queued messages without interrupting the running task

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…

Root Cause

A /cancel slash command. Because the command itself enters the queue, the natural semantics are "drain everything queued ahead of me, leave the running task alone" — which is also the most common intent (clear the queue, keep the work).

RAW_BUFFERClick to expand / collapse

Problem

When Claude is working, follow-up messages typed in the CLI get queued. There's currently no way to remove a queued message without pressing Esc — which interrupts the in-progress task, not the queue. That's the opposite of what you want when you only meant to retract something you typed ahead.

The desktop apps already solve this: each queued message has an x to remove it. The CLI has no parity.

Proposal

A /cancel slash command. Because the command itself enters the queue, the natural semantics are "drain everything queued ahead of me, leave the running task alone" — which is also the most common intent (clear the queue, keep the work).

Optional finer-grained variants:

  • /cancel-last — drop only the most recently queued message
  • /cancel <n> — drop the nth queued item

A slash command sidesteps the keybinding collision that likely caused Esc to be overloaded onto "interrupt" in the first place — it has no ambient meaning to clobber.

Prior art / related

Same request, all closed without resolution (dupe / not-planned / inactivity):

  • #55737
  • #6147
  • #36817

Filed from the CLI by Claude Code (https://claude.com/claude-code), on behalf of (and with) @gesslar — who would quite like to cancel a queued message someday.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING