minor fix : /undo after a agent did some task does undo the work of that agent but doesnt removes the agents tab ( still can access with ctrl + left /right arrow) #1725

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

Originally created by @aptdnfapt on GitHub (Sep 15, 2025).

Originally assigned to: @adamdotdevin on GitHub.

/undo after an agent did some task does undo the work of that agent but doesn't remove the agent's tab (still can access with Ctrl + left/right arrow).
To test this in OpenCode, tell the main agent to spawn a sub‑agent to make a random comment. (During this time you can see what the agent is doing using Ctrl + left/right arrow.)
Then when the agent is done, type /undo and the edit of that agent will be gone, which is expected, but then if you press Ctrl + left/right arrow, it will still show that chat. This is not intended, right?

Originally created by @aptdnfapt on GitHub (Sep 15, 2025). Originally assigned to: @adamdotdevin on GitHub. /undo after an agent did some task does undo the work of that agent but doesn't remove the agent's tab (still can access with Ctrl + left/right arrow). To test this in OpenCode, tell the main agent to spawn a sub‑agent to make a random comment. (During this time you can see what the agent is doing using Ctrl + left/right arrow.) Then when the agent is done, type /undo and the edit of that agent will be gone, which is expected, but then if you press Ctrl + left/right arrow, it will still show that chat. This is not intended, right?
yindo closed this issue 2026-02-16 17:32:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 15, 2025):

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

  • #2575: undo doesnt removes the context? - discusses /undo behavior not properly removing context and causing the model to be stuck on old context
  • #1447: bug: undo w/ message edit & resend causes AI_APICallError - addresses undo functionality issues with message handling
  • #1449: clarification: expected behavior of share links when doing undo & redo - explores expected undo behavior in conversation management

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

@github-actions[bot] commented on GitHub (Sep 15, 2025): This issue might be a duplicate of existing issues. Please check: - #2575: undo doesnt removes the context? - discusses /undo behavior not properly removing context and causing the model to be stuck on old context - #1447: bug: undo w/ message edit & resend causes AI_APICallError - addresses undo functionality issues with message handling - #1449: clarification: expected behavior of share links when doing undo & redo - explores expected undo behavior in conversation management Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 15, 2025):

seems like that shouldn't be intended

@rekram1-node commented on GitHub (Sep 15, 2025): seems like that shouldn't be intended
Author
Owner

@OpeOginni commented on GitHub (Sep 15, 2025):

Im Taking a look at this issue and noticed 2 things.

  • The same issue comes up when checking session timelines, you can see messages that were reverted, is this also intended? if not I have already made a fix for it.
  • The child sessions are only given the parent session ID, idealy we can add a parent message ID as well, so before navigating using the keybindings it checks if the parent message was reverted and if so its not going to be navigated to.
    • Also cleaning of the reverted message will clear the child session as well.

What do you think @rekram1-node?

@OpeOginni commented on GitHub (Sep 15, 2025): Im Taking a look at this issue and noticed 2 things. - The same issue comes up when checking session timelines, you can see messages that were reverted, is this also intended? if not I have already made a fix for it. - The child sessions are only given the parent session ID, idealy we can add a parent message ID as well, so before navigating using the keybindings it checks if the parent message was reverted and if so its not going to be navigated to. - Also cleaning of the reverted message will clear the child session as well. What do you think @rekram1-node?
Author
Owner

@OpeOginni commented on GitHub (Sep 15, 2025):

Tested this solution and it works well, happy it handles deleting of child sessions when the trigger message was "COMPLETELY" reverted without way of coming back. But then again might not be what should be intended.

Update or feedback on this is welcomed, and apologies if I went a bit much with the changes (touching schema), couldn't wait for confirmation before working on a solution 😅

@OpeOginni commented on GitHub (Sep 15, 2025): Tested this solution and it works well, happy it handles deleting of child sessions when the trigger message was "COMPLETELY" reverted without way of coming back. But then again might not be what should be intended. Update or feedback on this is welcomed, and apologies if I went a bit much with the changes (touching schema), couldn't wait for confirmation before working on a solution 😅
Author
Owner

@rekram1-node commented on GitHub (Sep 15, 2025):

@adamdotdevin what is the expected UX here?

@rekram1-node commented on GitHub (Sep 15, 2025): @adamdotdevin what is the expected UX here?
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1725