anomalyco / anomalyco/opencode

Web sidebar shows 'no sessions' on Windows despite API returning them (F5 loses list; TUI sessions invisible)

Open
#42,668 2 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 15, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Web UI sidebar shows "no sessions" for a project even though the server API returns all sessions. On Windows (native, not WSL), sessions created in the TUI are never listed in the web sidebar, and sessions created in the web disappear from the list after a page refresh (F5). The folder/project itself persists.

Environment

  • opencode 1.18.18 (chocolatey), Windows native, pwsh
  • Data dir: C:\Users\rcocchiararo\.local\share\opencode\opencode.db
  • Server: opencode web --hostname 0.0.0.0 --port 4096 with OPENCODE_SERVER_PASSWORD (basic auth)

Facts verified

  • Project C:/DEV/popei exists with 14 sessions in the DB, stored with forward slashes: C:/DEV/popei.
  • /project/current returns worktree: "C:\\DEV\\popei" (backslash).
  • GET /api/session?directory=C:/DEV/popei&roots=true&limit=50 returns 14 sessions. Same with backslash encoding. Server filter handles both.
  • Sessions created in the web do show up in the TUI (shared DB). Sessions created in the TUI are not shown in the web sidebar.
  • Direct URL navigation to a session (http://<host>:4096/<dir>/session/<id>) loads it fine (SPA returns 200) — only the sidebar list is broken.
  • The client bundle (index-CQtwhDOb.js) normalize fn already converts backslashes to forward slashes and strips trailing slashes:
    Ge=e=>{const t=Sye(e)?e.replaceAll("\\","/"):e,n=kye(t);return !n&&t.startsWith("/")?"/":xye(n)?${n}/:n}
    and the sidebar filter is JAe=(e,t)=>Ge(e.directory)===Ge(t)&&!e.parentID&&!e.time?.archived, so the separator mismatch should NOT be the cause — yet the list is empty.

Expected

After adding/selecting a project, the sidebar should list existing sessions from the API, and the list should survive F5.

Possibly related

  • #10519 Web UI not showing my sessions
  • #12262 Session list not updating / scoping issues
  • #21340 Path separator mismatch hiding sessions on Windows
  • #35340 v1.17.13 web UI session list still empty
  • #36237 Web UI session list stays empty until manual server/directory click

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.