Copy last assistant message does not respect revert operation #3632

Closed
opened 2026-02-16 17:40:57 -05:00 by yindo · 2 comments
Owner

Originally created by @assagman on GitHub (Dec 17, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

"Copy last assistant message" does not respect revert operation.

Reverted messages are preserved for "redo" operation, but when users want to copy the last assistant message after reverting some messages, it copies the first reverted message (the last message in the conversation history if it wouldn't reverted).

OpenCode version

1.0.164

Steps to reproduce

  1. send message_1
  2. send message_2
  3. send message_3
  4. undo
  5. undo
  6. copy last message

Step 6 copies message_3 but I think the expected behavior is copying message_1 because all the messages after message_1 were reverted.

Screenshot and/or share link

No response

Operating System

macOS Tahoe 26.2 arm64

Terminal

Ghostty

Originally created by @assagman on GitHub (Dec 17, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description "Copy last assistant message" does not respect revert operation. Reverted messages are preserved for "redo" operation, but when users want to copy the last assistant message after reverting some messages, it copies the first reverted message (the last message in the conversation history if it wouldn't reverted). ### OpenCode version 1.0.164 ### Steps to reproduce 1. send message_1 2. send message_2 3. send message_3 4. undo 5. undo 6. copy last message Step 6 copies **message_3** but I think the expected behavior is copying message_1 because all the messages after message_1 were reverted. ### Screenshot and/or share link _No response_ ### Operating System macOS Tahoe 26.2 arm64 ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:40:57 -05:00
yindo closed this issue 2026-02-16 17:40:57 -05:00
Author
Owner

@assagman commented on GitHub (Dec 17, 2025):

PR: https://github.com/sst/opencode/pull/5705

@assagman commented on GitHub (Dec 17, 2025): PR: https://github.com/sst/opencode/pull/5705
Author
Owner

@github-actions[bot] commented on GitHub (Dec 17, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4186: "revert message" should place reverted message in the prompt input (related issue about revert operation behavior)
  • #658: feature request: Add "copy" button to tool results and assistant messages
  • #2118: Add a /copy command to copy latest message (or allow scrolling while selecting text)

These issues discuss related copy and revert functionality that may help provide context for your specific case.

@github-actions[bot] commented on GitHub (Dec 17, 2025): This issue might be a duplicate of existing issues. Please check: - #4186: "revert message" should place reverted message in the prompt input (related issue about revert operation behavior) - #658: feature request: Add "copy" button to tool results and assistant messages - #2118: Add a /copy command to copy latest message (or allow scrolling while selecting text) These issues discuss related copy and revert functionality that may help provide context for your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3632