GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Windows v1.18.1: legacy DB migrates, CLI sees sessions, but Desktop loses historical projects and sessions · Issue #37041 · anomalyco/opencode Closed as not planned Closed as not planned Copy link DescriptionSummaryOn Windows, OpenCode Desktop v1.18.1 initially failed to start against an existing local database with able project already exists. After recovering the legacy schema enough for v1.18.1 to complete its official migrations, Desktop starts, but it shows no historical projects or sessions. The v1.18.1 CLI reads the same database and lists the historical sessions correctly. Environment
Original failureDesktop startup repeatedly failed with:
The database already contained the project table and historical data. Its legacy Drizzle journal was inconsistent: __drizzle_migrations had repeated 20260428004200_add_session_path entries, while the newer migration journal contained only that migration ID. v1.18.1 therefore attempted to replay the initial migration. Database evidence before/after recoveryThe original database contained, and the recovered database still contains:
Recovery steps attemptedI first backed up the database and then followed the workaround in #16678 to backfill old Drizzle migration names. This exposed real schema drift because some legacy migration IDs were present even though their schema changes had never run. The verified missing official changes were:
Those were applied using the exact SQL from the v1.18.1 migration source. Then the v1.18.1 Desktop migration runner completed all remaining official migrations. Current problemDesktop now starts successfully, but it shows no historical projects and no historical sessions. The CLI can read the same DB correctly:
For example, running opencode session list from C:/Users/ returns historical sessions. Direct SQL also returns all 20 rows from session. 18 historical sessions still have session.project_id = 'global' and are distributed across several historical directories, including:
Desktop state/cache attemptI also tested the workaround discussed in #36064: closed Desktop, backed up, removed only %APPDATA%/ai.opencode.desktop/opencode.global.dat and %APPDATA%/ai.opencode.desktop/opencode.workspace.*.dat, then restarted. This did not restore visibility. Restoring the backed-up Desktop state files also did not restore historical projects/sessions. No session/message/part data was deleted. Expected behavior
Related
RequestPlease provide or merge a supported recovery path for legacy databases where migration journal entries and actual schema drift apart, including reconstruction of Desktop project/directory indexing from persisted sessions. I can provide sanitized schema dumps or additional SQL output if useful. Reacted by Adrian Cockburn Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |