[FEATURE] The ability to queue up messages.via asking the user for further info on user input.
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
This is close to a dup (not truly, as as you'll see below I have a twist on the following request- https://github.com/anthropics/claude-code/issues/535 - where it is stated in the ticket that there is a fix but it seems to have ended up in the great bit bucket in the sky.
Basically the goal is to have a feature similar to cursor's - namely to be able to queue up messages for claude to work on rather than replace the current workflow. As.it stands I am trying to push for claude code in my work but when I get messages like 'hey - my workflow was interrupted what's going on?.. and 'I just wasted HOW many hours because claude did WHAT when I told it to do this additional task?'. this does not make my job easy.
Basically the idea is this. When you type an additional instruction for claude while it is working on something currently, instead of going ahead and killing its current thought process as currently exists, it asks you a clarifying question:
Do you want to (s)top the current workflow or (q)ueue up a new task?
And it replaces or queues as necessary. That way it gets rid of the ambiguity in the prompt. As it stands, it is not clear here whether you are actually wanting to replace the current task or add to it. Adding this prompt gets rid of the ambiguity adds and extra feature to claude code, and makes the user's intent clear.
@8enmann - you said that you had a fix for this in issue 535. I must be missing something here, but I can't imagine that this would be too much effort and would love to provide a patch.
Proposed Solution
Basically the idea is this. When you type an additional instruction for claude while it is working on something currently, instead of going ahead and killing its current thought process as currently exists, it asks you a clarifying question:
Do you want to (s)top the current workflow or (q)ueue up a new task?
And it replaces or queues as necessary. That way it gets rid of the ambiguity in the prompt. As it stands, it is not clear here whether you are actually wanting to replace the current task or add to it. Adding this prompt gets rid of the ambiguity adds and extra feature to claude code, and makes the user's intent clear.
@8enmann - you said that you had a fix for this in issue 535. I must be missing something here, but I can't imagine that this would be too much effort and would love to provide a patch.
Alternative Solutions
You can emulate this by telling claude to write to a done file when completed in your request in one window, then spawning up another claude instance and adding something like:
first, wait until this done file exists. Then, do the following.
But this is inadequate. the second claude instance doesn't contain the first claude instance's context for one. Second its iffy because it requires the user to think ahead of time to put this statement in, and it isn't bulletproof because it isn't a hardcoded instruction.
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
Example scenario:
I'm telling claude to monitor a production run for anomalous occurances.
I get about an hour in, and remember that I forgot to tell claude to do something afterwards (clean up the filesystem, etc)
I'm now stuck either with restarting the prompt from scratch, or somehow jerry-rigging a method of spawning claude to do the extra work by watching for the end of a process in the process table, or what not.
Additional Context
Please fix this promptly. Its been sitting here for about a year now, with several people commenting on and saying how great this feature would be to have. Again, maybe I'm missing something but I'm having a hard time thinking of how this could be a difficult fix to make.
18 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate. The first feature request does not give a specific mechanism for providing this functionality, wheras this ticket does.
The second two feature requests listed have to do with vscode extensions. I don't see why this feature would need to be limited to vscode - having a simple, disambiguating question here when typing input would be a simple method to make this available everywhere, on all platforms that claude code supports.
Please fix this. You guys have competition enough, I love claude code and many thanks for it, but its hard to defend it when it has blindspots like this that have been around for this long without actually being addressed in the face of quite a bit of end-user demand.
again, I'm tagging @8enmann as the owner of this, and I'm asking for a fix for this.. Please.
in addition @claude, I'd like to get your take on my above comment. looking at the original feature request and comparing it to cursor and codex, what are your takes? do you still think this is a dup or no?
could you comment here please?
strongly +1 on this. wanted to add some cross-reference context and a concrete ux precedent that already ships in production.
codex cli already solved this with two keybindings
openai's codex cli has first-class support for exactly this problem with a simple, explicit ux:
| key | action | what happens |
|-----|--------|-------------|
| enter (while agent is busy) | steer | injects your message into the current turn at the next natural breakpoint — the agent adjusts course without stopping |
| tab (while agent is busy) | queue | appends your message to a fifo buffer — current task finishes uninterrupted, then queued message runs next |
| esc | interrupt | hard stop, aborts current generation |
this is documented at the official codex cli features page. the key insight is that steer and queue are two fundamentally different user intents, and conflating them (which is what claude code currently does) leads to exactly the problems described in this issue — interrupted workflows, lost context, wasted hours.
there's also a great taxonomy in this blog post that breaks it into three modes:
claude code currently has a rough form of boundary-aware queuing (messages get inserted at breakpoints), but the ux around it is ambiguous — as the op describes, it's unclear whether you're replacing the current task or adding to it. codex's explicit enter/tab split eliminates that ambiguity entirely.
this has been requested for a year
for the anthropic team's visibility — this is one of the most persistently requested features across the project's history:
that's 9+ issues spanning 12 months, all describing the same core problem: there's no clear, intentional distinction between "interrupt this task" and "do this next."
minimal viable fix
the op's
(s)top / (q)ueueprompt would work, but codex's approach is even lower friction — no prompt needed, just different keys. a minimal implementation:[1 queued])this would bring claude code to parity with codex on a feature that directly impacts whether teams can adopt it for real workflows — which is exactly the op's situation.
Adding novel suggestions from #36817 (which should be considered a sub-request of this issue):
Additional UX requests (from #36817)
The core queue-or-stop clarification requested here is great, but once a queue exists, there's a further gap: no visibility or control over what's queued.
Specific additions:
Why it matters (Cursor parity)
Cursor surfaces the pending message queue prominently with inline controls. Without this, users are stuck either waiting for the full task to finish or hitting Escape (which cancels everything) with no selective control.
Related
Adding a more code-level Codex reference here, using
openai/codexbranchmainat commite838645fa264ef108bb66b74ad284224d2a10ac0.I checked that revision locally and traced the queue path end to end. The useful part is that this is not just a docs claim. Codex has a concrete TUI/data-flow implementation for it.
1. The behavior contract is explicit in the docs
Composer note
This matters because it separates two user intents at the input-contract level, before getting into any queue internals.
2. The split is wired directly into the composer state machine
Composer routing
Busy key handling
This is the part I think is especially reusable: queuing is a first-class branch in the TUI input state machine, not a prompt-layer workaround.
3. Codex keeps steer state separate from queued-follow-up state
Queue state
Ordering logic
This is a strong design signal. Codex does not collapse everything into one ambiguous "pending input" bucket.
It distinguishes at least three cases:
That separation seems directly relevant to Claude Code, where the ambiguity between "interrupt", "steer", and "do this next" is the root problem.
4. The queue is real FIFO state, not just UI decoration
Queued result -> enqueue
Queue push/send
Next turn start
Drain next queued input
So this is a normal, inspectable FIFO pipeline: queue while busy, then promote exactly one queued input into the next turn.
5. Codex also exposes queued state in the UI and lets the user edit it
Pending preview widget
Queued preview rendering
Edit last queued message
That is useful because once a queue exists, users also need visibility and control over what is queued.
6. The behavior is pinned by tests
Tab queues while busy
Interrupt restores queued messages
Edit-most-recent queued message
Rejected steers ordered ahead of later queued drafts
That is why I think this issue is better framed as a concrete implementation gap, not just a UX wishlist.
The most reusable ideas from Codex seem to be:
If Anthropic wanted a pragmatic first step, I would start from that decomposition rather than only adding a one-off clarification prompt.
For anyone who wants to reproduce the trace, mine was:
docs/tui-chat-composer.md->bottom_pane/chat_composer.rs->chatwidget.rs->bottom_pane/pending_input_preview.rs-> related tests.well, you banned third-party harness (Pi has follow-up msg), so no you have to fix it.
we really need this feature, most coding agents have it
I am not sure this is an exact match but I wrote this plugin that allows to queue messages.
They are auto inputted into your Claude sessions once it is idle: https://github.com/ncvgl/claude-prompt-queue/tree/main
I agree it is a missing feature that Codex has and they should add it eventually
It is becoming really annoying not to have this feature. Codex has much more advanced feature. Please implement this!
The ambiguity problem described here (queue vs. steer vs. interrupt) goes away when queue and steer are explicit, separate actions in the UI.
I built pikiclaw — it provides a web dashboard for managing Claude Code, Codex, and Gemini sessions. Messages sent while a task is running are queued by default. From the dashboard you can:
No disambiguation prompt needed — the intent is clear because queue and steer are distinct buttons, not overloaded on the same text input.
+1 — pure queue (no steering) behavior is still missing
I currently use Codex. I cannot use Claude Code as my primary CLI until this is fixed.
In Codex:
Tabwhile the agent is busy = pure FIFO queue. The current task finishes uninterrupted, then the queued follow-up runs as the next independent turn.Enterwhile the agent is busy = steer / mid-turn injection.That split is predictable. It supports long-running sessions where I can queue multiple follow-ups ahead of time without babysitting the agent.
Current Claude Code behavior does not provide that split:
Enterwhile busy appears to route into the queued-command path and usually defers until a later boundary.Tabis still used for autocomplete, suggestions, or permission cycling, not queue.That ambiguity is the blocker. For long-running tasks, I need to know with certainty whether I am:
Without that distinction, I cannot safely use Claude Code for workflows like:
Minimal change needed:
Tabwhile busy -> explicit pure queue, FIFO deferral, no mid-turn injectionEnterwhile busy as the steering path, or make the split configurableQueued — runs after current taskvsSteeringThe queueing infrastructure already exists. What is missing is the explicit, reliable, no-steering hotkey path.
The implementation should be split across
claude-code/src/components/PromptInput/PromptInput.tsx,claude-code/src/utils/handlePromptSubmit.ts, andclaude-code/src/screens/REPL.tsx, with a small optional type update inclaude-code/src/types/textInputTypes.ts.The key behavior change is:
Tabwhile Claude is busy should become an explicit pure queue action, not steering.Enterwhile busy should keep the current steering / mid-turn behavior.priority: 'later'.Queued — runs after current taskversusSteering.claude-code/src/utils/messageQueueManager.tsprobably does not need a rewrite, since it already has thenextvslaterqueue semantics.ya'll need to understand that they obviously know about this since it has been requested for a long time and they dog food their own stuff, and that therefore they must necessarily have made a conscious decision not to implement this, but they cannot say it publicly because the reason would make them look bad or otherwise have to lie
I suspect they just want to disincentivise AFK claude coding because it will reduce the strain on their compute
Meanwhile Codex launches /goal
No real queue, but added goal. Makes sense 😅
recently started using pi.dev, deliberately minimal coding harness, but even they include "alt+enter" for queueing messages, in addition to plain enter (steer), out of the box...
Agreed the real fix is the explicit native split — Codex's
Tab=queue /Enter=steer /Esc=interrupt,where a queued message auto-runs as the next turn once the current one finishes. That's what most of this
thread wants and nothing third-party fully replaces it.
For the narrower moment in your example though — "an hour in, remembered I need a cleanup step afterward"
— here's a stopgap. Disclosure: I wrote a small open-source plugin called valet, so treat this as an
author plug.
/valet:park <text>captures the follow-up. A UserPromptExpansion hook blocks the turn before the modelsees it, so the capture costs zero tokens and never enters the running task's context.
/unparklater opens a native picker; you select the parked item and it becomes the next turn.Limitation relative to your ask: it's manual, not auto-FIFO. It will NOT fire on its own when the current
task ends — you trigger it with
/unpark. So it covers "don't lose the follow-up, don't interrupt therun, don't burn context," not "run it automatically while I'm AFK."
https://github.com/YeautyYE/claude-valet