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
After BSOD there is no sessions available to read but they are still exists on disk #10904
there were open 8-10 windows of opencode. then i get BSOD after smth what i did.
after restarting pc there is no sessions available to load but they exists on disk.
The file ses_405cda89affeNw04UbeaVEBJX2.json in ~/.local/share/opencode/storage/session/<project_id>/ was corrupted during the BSOD — it contains 413 bytes of 0x00 (null bytes) instead of valid JSON. The session had no associated messages (the corresponding message directory doesn't exist).
When OpenCode tries to load the session list, it attempts to parse this file, fails with a JSON decode error, and apparently stops processing — resulting in zero sessions being shown to the user, even though 18 other valid session files exist.
Expected behavior:
OpenCode should gracefully handle corrupted/unparseable session files — skip them and continue loading the rest
Ideally, show a warning that N session(s) could not be loaded due to corruption
Consider implementing atomic writes (write to temp file + rename) to prevent corruption during unexpected shutdowns
Workaround:
Delete the corrupted file manually: rm ~/.local/share/opencode/storage/session/<project_id>/ses_405cda89affeNw04UbeaVEBJX2.json
You can identify corrupted files with:
Suggested fix:
In the session loading code, wrap the JSON parse in a try/catch and skip corrupted files instead of failing the entire operation. Additionally, use atomic file writes (write to .tmp then os.Rename) to prevent partial writes during crashes.
Experienced the same issue with empty sessions list after reloading opencode. Fixed it by deleting empty session's directory in this path .local/share/opencode/storage/session.
Activity
github-actions commentedon Jan 27, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
salfum commentedon Jan 28, 2026
Experienced the same issue with empty sessions list after reloading opencode. Fixed it by deleting empty session's directory in this path
.local/share/opencode/storage/session.vlnifos commentedon Feb 2, 2026
same issue happened for me
github-actions commentedon Apr 4, 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.