undo doesnt removes the context ? #1701

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

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

so i sent this prompt first (prompt that is on screen) and then it came up with a plan and then i told it to send @grok sub agent to work on that plan . but in mid way of doing that i understood that im in wrong branch so i just did /undo /undo so now im back to 1st prompt . after changing the branch i send that prompt again but this time model seems to be stuck on the old context and send the grok agent anyway

Image
Originally created by @aptdnfapt on GitHub (Sep 12, 2025). so i sent this prompt first (prompt that is on screen) and then it came up with a plan and then i told it to send @grok sub agent to work on that plan . but in mid way of doing that i understood that im in wrong branch so i just did /undo /undo so now im back to 1st prompt . after changing the branch i send that prompt again but this time model seems to be stuck on the old context and send the grok agent anyway <img width="1354" height="644" alt="Image" src="https://github.com/user-attachments/assets/e2262d69-7226-49a6-942b-0e67972be924" />
yindo closed this issue 2026-02-16 17:32:15 -05:00
Author
Owner

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

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

  • #2324: Cancelling causes context loss - similar context management issues during operations
  • #2171: Are interrupted messages lost from the context? - directly related to context preservation during interruptions/undo
  • #2554: Interrupting requests makes the model forget everything it has done - opposite context preservation problem but similar area

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

@github-actions[bot] commented on GitHub (Sep 12, 2025): This issue might be a duplicate of existing issues. Please check: - #2324: Cancelling causes context loss - similar context management issues during operations - #2171: Are interrupted messages lost from the context? - directly related to context preservation during interruptions/undo - #2554: Interrupting requests makes the model forget everything it has done - opposite context preservation problem but similar area Feel free to ignore if none of these address your specific case.
Author
Owner

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

there was a race condition that caused this bug, the fix has been merged and will be in next release!

sorry about that

fix: https://github.com/sst/opencode/pull/2572

@rekram1-node commented on GitHub (Sep 13, 2025): there was a race condition that caused this bug, the fix has been merged and will be in next release! sorry about that fix: https://github.com/sst/opencode/pull/2572
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1701