Describe the bug
After upgrading to OpenCode 1.2.21, the Web UI no longer shows sessions when I open it from my workspace root directory on Windows.
In that directory context, the sidebar is effectively empty: the expected session list is missing, and the usual New Session action is also not shown.
This worked before the upgrade.
To reproduce
- Use a workspace root directory on Windows that already has historical OpenCode sessions.
- Start
opencode web from that workspace root.
- Open the Web UI.
- Enter that workspace-root context.
Expected behavior
The sidebar should either:
- show the existing root sessions for that directory, or
- show a normal empty state with a visible New Session action.
Actual behavior
- The sidebar does not show the expected session list.
- The New Session action is also missing in that context.
- The rest of the page still renders.
Environment
- OpenCode: 1.2.21
- Also reproducible on: 1.2.22
- OS: Windows
- Launch directory pattern:
E:\AI\...\Opencode\workspace
- Local Web UI:
http://127.0.0.1:4096
Additional context
I checked the local database and the sessions still exist.
- SQLite integrity check returns
ok
- The workspace root still has about 30 sessions in the database
- 16 of them are root sessions (
parent_id IS NULL)
- But the Web API call below returns an empty list for the same directory:
GET /session?directory=<workspace_root>&roots=true&limit=55
- response:
[]
This looks like a regression in session scoping/filtering rather than database corruption.
It may be related to older sessions under the workspace root being associated with project_id = global and no longer being returned by the Web UI query after the upgrade.
This may also be related to #14570, but in my case it is consistently reproducible from a workspace-root launch on Windows.
Describe the bug
After upgrading to OpenCode 1.2.21, the Web UI no longer shows sessions when I open it from my workspace root directory on Windows.
In that directory context, the sidebar is effectively empty: the expected session list is missing, and the usual New Session action is also not shown.
This worked before the upgrade.
To reproduce
opencode webfrom that workspace root.Expected behavior
The sidebar should either:
Actual behavior
Environment
E:\AI\...\Opencode\workspacehttp://127.0.0.1:4096Additional context
I checked the local database and the sessions still exist.
okparent_id IS NULL)GET /session?directory=<workspace_root>&roots=true&limit=55[]This looks like a regression in session scoping/filtering rather than database corruption.
It may be related to older sessions under the workspace root being associated with
project_id = globaland no longer being returned by the Web UI query after the upgrade.This may also be related to #14570, but in my case it is consistently reproducible from a workspace-root launch on Windows.