Skip to content

"session not found" after WSL crash #9673

@j4w8n

Description

@j4w8n

Description

I'm not sure if opencode somehow crashed the WSL instance, or WSL decided to crash for some other reason, but it was not responding.

I've had this happen before, but it's usually fine - I restart the computer, fire up a WSL terminal, cd to the directory and run opencode --continue. This time, it loads the TUI and gives me the "Session not found" error.

Maybe this is just a WSL issue, idk, but thought I'd share just in case. I was only running OpenCode; it was doing some file edit work at the time.

I can see in the ~/.local/share/opencode/storage/session_diff directory that the json file is there, but when running some commands, it seems as though the data was likely overwritten with null bytes.

j4w8n@DESKTOP-5GUC33J:~/.local/share/opencode/storage/session_diff$ ll
total 5776
drwxr-xr-x 2 j4w8n j4w8n    4096 Jan 19 22:28 ./
drwxr-xr-x 8 j4w8n j4w8n    4096 Jan 19 12:12 ../
-rw-r--r-- 1 j4w8n j4w8n 1331764 Jan 20 12:38 ses_4268dbc7bffdjq306RpfJ6EO0i.json
...

j4w8n@DESKTOP-5GUC33J:~/.local/share/opencode/storage/session_diff$ file ses_4268dbc7bffdjq306RpfJ6EO0i.json
ses_4268dbc7bffdjq306RpfJ6EO0i.json: data


j4w8n@DESKTOP-5GUC33J:~/.local/share/opencode/storage/session_diff$ hexdump -C ses_4268dbc7bffdjq306RpfJ6EO0i.json | head -20
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00145230  00 00 00 00                                       |....|
00145234


j4w8n@DESKTOP-5GUC33J:~/.local/share/opencode/storage/session_diff$ stat ses_4268dbc7bffdjq306RpfJ6EO0i.json
  File: ses_4268dbc7bffdjq306RpfJ6EO0i.json
  Size: 1331764         Blocks: 2608       IO Block: 4096   regular file
Device: 820h/2080d      Inode: 578281      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/   j4w8n)   Gid: ( 1000/   j4w8n)
Access: 2026-01-20 12:44:29.702881894 -0500
Modify: 2026-01-20 12:38:13.278383960 -0500
Change: 2026-01-20 12:38:13.278383960 -0500
 Birth: 2026-01-19 22:28:50.015518318 -0500


j4w8n@DESKTOP-5GUC33J:~/.local/share/opencode/storage/session_diff$ wc -c ses_4268dbc7bffdjq306RpfJ6EO0i.json
1331764 ses_4268dbc7bffdjq306RpfJ6EO0i.json

Plugins

N/A

OpenCode version

1.1.27 apparently, but for some reason I thought it was 1.1.26

Steps to reproduce

Unknown reproducible steps.

opencode-logs.txt

Screenshot and/or share link

No response

Operating System

Windows 11 with WSL

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions