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
NotFoundError on startup: session JSON files not found in storage #12889
When launching opencode-desktop on Linux (Wayland/X11), the app throws NotFoundError for session JSON files that don't exist yet in the storage directory.
Environment
OS: Linux (Arch/CachyOS), Kernel 6.18.9
Desktop: Wayland (forced X11 via WEBKIT_DISABLE_DMABUF_RENDERER=1)
CLI version: 1.1.53
App version: 1.1.53
Steps to Reproduce
Run WEBKIT_DISABLE_DMABUF_RENDERER=1 opencode-desktop
App starts, sidecar spawns on a port, server becomes ready
Two NotFoundError exceptions are thrown immediately
Error Output
opencode server listening on http://127.0.0.1:35895
Server ready after 662.897834ms
NotFoundError: NotFoundError
data: {
message: "Resource not found: /home/<user>/.local/share/opencode/storage/session/global/ses_3baf5522dffeiWPuSV70LW2NXb.json",
},
at <anonymous> (src/storage/storage.ts:205:15)
NotFoundError: NotFoundError
data: {
message: "Resource not found: /home/<user>/.local/share/opencode/storage/session/global/ses_3baf4d5d4ffegHx1UI2qa9a5OS.json",
},
at <anonymous> (src/storage/storage.ts:205:15)
Analysis
The error originates from src/storage/storage.ts:205 in the withErrorHandling wrapper. It catches ENOENT errors and re-throws as NotFoundError.
It appears the app tries to read session files (ses_*.json) that don't exist on disk. This could be:
Stale session references pointing to deleted/missing files
Missing graceful handling for first-run or cleaned storage scenarios
Session index referencing IDs whose backing files were never created or were cleaned up
Expected Behavior
The app should handle missing session files gracefully — either by creating them, removing stale references, or silently skipping — instead of throwing unhandled NotFoundError exceptions to stderr.
Additional Context
The Wayland warning is unrelated:
"Wayland session detected; forcing X11 backend to avoid compositor protocol errors. Set OC_ALLOW_WAYLAND=1 to keep native Wayland."
Activity
github-actions commentedon Apr 11, 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.