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
server: workspace=global requests return 500 'Path is not absolute: global' causing repeated 'failed to reload global' toasts #42532
Desktop client shows repeated "无法重新加载 global / UnexpectedStatus" toasts because almost every workspace-scoped API returns HTTP 500 with Error: Path is not absolute: global (or empty string) when the workspace is global.
Install/channel: next (desktop beta app "OpenCode Beta")
Active plugins: none
Reproduction
Start the desktop beta app (0.0.0-next-17430) and open the session/global workspace view.
The client periodically refreshes workspace-scoped endpoints; watch the log or the UI.
Right-bottom toast appears repeatedly: 「无法重新加载 global … UnexpectedStatus」.
Expected Behavior
The session list and global workspace should load normally (HTTP 200).
Actual Behavior
Session.list passes the workspace identifier (global, or empty string) into a path normalization helper that asserts absolute paths, throwing Error: Path is not absolute: global, and the endpoint returns HTTP 500. The client surfaces this as UnexpectedStatus.
Server log evidence (role=server, service process started via serve --service):
http.method=GET http.url=/api/session http.status=500
cause="Error: Path is not absolute: global
at RN (../core/src/database/path.ts:19:15)
...
at Session.list (../server/src/handlers/session.ts:56:39)"
Within a single refresh cycle the following endpoints all returned 500 (33 occurrences total): /api/agent, /api/command, /api/location, /api/mcp, /api/mcp/resource, /api/model, /api/model/default, /api/permission/request, /api/project/current, /api/provider, /api/question/request, /api/reference, /api/session, /api/vcs, /api/workspace.
Additional Context
Triggered whenever the client requests with workspace=global (or empty); service restart does NOT fix it — a freshly started service process reproduces the same 500s on the next client refresh cycle.
Same root cause also appears with an empty path (Path is not absolute: ), suggesting a shared path-resolution path used across handlers.
Also observed in the same log: SQLiteError: no such column: workspace.project_id (Workspace.list) and repeated SQLiteError: disk I/O error (157 occurrences), possibly related DB schema/state inconsistencies.
Confirmed on Linux x86_64 with OpenCode 2 preview 0.0.0-beta-17639.
The workspace.project_id error is reproducible with a fresh database, so it is not database corruption or a legacy-schema-only problem:
Stop the service.
Move aside the existing OpenCode database files.
Run opencode2 service start.
The server logs database schema bootstrap completed with 44 migrations.
Inspecting the fresh DB shows workspace contains only id, provider, binding, created_at, last_used_at; there is no project_id column.
The server code subsequently queries workspace.project_id and fails with SQLiteError: no such column: workspace.project_id.
As a temporary local workaround, adding a nullable column makes the service usable:
ALTERTABLE workspace ADD COLUMN project_id TEXT;
After applying that workaround, restarting the service and running a minimal chat request completed successfully. This looks like a missing migration/schema definition in the beta rather than a corrupt user database.
Activity
github-actions commentedon Aug 14, 2026
This issue might be a duplicate of an existing issue. Please check:
Error: Path is not absolute: globalincore/src/database/path.ts, all/api/*endpoints returning HTTP 500, repeated toast failures, triggered byserve --servicewith aglobalworkspace identifier. Also assigned to a maintainer with an active investigation.qixuancao commentedon Aug 20, 2026
Confirmed on Linux x86_64 with OpenCode 2 preview
0.0.0-beta-17639.The
workspace.project_iderror is reproducible with a fresh database, so it is not database corruption or a legacy-schema-only problem:opencode2 service start.database schema bootstrap completedwith 44 migrations.workspacecontains onlyid, provider, binding, created_at, last_used_at; there is noproject_idcolumn.workspace.project_idand fails withSQLiteError: no such column: workspace.project_id.As a temporary local workaround, adding a nullable column makes the service usable:
After applying that workaround, restarting the service and running a minimal chat request completed successfully. This looks like a missing migration/schema definition in the beta rather than a corrupt user database.
CasualDeveloper commentedon Aug 20, 2026
Confirmed on macOS arm64 with
opencode2 v0.0.0-next-17444, using the web app fromopencode2 serve.GET /api/session?directory=global&limit=1returns HTTP 500 withPath is not absolute: globalfromdatabase/path.ts/Session.list.Failed to load sessions for global / UnexpectedStatusandFailed to reload global / UnexpectedStatus.This confirms the regression is still present in next-17444.
github-actions commentedon Oct 20, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.