session not found #8932

Open
opened 2026-02-16 18:11:12 -05:00 by yindo · 2 comments
Owner

Originally created by @CourageCowardly on GitHub (Feb 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

i am encountering a critical issue where a specific session becomes permanently inaccessible with a "Session not found" error. this happened after i exited opencode and returned a few hours later. once this error occurs for a session, it is permanent. i cannot access that specific session anymore, no matter how many times i "restart" or try to select it or restarrt backend. the session appears in the list, but selecting it always fails. i always will in one dir, and have fews sessions

Plugins

n/a

OpenCode version

1.1.53

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11 25h2

Terminal

windows terminal

Originally created by @CourageCowardly on GitHub (Feb 9, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description i am encountering a critical issue where a specific session becomes permanently inaccessible with a "Session not found" error. this happened after i exited opencode and returned a few hours later. once this error occurs for a session, it is permanent. i cannot access that specific session anymore, no matter how many times i "restart" or try to select it or restarrt backend. the session appears in the list, but selecting it always fails. i always will in one dir, and have fews sessions ### Plugins n/a ### OpenCode version 1.1.53 ### Steps to reproduce No response ### Screenshot and/or share link _No response_ ### Operating System Windows 11 25h2 ### Terminal windows terminal
yindo added the windowsbug labels 2026-02-16 18:11:12 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2026):

This issue might be a duplicate of or related to existing session corruption issues. Please check:

  • #12002: Session not found after JSON corruption (similar error after exit)
  • #9673: "session not found" after WSL crash (session files corrupted with null bytes)
  • #12345: Session not found when selecting from TUI picker (related session loading issue)

These issues describe similar symptoms where session files become corrupted and inaccessible. If you haven't already, please check the session files in your ~/.local/share/opencode/storage/ directory to see if they've been corrupted (you can use file or hexdump commands like shown in #9673).

This will help maintainers understand if it's the same root cause or a separate issue.

@github-actions[bot] commented on GitHub (Feb 9, 2026): This issue might be a duplicate of or related to existing session corruption issues. Please check: - #12002: Session not found after JSON corruption (similar error after exit) - #9673: "session not found" after WSL crash (session files corrupted with null bytes) - #12345: Session not found when selecting from TUI picker (related session loading issue) These issues describe similar symptoms where session files become corrupted and inaccessible. If you haven't already, please check the session files in your `~/.local/share/opencode/storage/` directory to see if they've been corrupted (you can use `file` or `hexdump` commands like shown in #9673). This will help maintainers understand if it's the same root cause or a separate issue.
Author
Owner

@CourageCowardly commented on GitHub (Feb 9, 2026):

session metadata file exists and contains valid json
.local\share\opencode\storage\session\global\ses_3db4e774affeaeuvrQqQi3Dms5.json
size: 355b

{
  "id": "ses_3db4e774affeaeuvrQqQi3Dms5",
  "slug": "cosmic-star",
  "version": "1.1.49",
  "projectID": "global",
  "directory": "@dir",
  "title": "im here",
  "time": {
    "created": 1770142140597,
    "updated": 1770676260058
  },
  "summary": {
    "additions": 0,
    "deletions": 0,
    "files": 0
  }
}

session diff/state is empty/wiped. file responsible for session state/diffs appears to be wiped or reset to an empty array.
.local\share\opencode\storage\session_diff\ses_3db4e774affeaeuvrQqQi3Dms5.json
size: 2b
[](empty json array) chat history is intact, message history for this session is fully preserved on disk .local\share\opencode\storage\message\ses_3db4e774affeaeuvrQqQi3Dms5\ contains 1302 message files (json), indicating a long-running and valuable session.

last 2 lines logs

ERROR 2026-02-09T23:55:40 +1ms service=server error=Unexpected end of JSON input failed
INFO  2026-02-09T23:55:40 +0ms service=server status=completed duration=8 method=GET path=/session/ses_3db4e774affeaeuvrQqQi3Dms5/message request
@CourageCowardly commented on GitHub (Feb 9, 2026): session metadata file exists and contains valid json .local\share\opencode\storage\session\global\ses_3db4e774affeaeuvrQqQi3Dms5.json size: 355b ``` { "id": "ses_3db4e774affeaeuvrQqQi3Dms5", "slug": "cosmic-star", "version": "1.1.49", "projectID": "global", "directory": "@dir", "title": "im here", "time": { "created": 1770142140597, "updated": 1770676260058 }, "summary": { "additions": 0, "deletions": 0, "files": 0 } } ``` session diff/state is empty/wiped. file responsible for session state/diffs appears to be wiped or reset to an empty array. .local\share\opencode\storage\session_diff\ses_3db4e774affeaeuvrQqQi3Dms5.json size: 2b ` [] `(empty json array) chat history is intact, message history for this session is fully preserved on disk .local\share\opencode\storage\message\ses_3db4e774affeaeuvrQqQi3Dms5\ contains 1302 message files (json), indicating a long-running and valuable session. last 2 lines logs ``` ERROR 2026-02-09T23:55:40 +1ms service=server error=Unexpected end of JSON input failed INFO 2026-02-09T23:55:40 +0ms service=server status=completed duration=8 method=GET path=/session/ses_3db4e774affeaeuvrQqQi3Dms5/message request ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8932