Skip to content

TUI: per-message revert does not dequeue a queued message; it stays in queue and is also copied to the prompt input #28843

@L0GYKAL

Description

@L0GYKAL

Summary

In the TUI (opencode 1.14.50), clicking the per-message revert button on a message that is currently in the queue does not actually remove it from the queue. Instead, the message ends up in two places: it stays in the queue and is copied into the prompt input/composer. The next time the queue is drained it gets sent again, even though the user explicitly reverted it.

This is the opposite of the user's intent when pressing revert on a queued message: "remove this from the queue, I don't want it sent."

Repro

  1. Start an opencode session in the TUI.
  2. Send message A — the model begins responding.
  3. While the response is streaming, type and send message B — it goes into the queue (visible queue indicator).
  4. Press the per-message revert button on message B.

Actual

  • Message B remains in the queue (still scheduled to send when A finishes).
  • Message B's text is also copied into the prompt/composer input.
  • When A's turn ends, B is sent anyway.

Expected

  • Reverting a queued message dequeues it.
  • It should not also be copied into the composer (that's a separate "edit" affordance, not "revert").
  • If the user wants to recover the text, "revert" should leave it on a draft history, not silently re-arm it for sending.

Why this matters

This is a silent surprise-send: the user took an explicit action to cancel a message, and opencode sent it anyway. For destructive prompts (e.g. "delete X", "run migration") this is exactly the kind of accidental execution the revert affordance exists to prevent.

Environment

  • opencode 1.14.50
  • TUI client
  • Linux (Fedora 44)

Related (not duplicates)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions