anomalyco / anomalyco/opencode
Snapshot restore from a subdirectory can overwrite sibling files
Open
@kitlangton is already working on this.
Since Jul 29, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Reverting or unreverting a session started in a subdirectory can overwrite an unrelated edit in a sibling directory. Snapshot restore applies its whole shared snapshot index with checkout-index -a -f instead of restoring only the session directory.
Plugins
None
OpenCode version
dev (7565e035)
Steps to reproduce
- Create a Git repository with
frontend/andbackend/files. - Start a session in
frontend/, create a snapshot, and change a frontend file. - Make an unrelated edit to a backend file, then revert or unrevert the session.
The backend edit is restored from the snapshot. Only files under frontend/ should change.
Screenshot and/or share link
None
Operating System
macOS
Terminal
Ghostty
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.