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
Session not found when selecting sessions from TUI picker #12345
Selecting a session from the TUI session picker sometimes shows "session not found" even though the session is listed right there. Happens more often after creating a new session or with older sessions that have a lot of messages.
Two causes:
Binary.search uses < but the session array is sorted with localeCompare, which gives a different ordering for mixed-case strings. Session IDs have base62 random suffixes so the binary search just misses entries that are in the array.
If any message or part file has corrupted JSON the messages endpoint returns 500 and the whole session becomes unloadable. The catch handler labels it "session not found" which is misleading.
I had saved a session containing the full chat history for the codebase and application I’m working on. The session is clearly visible in the UI session picker and appears in the UI list. However, when I select it, I immediately receive a “session not found” error with the corresponding session ID.
I’ve attached screenshots below that demonstrate:
The session appearing in the picker list.
The exact error message displayed after selection.
Additionally:
opencode export <session_id> fails with the same “Session not found” error, even though the session is listed.
Environment:
OS: Ubuntu 24.04.3 LTS x86_64
OpenCode version:
Output of opencode session list showing the session.
Having the same issue. In my case, the disk went full halting an ongoing subagent task inside the session.
Managed to send a new message to recover the session only to get QUEUED.
After restarting OpenCode, the session shows up in the TUI (session list) but is unloadable.
The TUI briefly loads the session, so I know it's not completely gone, only to shoot me back to the home screen with the gigantic red alert saying "Session not found: ses_..."
Activity
github-actions commentedon Feb 5, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
ImGajeed76 commentedon Feb 6, 2026
damn, you really hit that 12345 id haha
fix: cap stream timeout retries and use localeCompare in binary search (
saadazghour commentedon Feb 8, 2026
Hi @zampxdev, @rekram1-node ,
I’m experiencing the same issue.
I had saved a session containing the full chat history for the codebase and application I’m working on. The session is clearly visible in the UI session picker and appears in the UI list. However, when I select it, I immediately receive a “session not found” error with the corresponding session ID.
I’ve attached screenshots below that demonstrate:
The session appearing in the picker list.
The exact error message displayed after selection.
Additionally:
opencode export <session_id> fails with the same “Session not found” error, even though the session is listed.
Environment:
OS: Ubuntu 24.04.3 LTS x86_64
OpenCode version:
Output of opencode session list showing the session.
raymelon commentedon Feb 11, 2026
Having the same issue. In my case, the disk went full halting an ongoing subagent task inside the session.
Managed to send a new message to recover the session only to get QUEUED.
After restarting OpenCode, the session shows up in the TUI (session list) but is unloadable.
The TUI briefly loads the session, so I know it's not completely gone, only to shoot me back to the home screen with the gigantic red alert saying "Session not found: ses_..."
Session export does not work as well.
github-actions commentedon Apr 13, 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.