Skip to content

[Web UI] Sessions under workspace root are missing after upgrading to 1.2.21 #16744

Description

@singularity2000

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

  1. Use a workspace root directory on Windows that already has historical OpenCode sessions.
  2. Start opencode web from that workspace root.
  3. Open the Web UI.
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions