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
If your issue is different from the above, please add more details about what you were doing before the sessions disappeared (e.g., did OpenCode auto-update from 1.3.13 to 1.3.15 while open, or did you manually update and restart?).
The first time I opened it today, it was version 1.3.15. When I entered the project directory and started OpenCode, I found that none of the sessions were displayed. After switching projects, I found that the sessions of other projects had also disappeared. I am used to having one session per task, which ensures that each of my sessions has not used too many tokens and has not used /compact. Now it is already version 1.3.16, but the sessions still do not appear.
Just now, when I reopened it, the session was restored, but correspondingly, the new conversations I created during the period when the session was lost were gone.
@lckksk I changed working directory and it listed different sessions than from the one I worked before.
When you use a never activated folder, where no new session has ever been created from, the session list shows all your sessions and they are alive, stored in ~/.local/share/opencode/storage/session/ .
When you have too many sessions that can use a loads of resources
As it looks to me only the session history is truncated by each project's working directory.
If you need to get all your sessions list, cd to /tmp and run npx opencode-ai@1.3.15 session list --max-count 5000 --format table
Also the git workspace alters the session's list because the path is appended by :ref .
Activity
github-actions commentedon Apr 6, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is different from the above, please add more details about what you were doing before the sessions disappeared (e.g., did OpenCode auto-update from 1.3.13 to 1.3.15 while open, or did you manually update and restart?).
lckksk commentedon Apr 6, 2026
The first time I opened it today, it was version 1.3.15. When I entered the project directory and started OpenCode, I found that none of the sessions were displayed. After switching projects, I found that the sessions of other projects had also disappeared. I am used to having one session per task, which ensures that each of my sessions has not used too many tokens and has not used /compact. Now it is already version 1.3.16, but the sessions still do not appear.
lckksk commentedon Apr 6, 2026
Just now, when I reopened it, the session was restored, but correspondingly, the new conversations I created during the period when the session was lost were gone.
aaam commentedon Apr 6, 2026
@lckksk I changed working directory and it listed different sessions than from the one I worked before.
When you use a never activated folder, where no new session has ever been created from, the session list shows all your sessions and they are alive, stored in ~/.local/share/opencode/storage/session/ .
When you have too many sessions that can use a loads of resources
As it looks to me only the session
historyis truncated by each project's working directory.If you need to get all your sessions list, cd to /tmp and run
npx opencode-ai@1.3.15 session list --max-count 5000 --format tableAlso the git workspace alters the session's list because the path is appended by :ref .
lckksk commentedon Apr 7, 2026
@aaam I created a new folder and used npx opencode-ai@1.3.17 session list --max-count 5000. Strangely, it only displayed some of the session records.
lckksk commentedon Apr 9, 2026
最新消息,我有两个项目,这次更新到1.4.1之后使用/session指令,发现项目一会话全部丢失,项目二会话只剩一个。
lckksk commentedon Apr 9, 2026
找到原因,是我个人操作导致的问题,我的工作目录中有大写字母G,但是在wsl中使用小写字母g同样能进入目录,这让我以为目录是不区分大小写的,导致有时会进入g目录,在这个目录中没有会话记录,让我误以为丢失。虽然wsl不区分大小写但存储会话记录的oepncode数据库是区分大小写的,现在G、g目录都有会话记录,我已经修改数据库中的g路径为G。