"session not found" after WSL crash #6974

Open
opened 2026-02-16 18:05:46 -05:00 by yindo · 3 comments
Owner

Originally created by @j4w8n on GitHub (Jan 20, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @j4w8n on GitHub (Jan 20, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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. ```bash 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](https://github.com/user-attachments/files/24747048/opencode-logs.txt) ### Screenshot and/or share link _No response_ ### Operating System Windows 11 with WSL ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:05:46 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7773: Service crashes on missing session file (NotFoundError)
  • #8502: opencode run fails with 'Session not found' (1.1.16)
  • #5431: stats command: SyntaxError: Failed to parse JSON (similar storage/JSON corruption)
  • #7261: v1.1.6 still has memory bloat - heap not released + MCP orphan processes (related to stability issues that could cause crashes)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 20, 2026): This issue might be a duplicate of existing issues. Please check: - #7773: Service crashes on missing session file (NotFoundError) - #8502: opencode run fails with 'Session not found' (1.1.16) - #5431: stats command: SyntaxError: Failed to parse JSON (similar storage/JSON corruption) - #7261: v1.1.6 still has memory bloat - heap not released + MCP orphan processes (related to stability issues that could cause crashes) Feel free to ignore if none of these address your specific case.
Author
Owner

@jackdevis commented on GitHub (Jan 20, 2026):

@j4w8n should i work on this issue?

@jackdevis commented on GitHub (Jan 20, 2026): @j4w8n should i work on this issue?
Author
Owner

@j4w8n commented on GitHub (Jan 20, 2026):

@j4w8n should i work on this issue?

I have no idea. Figured opencode would pick it up if they felt it needed looked at. Thanks for asking though.

@j4w8n commented on GitHub (Jan 20, 2026): > @j4w8n should i work on this issue? I have no idea. Figured opencode would pick it up if they felt it needed looked at. Thanks for asking though.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6974