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
Bug: Unable to Revert Code Outside Workspace in OpenCode #13425
When working with OpenCode, I noticed that the revert functionality does not work for files located outside the current workspace directory.
If I make changes to a file outside the workspace and attempt to revert those changes, nothing happens. The revert action either fails silently or does not trigger at all.
Expected Behavior
The revert feature should:
Either allow reverting changes for files outside the workspace
Or clearly show an error/notification explaining that reverting is restricted to workspace files only
Actual Behavior
Revert does not work for files outside the workspace
No clear error message or feedback is shown
Steps to Reproduce
Open a workspace in OpenCode
Modify a file that is located outside the workspace directory
Try to revert the changes
Observe that revert does not work
Environment
OS: Windows 10
OpenCode Version: and 1.60
I am able to reproduce. The issue also allows cases where if you revert a message that made changes to only external directory, breaks the session summary. Could tinker a fix, to allow tracking of specific external directories where updates were made, but not sure how the team might want to handle this.
Activity
github-actions commentedon Feb 13, 2026
This issue might be a duplicate of existing issues. Please check:
.nothrow()causes silent data loss —/undoand/redorevert files to stale content (Windows) #10589: Snapshot.nothrow()causes silent data loss —/undoand/redorevert files to stale contentIf your issue is distinct from these, please provide additional context explaining how it differs.
OpeOginni commentedon Feb 13, 2026
I am able to reproduce. The issue also allows cases where if you revert a message that made changes to only external directory, breaks the session summary. Could tinker a fix, to allow tracking of specific external directories where updates were made, but not sure how the team might want to handle this.
github-actions commentedon Apr 15, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.