Web UI not showing my sessions #7526

Open
opened 2026-02-16 18:07:27 -05:00 by yindo · 3 comments
Owner

Originally created by @Altamimi-Dev on GitHub (Jan 25, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

For about 3 weeks the web UI stopped recording my sessions in it only my old sessions and projects.
all new projects and sessions are not showing.

Plugins

opencode-anthropic-auth

OpenCode version

1.1.35

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOs taho

Terminal

No response

Originally created by @Altamimi-Dev on GitHub (Jan 25, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description For about 3 weeks the web UI stopped recording my sessions in it only my old sessions and projects. all new projects and sessions are not showing. ### Plugins opencode-anthropic-auth ### OpenCode version 1.1.35 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System macOs taho ### Terminal _No response_
yindo added the bugweb labels 2026-02-16 18:07:27 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 25, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10349: Sessions not visible across platforms when syncing data directory
  • #7784: Session list not updating with new sessions created via CLI
  • #3026: Sessions show empty despite existing in storage
  • #8836: Session list showing all sessions instead of scoped sessions

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 25, 2026): This issue might be a duplicate of existing issues. Please check: - #10349: Sessions not visible across platforms when syncing data directory - #7784: Session list not updating with new sessions created via CLI - #3026: Sessions show empty despite existing in storage - #8836: Session list showing all sessions instead of scoped sessions Feel free to ignore if none of these address your specific case.
Author
Owner

@brunnerh commented on GitHub (Jan 27, 2026):

Not sure if this is exactly the same issue (because different OS), but sessions started in the TUI are not showing up for me in the Web UI on Windows. Sessions created in the Web UI do show up in the TUI alongside the TUI sessions.

It might have to do with directory path handling.
The session files have different paths for the same directory on Windows:

E.g.

// Web UI session
{
  "id": "ses_...",
  "slug": "quiet-canyon",
  "version": "1.1.36",
  "projectID": "[same-project-id-here]",
  "directory": "D:/brunnerh/Project/Code",
  ...
}
// TUI session
{
  "id": "ses_...",
  "slug": "quick-circuit",
  "version": "1.1.36",
  "projectID": "[same-project-id-here]",
  "directory": "D:\\brunnerh\\Project\\Code",
  ...
}

Trying to open a project using \ in the path via the Web UI also does not list any directories, so it kind of makes sense that the directory path gets stored differently. Also wondering why the directory is being used when there is a projectID that matches.

Some LLM exploration that identifies the path handling as an issue:

Response

Found a likely root cause: the web app requests sessions filtered by an exact directory string, but sessions are stored with the current working directory at creation time, so any mismatch (subdirectory vs project root, path casing, symlink path, etc.) makes the list come back empty even though sessions exist.

Here’s the chain:

  • Sessions are stored with directory: Instance.directory at creation time (packages/opencode/src/session/index.ts:140-206).
  • The API list route filters by exact match when directory is provided (packages/opencode/src/server/routes/session.ts:55-63).
  • The web UI calls globalSDK.client.session.list({ directory, roots: true }) using the project’s worktree (or sandbox) path, not necessarily the exact directory where the session was created (packages/app/src/context/global-sync.tsx:379-410, packages/app/src/context/layout.tsx:383-387, packages/app/src/pages/layout.tsx:1454-1470).
  • The server also uses that same directory query param to select the instance (packages/opencode/src/server/server.ts:124-139), so you still get the right project, but then the route filters out sessions whose stored session.directory doesn’t exactly match the worktree.

Typical failure case: a session was created from a subdirectory (/repo/packages/foo), but the web list request uses /repo as the directory filter, so it doesn’t match.

Potential fixes (any one of these should resolve it):

  1. Don’t pass the directory filter when listing sessions in the web UI (still pass the directory for instance selection via header/query at the SDK level).
  2. Normalize paths (e.g., path.resolve, case normalization on Windows) before comparing.
  3. Change the server filter to allow prefix/containment (e.g., treat sessions as part of the project if session.directory is inside the worktree).
  4. Store session.directory as the project worktree instead of the current directory.
@brunnerh commented on GitHub (Jan 27, 2026): Not sure if this is exactly the same issue (because different OS), but sessions started in the TUI are not showing up for me in the Web UI on Windows. Sessions created in the Web UI **do** show up in the TUI alongside the TUI sessions. It might have to do with directory path handling. The session files have different paths for the same directory on Windows: E.g. ```jsonc // Web UI session { "id": "ses_...", "slug": "quiet-canyon", "version": "1.1.36", "projectID": "[same-project-id-here]", "directory": "D:/brunnerh/Project/Code", ... } ``` ```jsonc // TUI session { "id": "ses_...", "slug": "quick-circuit", "version": "1.1.36", "projectID": "[same-project-id-here]", "directory": "D:\\brunnerh\\Project\\Code", ... } ``` Trying to open a project using `\` in the path via the Web UI also does not list any directories, so it kind of makes sense that the directory path gets stored differently. Also wondering why the `directory` is being used when there is a `projectID` that matches. Some LLM exploration that identifies the path handling as an issue: <details> <summary>Response</summary> Found a likely root cause: the web app requests sessions filtered by an exact directory string, but sessions are stored with the *current working directory at creation time*, so any mismatch (subdirectory vs project root, path casing, symlink path, etc.) makes the list come back empty even though sessions exist. Here’s the chain: - Sessions are stored with `directory: Instance.directory` at creation time (`packages/opencode/src/session/index.ts:140-206`). - The API list route filters by exact match when `directory` is provided (`packages/opencode/src/server/routes/session.ts:55-63`). - The web UI calls `globalSDK.client.session.list({ directory, roots: true })` using the project’s `worktree` (or sandbox) path, not necessarily the exact directory where the session was created (`packages/app/src/context/global-sync.tsx:379-410`, `packages/app/src/context/layout.tsx:383-387`, `packages/app/src/pages/layout.tsx:1454-1470`). - The server also uses that same `directory` query param to select the instance (`packages/opencode/src/server/server.ts:124-139`), so you still get the right project, but then the route filters out sessions whose stored `session.directory` doesn’t exactly match the worktree. Typical failure case: a session was created from a subdirectory (`/repo/packages/foo`), but the web list request uses `/repo` as the directory filter, so it doesn’t match. Potential fixes (any one of these should resolve it): 1. Don’t pass the `directory` filter when listing sessions in the web UI (still pass the directory for instance selection via header/query at the SDK level). 2. Normalize paths (e.g., `path.resolve`, case normalization on Windows) before comparing. 3. Change the server filter to allow prefix/containment (e.g., treat sessions as part of the project if `session.directory` is inside the worktree). 4. Store `session.directory` as the project worktree instead of the current directory. </details>
Author
Owner

@InCerryGit commented on GitHub (Feb 11, 2026):

same issue.

@InCerryGit commented on GitHub (Feb 11, 2026): same issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7526