Skip to content

Sessions fail to load after upgrading from v1.15.13 to v1.16.2 — workspace ID format mismatch #31537

Closed as not planned

Description

@HazeChaser

Description

Version:

Old: v1.15.13
New: v1.16.2
Platform: Windows x64
Install: opencode-desktop (Electron)
Description: After auto-updating from v1.15.13 to v1.16.2, all previously created conversations fail to load. Resuming any old session shows "Unable to load".

Error log (logs/20260609T152507/renderer.log):

[error] Failed to load sessions Error: Expected a string starting with "wrk", got "wks_global"
at [0]["workspaceID"]
Root cause: v1.16.2 expects workspace/session IDs starting with "wrk", but data stored by v1.15.13 in opencode.global.dat uses the "wks_global" format. The migration during upgrade did not convert old IDs to the new format, causing all historical sessions to become unreadable. The data files themselves are intact.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. jlongster commented on Jun 9, 2026

    @jlongster
    Contributor

    Hi @HazeChaser

    Sorry about this. The wks_global string is a bad string in your db, I'm not exactly sure how it got there, but in a more recent version we implemented stricter validation of this data which is why you're hitting it now.

    You can run this in your db to fix:

    UPDATE session
    SET workspace_id = NULL
    WHERE workspace_id = 'wks_global';
    

    Run sqlite3 on your db, and you can find the path with opencode db path

    Did you ever run a development or beta version of opencode? "wks_global" might have come from an older development build but I don't think we ever shipped something that used that

  2. github-actions commented on Aug 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions