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
Web UI on Windows: sessions not displayed due to path separator mismatch in /session API queries #25565
When accessing the OpenCode web UI on Windows (via browser, not the Electron/Tauri desktop app), existing sessions are not displayed in the sidebar. The Electron app connected to the same server shows sessions correctly.
Root Cause
The web UI's JavaScript client sends the directory query parameter with forward slashes (C:/Users/...) when fetching sessions via GET /session?directory=...&roots=true, but the server stores directory paths with backslashes (C:\Users\...). The server does an exact string match, so the query returns an empty array.
Evidence:
GET /session?directory=C%3A%2FUsers%2FManuel%2F...&roots=true → returns []
GET /session?directory=C%3A%5CUsers%5CManuel%5C...&roots=true → returns sessions correctly
Interestingly, the /session/status endpoint in the same web UI uses backslashes correctly — only the session list query uses forward slashes.
Steps to Reproduce
Start opencode serve on Windows with --port 4200
Create sessions via the Electron desktop app or CLI
Open http://localhost:4200 in a web browser
Navigate to a project — the sidebar shows "New session" but no existing sessions
Expected Behavior
The web UI should display existing sessions, matching the behavior of the Electron desktop app.
Suggested Fix
Normalize path separators (replace / with \ on Windows) on the server side when processing the directory query parameter in the /session endpoint. Alternatively, fix the client-side JavaScript to consistently use the OS-native path separator.
Workaround
A reverse proxy on localhost that rewrites forward slashes to backslashes in the directory query parameter partially fixes the session listing. However, the web UI still has a secondary rendering issue where sessions are fetched but not displayed — possibly related to project ID mapping (projectID: "global" vs directory-based project views).
Environment
OpenCode v1.14.31
Windows 10
Tested in Chrome and via Tailscale remote access on iOS Safari
Plugins
None
OpenCode version
1.14.31
Steps to reproduce
a1. Start opencode serve --port 4200 on Windows
2. Create sessions via the Electron desktop app
3. 3. Open http://localhost:4200 in a web browser
4. 4. Navigate to a project — sidebar shows "New session" but no existing sessions
Screenshot and/or share link
No response
Operating System
Windows 10
Terminal
N/A (web browser - Chrome / iOS Safari via Tailscale)
Activity
github-actions commentedon May 3, 2026
This issue might be a duplicate of existing issues. Please check:
Please review those issues and consider closing this one if it covers the same problem.
mlopez-firestorm commentedon May 3, 2026
Closing as duplicate of #21340 and #23864.