/undo destroys the unstaged changes from other sessions, /redo did not restore everything fully #9303

Closed
opened 2026-02-16 18:12:08 -05:00 by yindo · 4 comments
Owner

Originally created by @raymelon on GitHub (Feb 14, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The title says it all. I never use /undo because of this, but today is the worst day. It felt safe using it because it's a fresh session without file edits. But no way it touches the unstaged files that other sessions has edited.

Good thing my sessions have context of what was done. But now I have to spend time restoring and retesting days of work.

Plugins

No response

OpenCode version

1.1.59

Steps to reproduce

  1. Create a new session
  2. Do not do edits in the new session
  3. Try running /undo
  4. Watch your unstaged changes disappear, along the ones unrelated to the session
  5. Try running /redo
  6. Watch your unstaged changes reappear, but now incomplete and outdated

Screenshot and/or share link

No response

Operating System

Windows 10

Terminal

PowerShell, Windows Terminal

Originally created by @raymelon on GitHub (Feb 14, 2026). Originally assigned to: @thdxr on GitHub. ### Description The title says it all. I never use /undo because of this, but today is the worst day. It felt safe using it because it's a fresh session without file edits. But no way it touches the unstaged files that other sessions has edited. Good thing my sessions have context of what was done. But now I have to spend time restoring and retesting days of work. ### Plugins _No response_ ### OpenCode version 1.1.59 ### Steps to reproduce 1. Create a new session 2. Do not do edits in the new session 3. Try running /undo 4. Watch your unstaged changes disappear, along the ones unrelated to the session 5. Try running /redo 6. Watch your unstaged changes reappear, but now incomplete and outdated ### Screenshot and/or share link _No response_ ### Operating System Windows 10 ### Terminal PowerShell, Windows Terminal
yindo added the bugneeds:compliance labels 2026-02-16 18:12:08 -05:00
yindo closed this issue 2026-02-16 18:12:08 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 14, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • Steps to reproduce: Currently shows "No response". Please provide detailed steps on how to trigger this behavior (e.g., what specific actions you performed with multiple sessions before running /undo)
  • Operating System: Currently shows "No response". Please specify your OS (Windows, macOS, Linux)
  • Terminal: Currently shows "No response". Please specify your terminal application (e.g., Terminal.app, iTerm2, Windows Terminal, etc.)

These fields are important for maintainers to reproduce and debug the issue.

Please edit this issue to address the above within 2 hours, or it will be automatically closed.


Potential Duplicates: This issue may be related to #11802 which describes a known cross-session attribution issue where files modified by other sessions can pollute the current session's state.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions[bot] commented on GitHub (Feb 14, 2026): <!-- issue-compliance --> This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). **What needs to be fixed:** - **Steps to reproduce**: Currently shows "_No response_". Please provide detailed steps on how to trigger this behavior (e.g., what specific actions you performed with multiple sessions before running /undo) - **Operating System**: Currently shows "_No response_". Please specify your OS (Windows, macOS, Linux) - **Terminal**: Currently shows "_No response_". Please specify your terminal application (e.g., Terminal.app, iTerm2, Windows Terminal, etc.) These fields are important for maintainers to reproduce and debug the issue. Please edit this issue to address the above within **2 hours**, or it will be automatically closed. --- **Potential Duplicates**: This issue may be related to #11802 which describes a known cross-session attribution issue where files modified by other sessions can pollute the current session's state. If you believe this was flagged incorrectly, please let a maintainer know.
Author
Owner

@raymelon commented on GitHub (Feb 14, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • Steps to reproduce: Currently shows "No response". Please provide detailed steps on how to trigger this behavior (e.g., what specific actions you performed with multiple sessions before running /undo)
  • Operating System: Currently shows "No response". Please specify your OS (Windows, macOS, Linux)
  • Terminal: Currently shows "No response". Please specify your terminal application (e.g., Terminal.app, iTerm2, Windows Terminal, etc.)

These fields are important for maintainers to reproduce and debug the issue.

Please edit this issue to address the above within 2 hours, or it will be automatically closed.

Potential Duplicates: This issue may be related to #11802 which describes a known cross-session attribution issue where files modified by other sessions can pollute the current session's state.

If you believe this was flagged incorrectly, please let a maintainer know.

Just completed the details

@raymelon commented on GitHub (Feb 14, 2026): > This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). > > **What needs to be fixed:** > > * **Steps to reproduce**: Currently shows "_No response_". Please provide detailed steps on how to trigger this behavior (e.g., what specific actions you performed with multiple sessions before running /undo) > * **Operating System**: Currently shows "_No response_". Please specify your OS (Windows, macOS, Linux) > * **Terminal**: Currently shows "_No response_". Please specify your terminal application (e.g., Terminal.app, iTerm2, Windows Terminal, etc.) > > These fields are important for maintainers to reproduce and debug the issue. > > Please edit this issue to address the above within **2 hours**, or it will be automatically closed. > > **Potential Duplicates**: This issue may be related to [#11802](https://github.com/anomalyco/opencode/issues/11802) which describes a known cross-session attribution issue where files modified by other sessions can pollute the current session's state. > > If you believe this was flagged incorrectly, please let a maintainer know. Just completed the details
Author
Owner

@github-actions[bot] commented on GitHub (Feb 14, 2026):

This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new issue that follows our issue templates.

@github-actions[bot] commented on GitHub (Feb 14, 2026): This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window. Feel free to open a new issue that follows our issue templates.
Author
Owner

@alexyaroshuk commented on GitHub (Feb 14, 2026):

please recreate the issue, it is helpful - i think there is currently an issue with the bot

@alexyaroshuk commented on GitHub (Feb 14, 2026): please recreate the issue, it is helpful - i think there is currently an issue with the bot
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9303