Undo command doesn't allow editing reverted message like keyboard shortcut #2584

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

Originally created by @ElghaziBrahim on GitHub (Nov 4, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

There's an inconsistency between the undo keyboard shortcut and the /undo command regarding the state of reverted messages.

Expected Behavior

When undoing a message (whether via keyboard shortcut or /undo command), the reverted message should be editable, which was a useful feature.

Actual Behavior

  • Keyboard shortcut (Ctrl+X U): Works correctly - allows editing the reverted message
  • Command (/undo): Makes the message empty instead of allowing editing

OpenCode version

1.0.20

Steps to reproduce

  1. Send a message to the agent
  2. Wait for the agent to finish responding to your message
  3. Use the /undo command to revert the sent message
  4. The sent message becomes empty instead of being editable
  5. Alternatively, use the keyboard shortcut (Ctrl+X U) instead of /undo
  6. The sent message becomes editable - this works as expected

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04.3 LTS

Terminal

Ghostty

Originally created by @ElghaziBrahim on GitHub (Nov 4, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description There's an inconsistency between the undo keyboard shortcut and the `/undo` command regarding the state of reverted messages. ## Expected Behavior When undoing a message (whether via keyboard shortcut or `/undo` command), the reverted message should be editable, which was a useful feature. ## Actual Behavior - **Keyboard shortcut (Ctrl+X U)**: Works correctly - allows editing the reverted message - **Command (`/undo`)**: Makes the message empty instead of allowing editing ### OpenCode version 1.0.20 ### Steps to reproduce 1. Send a message to the agent 2. Wait for the agent to finish responding to your message 3. Use the `/undo` command to revert the sent message 4. The sent message becomes empty instead of being editable 5. Alternatively, use the keyboard shortcut (Ctrl+X U) instead of `/undo` 6. The sent message becomes editable - this works as expected ### Screenshot and/or share link _No response_ ### Operating System Ubuntu 24.04.3 LTS ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 17:36:20 -05:00
yindo closed this issue 2026-02-16 17:36:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2025):

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

  • #3801: Reports that after undo, the previous prompt is missing in textbox (same core issue about undo command not restoring editable message)
  • #3368: Reports that /undo doesn't put previous prompt in the input box (identical issue description)

Both of these issues describe the same problem you're reporting - that the /undo command doesn't restore the message for editing like the keyboard shortcut does.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 4, 2025): This issue might be a duplicate of existing issues. Please check: - #3801: Reports that after undo, the previous prompt is missing in textbox (same core issue about undo command not restoring editable message) - #3368: Reports that /undo doesn't put previous prompt in the input box (identical issue description) Both of these issues describe the same problem you're reporting - that the /undo command doesn't restore the message for editing like the keyboard shortcut does. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

fixed https://github.com/sst/opencode/commit/927566586850717aa3f722170f04652723049f07

@rekram1-node commented on GitHub (Nov 4, 2025): fixed https://github.com/sst/opencode/commit/927566586850717aa3f722170f04652723049f07
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2584