You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/undo only reverts conversation, not code changes across repositories #26488
changed the title [-] only reverts conversation, not code changes across repositories[/-][+]`/undo` only reverts conversation, not code changes across repositories[/+]on May 9, 2026
Your report adds a specific cross-repository scenario (changes in repo B not reverted when session is started in repo A), which may be a distinct edge case worth tracking separately. Please review the above issues and comment there if your situation is covered, or clarify how your case differs.
I reviewed #5474 and #4704. They cover the more general case where /undo does not revert file edits, including cases within the active project/repository.
The distinction in this report is the repository boundary:
opencode is started from Git repository A
the assistant edits files in a separate Git repository B
running /undo rolls back the conversation, but the changes in repository B remain
So this may be related to the same undo/snapshot mechanism, but the specific edge case is cross-repository edits made from a single session. If /undo is intentionally scoped only to the session's initial repository/worktree, then a warning or documentation note would address the safety issue. If it is intended to revert the last assistant turn regardless of which repository was modified, then repo B should probably be tracked as part of the undo state too.
Activity
[-] only reverts conversation, not code changes across repositories[/-][+]`/undo` only reverts conversation, not code changes across repositories[/+]github-actions commentedon May 9, 2026
This issue might be a duplicate of existing issues. Please check:
/undocommand only rolls back AI conversation message, not the associated file changes #5474:/undocommand only rolls back AI conversation message, not the associated file changes/undoand/timelineundo does not revert file editsYour report adds a specific cross-repository scenario (changes in repo B not reverted when session is started in repo A), which may be a distinct edge case worth tracking separately. Please review the above issues and comment there if your situation is covered, or clarify how your case differs.
lightrao commentedon May 9, 2026
Thanks for checking and linking those issues.
I reviewed #5474 and #4704. They cover the more general case where
/undodoes not revert file edits, including cases within the active project/repository.The distinction in this report is the repository boundary:
AB/undorolls back the conversation, but the changes in repositoryBremainSo this may be related to the same undo/snapshot mechanism, but the specific edge case is cross-repository edits made from a single session. If
/undois intentionally scoped only to the session's initial repository/worktree, then a warning or documentation note would address the safety issue. If it is intended to revert the last assistant turn regardless of which repository was modified, then repoBshould probably be tracked as part of the undo state too.github-actions commentedon Jul 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.