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
cli: migrated v1 sessions from non-git dirs missing from session list #52919
Migrated v1 sessions are missing from the project-scoped session list when their directory is not a git repo.
After upgrading from V1 (1.14.32-1.18.32) to 2.0.22, the data migration reports completed and no data is lost, but sessions created in non-git directories keep the V1 project_id = "global". V2 scopes /sessions and opencode session list to the current project, and V2 creates a separate project entry for that same directory, so those sessions get filtered out.
Affected in my case: 30 of 37 migrated sessions (/home/nicola 23, ~/blender 6, ~/trading 1). Sessions from git repos (salon-bot, TradingAgents, transpotec) are unaffected and list normally, so this looks specific to the global project id.
Workaround: transcripts are intact and reachable via Ctrl+O (recent sessions and projects) or opencode -s <sessionID>.
Expected: either the migration should re-map project_id from the stored session_v2.directory/path, or the project-scoped list should include global-project sessions whose directory matches the current location.
Plugins
none
OpenCode version
2.0.22 (channel: latest), upgraded from v1 1.14.32-1.18.32
Steps to reproduce
In V1 (1.14.x-1.18.x), run OpenCode from a directory that is not a git repo and create a few sessions.
Upgrade to V2 (2.0.22) and start it once so the data migration completes.
opencode api get /api/experimental/migration/v1 -> {"status":"completed"}
cd into that same directory and run opencode session list -> only sessions created after the upgrade are listed, the v1 ones are missing.
opencode api get "/api/session?limit=100&directory=<that directory>" -> the v1 sessions are returned.
Read-only DB check: SELECT project_id, count(*) FROM session_v2 GROUP BY project_id -> the v1 sessions are counted under global.
Also note: in step 4, pressing Ctrl+O in the TUI does show them, so the sessions are reachable but not listed in the normal session view.
Thanks for the clear report and the comparison with Git-backed directories — this is the same problem as #49827, where we're tracking migrated sessions hidden under the old global project. Please subscribe or add a 👍 there, and feel free to add your version and Linux Mint details.
Activity
github-actions commentedon Oct 3, 2026
This issue might be a duplicate of existing issues. Please check:
project_id = "global"for non-git sessions, hiding them from the per-directory picker.globalsessions are hidden from V2 session lists.globalproject become hidden after upgrading.For keybind-related issues, please also check our pinned keybinds documentation: #4997
neriousy commentedon Oct 20, 2026
Thanks for the clear report and the comparison with Git-backed directories — this is the same problem as #49827, where we're tracking migrated sessions hidden under the old global project. Please subscribe or add a 👍 there, and feel free to add your version and Linux Mint details.