Description
I encountered an issue with /undo when using opencode across multiple Git repositories.
My opencode session was started inside repository A, but during the session I modified files inside repository B.
When I executed:
only the conversation history was reverted.
The code changes inside repository B were NOT reverted.
Expected Behavior
/undo should either:
- Revert all file changes made during the last assistant turn, including cross-repository edits
OR
- Clearly warn/document that
/undo only tracks changes inside the current session repository.
Actual Behavior
- Conversation rollback works
- Changes in repository
A may rollback
- Changes in repository
B remain unchanged
This can be dangerous because users may assume /undo restores all AI-generated modifications.
Reproduction Steps
- Start opencode inside repository
A
- Ask the assistant to modify files in repository
B
- Execute
/undo
- Observe that repository
B changes are not reverted
Environment
- macOS Apple Silicon (M2)
- opencode latest version
- multiple Git repositories
Suggestion
Possible improvements:
- Track all modified repositories during a session
- Extend
/undo to support cross-repository rollback
- Or explicitly limit/document
/undo scope in the UI/docs
Description
I encountered an issue with
/undowhen using opencode across multiple Git repositories.My opencode session was started inside repository
A, but during the session I modified files inside repositoryB.When I executed:
only the conversation history was reverted.
The code changes inside repository
Bwere NOT reverted.Expected Behavior
/undoshould either:OR
/undoonly tracks changes inside the current session repository.Actual Behavior
Amay rollbackBremain unchangedThis can be dangerous because users may assume
/undorestores all AI-generated modifications.Reproduction Steps
AB/undoBchanges are not revertedEnvironment
Suggestion
Possible improvements:
/undoto support cross-repository rollback/undoscope in the UI/docs