Repository navigation
Description
Summary
On Windows, OpenCode Desktop (stable 1.18.31) shows no sessions under any project ("아직 아무것도 없습니다 / 세션을 생성하시 시작하세요"). The session list fails to load because at least one legacy session row has a non-absolute directory value ("." or "/"), which trips a path assertion:
Error: Path is not absolute: .
Since the list query (V2Session.list) validates/decodes every row, one malformed row breaks the entire session list, so every project appears empty — even though 433 sessions exist in the DB.
Environment
- opencode desktop:
1.18.31.0(%LOCALAPPDATA%\Programs\OpenCode\OpenCode.exe) - opencode CLI:
1.18.31 - OS: Windows 11 Enterprise, build 26100 (AMD64)
- DB:
%USERPROFILE%\.local\share\opencode\opencode-desktop.db(same rows also exist inopencode.db)
Steps to reproduce
- Have a session row whose
directoryis not an absolute path (e.g."."or"/") — from legacy sessions (version1.2.x, ACP/Codex). - Launch the desktop app and open any project.
- The project's session list is empty; the server log shows the error below. The same happens for all projects.
Expected behavior
Sessions list normally. A single malformed/legacy row should not fail the entire list.
Actual behavior
GET /api/session (session list) fails; the UI shows no sessions for every project.
Server log (%USERPROFILE%\.local\share\opencode\log\opencode.log):
level=ERROR message=failed error="EffectDrizzleQueryError: Failed query: select \"id\", \"project_id\", \"workspace_id\", \"parent_id\", \"slug\", \"directory\", \"path\", \"title\", \"version\", ... from \"session\" order by \"session\".\"time_created\" desc, \"session\".\"id\" desc limit ?
params: 5000 (cause: Cause([Fail(Error: Path is not absolute: .)]))"
at V2Session.list (file:///.../app.asar/out/main/chunks/node-Cc1MVJxA.js:733450:40)
...
[cause]: Error: Cause([Fail(Error: Path is not absolute: .)])
DB evidence
SELECT id, directory, path, title, project_id, version FROM session
WHERE directory IN ('.', '/', '') OR directory IS NULL;Result (present in both opencode-desktop.db and opencode.db):
ses_3905a52d4ffewsWT8Upaxth7fs directory='.' title='ACP Session d63e4d24-59e0-455d-92d1-46eb7fec80a1' project_id='global' version='1.2.4'
ses_3a1418943ffeufvbTzooPhgAAb directory='/' title='현재 codex 연결 여부 확인 대화' project_id='global' version='1.2.3'
Total sessions: 433; non-absolute directory: 2.
Root cause (analysis)
A path helper asserts that a location is absolute. The session list validates each row's location, so a single legacy row with directory="." throws and the whole list request fails, leaving every project's session list empty. This looks like the same "Path is not absolute" assertion family seen in the workspace=global reports, but here the offending value is a stored session directory ("."), it affects stable 1.18.31 on Windows, and the failure is data-driven rather than workspace-driven.
Impact
All projects show no sessions in the desktop UI even though sessions exist in the DB. Data is intact.
Workaround
With the app closed, normalize/repoint the offending rows:
UPDATE session
SET directory = 'C:/Users/<user>'
WHERE directory IN ('.', '/', '') OR directory IS NULL;After this, the session list renders again.
Suggested fix
- Skip or normalize rows with a non-absolute
directoryinstead of failing the whole list. - Add a migration to repair legacy rows where
directoryis in('', '.', '/'). - Consider hardening the path normalization used by
Session.list.
Related
- server: workspace=global requests return 500 'Path is not absolute: global' causing repeated 'failed to reload global' toasts #42532 — server: workspace=global requests return 500 'Path is not absolute: global'
- desktop: bundled sidecar (next-17403) crashes with 'Path is not absolute: global' — all API 500s, failed to load sessions #42266 — desktop: bundled sidecar crashes with 'Path is not absolute: global'
- Desktop sends Windows-native paths to WSL server after directory rename, breaking session list with "Path is not absolute" error #33550 — Desktop sends Windows-native paths ... breaking session list with "Path is not absolute"
- Web UI Session List Empty — Project Auto-Registration Fails on Windows/WSL #37096 / Web sidebar shows 'no sessions' on Windows despite API returning them (F5 loses list; TUI sessions invisible) #42668 — session list empty on Windows / Web
Activity
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊