Repository navigation
[FEATURE]: Add ability to unqueue messages #4821
Description
Activity
- addeddiscussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion
on Nov 27, 2025 github-actions commented
on Nov 27, 2025 on Nov 27, 2025 – with GitHub ActionsContributorMore actionsThis issue might be a duplicate of an existing feature request. Please check:
- [FEATURE] Clone / Branch a Session #3000: [FEATURE] Clone / Branch a Session - mentions using /undo on branched sessions, which is related to the ability to undo or revert messages
Feel free to ignore if this addresses a different specific case.
Reacted by Dulanga Jayawardena@Mishkun would the ability to /undo a queued message be good?
@rekram1-node I guess so
@Mishkun would the ability to /undo a queued message be good?
Yes, I second that. Clicking on it and "revert"ing it was my first instinct - principle of least surprise.
i guess i didnt see the note about clicking yeah rhat should be fine too
It would be nice to do something similar to Claude Code where if you hit UP if the latest message is in queue then it pulls it out of queue and into your prompt. Gives you a chance to modify it or simply CTRL+C to clear it out.
Reacted by ormandj, lenstr, Adam Spiers, Ajay Krishnan, Levi Figueira, Nico Zessoules, Wahlburg, Dobes Vandermeer, Hadrien, Drewry Pope and 15 moreReacted by Joscha Götzer, David Torbeck, Ajay Krishnan, Nico Zessoules, Arsalankhan315, Dobes Vandermeer, 7heMech, Matthew Kernes and Dulanga JayawardenaI think I like that better, very good suggestion!
Me too. But clicking on it should then either be disabled, host fewer options, or the revert should still do something useful.
There could be both scenarious supported: mouse-centric (clicking the message) and keyboard-centric
Reacted by Art Shendrik, Benoit de Chezelles and Evatt Harvey-SalingerReacted by Art Shendrik and Evatt Harvey-SalingerI like the way Codex implements this. When you hit up arrow it dequeues and allows you to edit. It's not idea, but it is better than not being able to dequeue or edit the queued messages.
Reacted by Dobes Vandermeer, bbeaupain2, Evatt Harvey-Salinger, Sergey Kostrukov, pry, Denis K, BrianAguilarWasco, Alexey Shevchenko, Amanpreet Singh, Drewry Pope and 11 moreThis would be so useful, especially in a Github Copilot situation where that queued message is a wasted premium request staring me in the face
☹️ Reacted by Benoit de Chezelles, Scott Little, Mustafa Rasheed and Andrey BaksalyarJust throwing my vote in for this being a necessary feature
Reacted by Albert Li, Fan Jin, Scott Little, ozgur, Nick DiZazzo and Andrey Baksalyarin the game of LLM, they can't even implement basic functionality, LE MAO
Reacted by inknight, bgm370x and uriva5 remaining items
@rekram1-node updates?
Reacted by Andrey BaksalyarStill not implemented? The absence of such a basic thing is really annoying, guys!
Reacted by emagon, Abner Augusto Souza, Bd, Adam Spiers, sleepless, Adnan AlBeda, Talha Ahmed and 7heMechBumping as this seems like low-lift high QOL changes, pls guys. Happy to implement it if that can help.
I nearly opened a new issue for this issue again, but when looking through the backlog I found a jungle of issues and PR's and I ran a research task to aggregate everything I could find, because I don't think this encourages anyone to pick any of this up again, this issue has been open since Nov 27, 2025. In that time, four contributors independently built implementations — all auto-closed without maintainer review. Before a fifth attempt starts, it's worth knowing what already exists, or if one of these could be actually used.
There also seems to be misunderstanding about what/undois supposed to do (revert actual code or only undo the last queued message?)
Anyway, I'm sorry if this comment seems belittling or something, I genuinely wanted to get an overview of what's hanging and preventing this from getting fixed.What was previously built, but never really merged:
PR #6271 (@anntnzrb, Jan 2026) — most architecturally complete TUI implementation:
<leader>ito edit last queued message,<leader>dto discard- New API endpoints:
GET/DELETE /session/:id/queue/:msgID - File and image attachment preservation on edit
- Visual EDITING badge in prompt
- Closed by author after 3 rebases. Zero maintainer feedback.
PR #24471 (@mortenfc, May 2026) — most complete cross-surface implementation:
- Edit and cancel queued messages (X button + UP arrow)
steermode: inject queued message into current LLM turn immediatelywrapmode: finish current step then halt- Works in TUI and desktop/web
- 38 commits. Author confirmed still working on it when bot auto-closed it. Community asked for reopen in June 2026.
PR #27399 (@veenified, Jun 2026) — Cancel button via SDK in message dialog. Auto-closed 2 weeks before this comment.
PR #5415 (@sachnun) — UP arrow to pull queued msg back into composer. Auto-closed.
Related bugs not fixed:
- Queued bugging (duck the bug) #3623 — cancel kills BOTH running task and queued task (should only kill running)
- BUG: Compact + Queue interaction #2609 —
/compactwhile queued fires the queued message immediately (isBusy()misses compacting state) - [FEATURE]: Graceful handling of queued messages after session interrupt #5333 — queued messages silently dropped on session interrupt (open, working fork branch exists:
feat/queued-message-interrupt) - Undo stopped the running operation instead of removing just the last queued message. #7196 —
/undowith a queued message kills the active operation instead of dequeuing (these need to be separate operations)
The ask:
Can PR #6271 or #24471 get maintainer eyes before being rebuilt a fifth time? If the approach is wrong, a rejection comment would save the next contributor significant effort. If the approach is right, both implementations are close to mergeable.
@rekram1-node — you're assigned to both this issue (#4821, unqueue) and the
/undorevert bugs (#5474, #7196, #7282). A question on the intended contract: should/undoever operate on queued messages, or is it strictly for completed turns? Right now,/undowith a queued message in the buffer kills the active operation instead of dequeuing (#7196) — which seems like an accident rather than a design decision. Clarifying this would unblock both tracks: contributors building queue controls would know not to wire through/undo, and contributors fixing the revert behavior would have a clear scope. What's the intended behavior?
Full reference map — all related issues and PRs:
# Type Title Status Author #4821 Issue Add ability to unqueue messages Open @Mishkun #5333 Issue Graceful handling of queued messages after session interrupt Open @thoughtlesslabs #5474 Issue /undo only rolls back conversation, not file changes Open @sdivens #6942 Issue Edit queued message prompts Closed: not planned @aspiers #8685 Issue Better controls/UX for queued messages Closed @art-shen #20090 Issue How do you dequeue a message? Closed: not planned @david-saint #21906 Issue prompts queue + change, cancel and forward Closed: not planned @Leohanhart #24298 Issue Allow forcing immediate reading of queued messages (Steering) Closed: not planned @omatheusmesmo #3623 Issue Queued bugging — cancel kills both running + queued task Closed ghost #2609 Issue BUG: Compact + Queue interaction Closed @neriousy #5770 Issue force push message keybind Closed: not planned @mynameistito #7196 Issue Undo stopped running operation instead of removing queued message Closed: not planned @vimulatus #4548 Issue /undo does not update Modified Files list Closed @fwang #7282 Issue TUI /undo cannot roll back code version Closed @ANIAN0 #8098 Issue /undo just undo conversation, not file Closed @ERAIT #14290 Issue "undo" is not working properly Closed: not planned @jsxzhub #10287 Issue Critical bug: revert undo reverts to weeks-old state (~1300 lines deleted) Closed @Genrie9 #13481 Issue /dev/null shown when reverting message with file creation Closed: not planned @OpeOginni #5415 PR feat(tui): cancel queued messages with history_previous Closed (auto, Feb 10 2026) @sachnun #6271 PR feat(tui): add edit and discard actions for queued messages Closed by author (Jan 8 2026) @anntnzrb #24471 PR feat: Add queued message editing, steering, and wrap-up behavior Closed (auto, May 26 2026) @mortenfc #27399 PR feat(opencode): Add "Cancel" action on Message Actions Dialog Closed (auto, Jun 14 2026) @veenified Reacted by pomp, caedium, Adam Spiers, stanley, Doncho N. Gunchev, Avinash Thakur, sleepless, Krish Chowdhary, Jordan Christensen, Yuri Zoel Brasil and 5 moreReacted by Brett VanderVeen, Cameron Gagnon, stanley, Chris Lasher, Doncho N. Gunchev, Herko Lategan, Yuri Zoel Brasil and 7heMechReacted by Kyle Manna, 7heMech and Leon SilcottAny update? I think this is something a lot of people want as a feature.
Reacted by Krish Chowdhary, gio, Jordan Christensen, Dan Berry, Pedro Cardoso da Silva, Yuri Zoel Brasil, Aleksandr Voronkov, Eibar Ibanez, 7heMech, Joscha Götzer and 3 moreAny updates? Pretty important feature which is available in all the other coding harnesses.
Reacted by Leonardo Crociani, 7heMech, Dulanga Jayawardena and Andrew NewellIs this hard to do??? what if I did a PR? but then again looking at how many it's probably gonna be ignored.
It would be nice to do something similar to Claude Code where if you hit UP if the latest message is in queue then it pulls it out of queue and into your prompt. Gives you a chance to modify it or simply CTRL+C to clear it out.
This would be good
I feel like it's time to fork this crap anyway
This is a critical feature to have, and one of the main reasons I avoid OC at the moment. There have been 4-5 PRs implementing this already, all closed?
I agree. Hitting "undo previous message" fully stops whatever process was going, even though you're only stopping the queued message. Then you have to tell the model to "proceed" or whatever to get it to pick up where it left off (if it can).
Reacted by Kyle MannaNot really a solution but using openchamber allows you to unqueue messages while using opencode under the hood.
- added a commit that references this issue
on Sep 23, 2026 Queued messages can now be cancelled in OpenCode v2. A prompt you send while the agent is busy waits in the session inbox until it's delivered, and you can remove it before then: select the pending message in the TUI and choose Delete, or call the
session.inbox.cancelAPI.Added in #42109; the first version came in #40922.
Closing as completed. If something doesn't work on v2, please open a new issue.
Reacted by pomp
Feature hasn't been suggested before.
Describe the enhancement you want to request
Right now If I queue message there is no way to "unqueue" it. Sometimes I overcorrect the agent and It invents the fix simualteniously with me so I end up wasting its attention by parroting the solution. I want to be able unqueue the message. e.g. by clicking on it