Description
Snapshot.sync writes to info/exclude inside the snapshot gitdir with Effect.orDie, so any EACCES (e.g., from UID mismatch when the snapshot directory is shared between a container and the host, or from concurrent writes across sessions) crashes the SessionProcessor mid-conversation:
level=ERROR message=failed
ref=err_0f5486fc
error="PlatformError: PermissionDenied: FileSystem.writeFile (.../info/exclude)
cause="EACCES: permission denied, open .../info/exclude"
The snapshot functionality (excluding files via git exclude) is advisory — a write failure should log a warning and continue, not kill the session.
Plugins
None (stock install)
OpenCode version
0.0.0-local-patches-202607171343 (also affects released builds)
Steps to reproduce
- Run multiple opencode sessions that snapshot the same project concurrently
- Or run opencode inside a container where
~/.local/share/opencode/snapshot/ is mounted from the host with a UID shift
- Observe session crash with
EACCES: permission denied on info/exclude
Screenshot and/or share link
Error excerpt from ~/.local/share/opencode/log/opencode.log:
level=ERROR message="failed" ref=err_0f5486fc
error="PlatformError: PermissionDenied: FileSystem.writeFile
(.../snapshot/<id>/<hash>/info/exclude)
cause="EACCES: permission denied, open .../info/exclude"
Stack: Snapshot.patch → SessionProcessor.cleanup → SessionPrompt.run
Operating System
Linux (Ubuntu 26.04)
Terminal
Alacritty
Description
Snapshot.syncwrites toinfo/excludeinside the snapshot gitdir withEffect.orDie, so anyEACCES(e.g., from UID mismatch when the snapshot directory is shared between a container and the host, or from concurrent writes across sessions) crashes theSessionProcessormid-conversation:The snapshot functionality (excluding files via git exclude) is advisory — a write failure should log a warning and continue, not kill the session.
Plugins
None (stock install)
OpenCode version
0.0.0-local-patches-202607171343 (also affects released builds)
Steps to reproduce
~/.local/share/opencode/snapshot/is mounted from the host with a UID shiftEACCES: permission deniedoninfo/excludeScreenshot and/or share link
Error excerpt from
~/.local/share/opencode/log/opencode.log:Stack:
Snapshot.patch → SessionProcessor.cleanup → SessionPrompt.runOperating System
Linux (Ubuntu 26.04)
Terminal
Alacritty