undo does not undo todo list, resulting in agents continuing on the same path as the undo #2697

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

Originally created by @riatzukiza on GitHub (Nov 8, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description
Undo does not revert the todo list. After an undo, agents continue following the pre-undo plan instead of the reverted state.

Steps to reproduce

  1. Create or modify a todo list via the agent
  2. Trigger an undo of the last step
  3. Observe that the todo list is not rolled back and agents continue with the old plan

Expected behavior

  • Undo should also restore the todo list to its prior state; agents resume using the rolled-back plan

Actual behavior

  • Todo list remains unchanged; agents continue on the same path as before the undo

Impact

  • Agents repeat undesired actions and waste time; user intent not respected

Workaround

  • Manually clear or replace the todo list after undo

Environment

  • OpenCode version: 1.0.45
  • OS/Terminal: please fill
Originally created by @riatzukiza on GitHub (Nov 8, 2025). Originally assigned to: @rekram1-node on GitHub. Description Undo does not revert the todo list. After an undo, agents continue following the pre-undo plan instead of the reverted state. Steps to reproduce 1. Create or modify a todo list via the agent 2. Trigger an undo of the last step 3. Observe that the todo list is not rolled back and agents continue with the old plan Expected behavior - Undo should also restore the todo list to its prior state; agents resume using the rolled-back plan Actual behavior - Todo list remains unchanged; agents continue on the same path as before the undo Impact - Agents repeat undesired actions and waste time; user intent not respected Workaround - Manually clear or replace the todo list after undo Environment - OpenCode version: 1.0.45 - OS/Terminal: please fill
Author
Owner

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

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

  • #2612: minor fix : /undo after a agent did some task does undo the work of that agent but doesnt removes the agents tab - This deals with incomplete undo behavior when agents are involved
  • #2642: [bug] /undo removed the last message, but didn't revert the code edit - Similar issue where undo doesn't fully revert state (files vs. messages)

While these aren't exact duplicates, they both involve incomplete undo functionality where some parts of the application state are not properly reverted. Your issue specifically focuses on the todo list not being reverted, which appears to be a related but distinct aspect of the broader undo state management problem.

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

@github-actions[bot] commented on GitHub (Nov 8, 2025): This issue might be a duplicate of existing issues. Please check: - #2612: minor fix : /undo after a agent did some task does undo the work of that agent but doesnt removes the agents tab - This deals with incomplete undo behavior when agents are involved - #2642: [bug] /undo removed the last message, but didn't revert the code edit - Similar issue where undo doesn't fully revert state (files vs. messages) While these aren't exact duplicates, they both involve incomplete undo functionality where some parts of the application state are not properly reverted. Your issue specifically focuses on the todo list not being reverted, which appears to be a related but distinct aspect of the broader undo state management problem. Feel free to ignore if none of these address your specific case.
Author
Owner

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

ill check it out

@rekram1-node commented on GitHub (Nov 8, 2025): ill check it out
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2697