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
In particular, #16579 covers a migration issue introduced around v1.2.21 that causes old sessions to become inaccessible — since you're on v1.2.24, this may be the same root cause. That issue includes diagnostic steps and a workaround worth trying.
It would also help to fill in the Operating System and Terminal fields, and to provide more specific reproduction steps (e.g. whether this happens in a git repo, after an upgrade, on first launch, etc.) so maintainers can triage more effectively.
I am experiencing the same but only in web interface. I cannot get back to old sessions, list is empty. Surprisingly when I click Load More I can see sessions being loaded in the browser dev tools on the network tab but they are not shown. No JS errors there.
However in TUI all sessions are visible.
Just experienced the same, my session list is empty after restarting OC (TUI) via the opencode command in CLI.
I can still access previous prompts via the up arrow.
I also encountered the same issue. The GUI only has the last conversation record, and all others are lost; the TUI didn't load any conversation records in the same workspace.
Hit by this on v1.14.39 (macOS, TUI). Different root cause from the child-session dilution in #16270 and the directory-scoping issue @CasualDeveloper found in #13877.
Root cause: The path column was added to the session table at some point, but existing rows were never backfilled. Old sessions have path = NULL, sessions created after ~v1.14.29 have path = ''. The list query matches on path and NULL != '' in SQL, so pre-v1.14.29 sessions are invisible.
-- my database:
SELECT CASE WHEN path IS NULL THEN 'NULL' ELSE 'empty string' END, COUNT(*), MIN(version), MAX(version)
FROM session GROUP BY (path IS NULL);
-- NULL | 520 | 1.4.9 | 1.14.19
-- empty string | 85 | 1.14.29 | 1.14.39
Workaround (fixed it immediately for me):
cp ~/.local/share/opencode/opencode.db ~/.local/share/opencode/opencode.db.bak
sqlite3 ~/.local/share/opencode/opencode.db "UPDATE session SET path = '' WHERE path IS NULL;"
Proper fix would be a migration that backfills path = '' where NULL on upgrade.
@codyanthony850 Good catch. I hit this locally too, and backfilling path fixed the inconsistent session picker behavior for me.
One nuance: UPDATE session SET path = '' WHERE path IS NULL is only safe when session.directory is the project worktree root. For sessions created in subdirs or under the global project, '' flattens them to the root and changes picker behavior.
The safer migration is to backfill path from the project-relative directory:
Activity
github-actions commentedon Mar 10, 2026
This issue might be a duplicate of existing issues. Please check:
session_listreturns empty despite sessions existing in the database (same symptom)In particular, #16579 covers a migration issue introduced around v1.2.21 that causes old sessions to become inaccessible — since you're on v1.2.24, this may be the same root cause. That issue includes diagnostic steps and a workaround worth trying.
It would also help to fill in the Operating System and Terminal fields, and to provide more specific reproduction steps (e.g. whether this happens in a git repo, after an upgrade, on first launch, etc.) so maintainers can triage more effectively.
Laurenz-Ruzicka commentedon Mar 10, 2026
I added the os and terminal, and the issue persists even in 1.2.24. A session started here is not stored/accessible
ipatalas commentedon Mar 10, 2026
I am experiencing the same but only in web interface. I cannot get back to old sessions, list is empty. Surprisingly when I click Load More I can see sessions being loaded in the browser dev tools on the network tab but they are not shown. No JS errors there.
However in TUI all sessions are visible.
HRronaldo commentedon Mar 10, 2026
Windows 11 also exhibits the same issue: in versions 1.2.20 to 1.2.24, all old sessions on the opencode web platform become inaccessible.
#16562
aiulms commentedon Mar 11, 2026
I am experiencing the same issue on Windows 11 with OpenCode 1.2.24.
Environment:
Symptoms:
Database verification (confirmed sessions exist):
What I've tried:
None of these fixes resolved the UI display issue. The sessions exist in the database but the Web UI still shows an empty list.
Please let me know if you need any additional diagnostic information.
aiulms commentedon Mar 11, 2026
Correction: I am using the Desktop App (not Web UI) on Windows 11.
To clarify:
Sorry for the confusion in my previous comment.
n2k3 commentedon Mar 11, 2026
Just experienced the same, my session list is empty after restarting OC (TUI) via the
opencodecommand in CLI.I can still access previous prompts via the up arrow.
On MacOS
Version 1.2.24
hsuanguo commentedon Mar 11, 2026
same issue here
SunYanbox commentedon Mar 11, 2026
I also encountered the same issue. The GUI only has the last conversation record, and all others are lost; the TUI didn't load any conversation records in the same workspace.
fix: handle workspace_id NULL in Session.list() filter
aiulms commentedon Mar 12, 2026
Correction: Environment 2 was Windows 11 (not 10), with existing system but fresh OpenCode install.
aiulms commentedon Mar 12, 2026
📝 补充说明(来自另一台电脑的用户测试)
测试环境:
遇到的问题:
❌ 无法启用新会话
影响:
期望行为:
这是否与会话存储机制有关? 求官方解答!🙏
iamironz commentedon Apr 23, 2026
Same thing
codyanthony850 commentedon May 6, 2026
Hit by this on v1.14.39 (macOS, TUI). Different root cause from the child-session dilution in #16270 and the directory-scoping issue @CasualDeveloper found in #13877.
Root cause: The path column was added to the session table at some point, but existing rows were never backfilled. Old sessions have path = NULL, sessions created after ~v1.14.29 have path = ''. The list query matches on path and NULL != '' in SQL, so pre-v1.14.29 sessions are invisible.
-- my database:
SELECT CASE WHEN path IS NULL THEN 'NULL' ELSE 'empty string' END, COUNT(*), MIN(version), MAX(version)
FROM session GROUP BY (path IS NULL);
-- NULL | 520 | 1.4.9 | 1.14.19
-- empty string | 85 | 1.14.29 | 1.14.39
Workaround (fixed it immediately for me):
cp ~/.local/share/opencode/opencode.db ~/.local/share/opencode/opencode.db.bak
sqlite3 ~/.local/share/opencode/opencode.db "UPDATE session SET path = '' WHERE path IS NULL;"
Proper fix would be a migration that backfills path = '' where NULL on upgrade.
CasualDeveloper commentedon May 10, 2026
@codyanthony850 Good catch. I hit this locally too, and backfilling
pathfixed the inconsistent session picker behavior for me.One nuance:
UPDATE session SET path = '' WHERE path IS NULLis only safe whensession.directoryis the project worktree root. For sessions created in subdirs or under theglobalproject,''flattens them to the root and changes picker behavior.The safer migration is to backfill
pathfrom the project-relative directory:Examples:
path = ''path = 'packages/opencode'/, should keep that relative subpath rather than become''After backfilling all rows this way, old and new sessions behaved consistently for me.
github-actions commentedon Jul 10, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.