Repository navigation
Description
Description
OpenCode desktop app misidentifies the opened project directory as another (sibling) project, and keeps restoring the wrong workspace on every launch.
I copied D:\_Programming\WEB-Tools\Electron_OpenProject to D:\_Programming\WEB-Tools\Electron_MailPlug to start a new project. When I open Electron_MailPlug in the desktop app, it is recognized and displayed as Electron_OpenProject — the original folder it was copied from. Closing the project, fully quitting the app, and reopening MailPlug does not help; the app keeps reopening the OpenProject workspace (icon color, sessions, prompt history, etc.).
Root cause: the workspace identifier key is derived from only the first ~10–14 characters of the folder path, not from the full path or a hash of it. All sibling folders under D:\_Programming\WEB-Tools\ collide into the same workspace key.
Two encoding schemes observed in %APPDATA%\ai.opencode.desktop\:
opencode.workspace.D--_Programm.<randomId>.dat— path prefixD:\_Programm(14 chars,:and\replaced with-)opencode.workspace.RDpcX1Byb2dy.<randomId>.dat— base64 ofD:\_Progr(10 chars)
Both prefixes are shared by Electron_OpenProject, Electron_MailPlug, and any other sibling folder. On top of that, opencode.global.dat stores server.lastProject.local = D:\_Programming\WEB-Tools\Electron_OpenProject, so even after deleting every opencode.workspace.*.dat file, the app reads lastProject on startup and reopens the wrong project, regenerating the workspace files.
Expected: each distinct full directory path maps to its own workspace; copying a folder should not inherit the original's workspace identity.
Plugins
@tarquinen/opencode-dcp, @franlol/opencode-md-table-formatter@latest, superpowers@git+https://github.com/obra/superpowers.git
OpenCode version
1.17.13 (desktop app, Electron build)
Steps to reproduce
- Have an existing project at
D:\_Programming\WEB-Tools\Electron_OpenProjectand open it at least once in the OpenCode desktop app so workspace state is created. - Copy that folder to a sibling path, e.g.
D:\_Programming\WEB-Tools\Electron_MailPlug. - In the desktop app: File → Open Project → select
Electron_MailPlug. - Observe the app loads the
Electron_OpenProjectworkspace (wrong icon color, sessions, prompt history). - Close the project and fully quit the app.
- Delete every
opencode.workspace.*.datunder%APPDATA%\ai.opencode.desktop\. - Relaunch the app and open
Electron_MailPlugagain — it still reopens asElectron_OpenProject, becauseopencode.global.dat→server.lastProject.localstill points at the old path and the workspace key prefix collision recreates the same workspace files.
Actual result: the copied folder is never treated as a new, independent workspace.
Expected result: the copied folder gets its own workspace key derived from the full path, so it opens as Electron_MailPlug with a clean state.
Screenshot and/or share link
Workspace key collision evidence — two different encoding schemes, both truncated to the same path prefix:
%APPDATA%\ai.opencode.desktop\
opencode.workspace.D--_Programm.10tz19z.dat # "D:\_Programm" (14 chars)
opencode.workspace.D--_Programm.13iacx.dat
opencode.workspace.D--_Programm.1inq7oi.dat
... (13 files, all share the same D--_Programm prefix)
opencode.workspace.RDpcX1Byb2dy.106zhi.dat # base64("D:\_Progr") (10 chars)
opencode.workspace.RDpcX1Byb2dy.149qp08.dat
... (14 files, all share the same RDpcX1Byb2dy prefix)
opencode.global.dat → server key:
"server": "{\"list\":[],\"projects\":{\"local\":[]},\"lastProject\":{\"local\":\"D:\\\\_Programming\\\\WEB-Tools\\\\Electron_OpenProject\"}}"All sibling folders under D:\_Programming\WEB-Tools\ (Electron_OpenProject, Electron_MailPlug, Electron_Planka, ...) collapse onto the same workspace key.
Operating System
Windows 11
Terminal
N/A (desktop app / Electron)
Activity
github-actions commentedon Jul 4, 2026
This issue might be a duplicate of existing issues. Please check:
Hona commentedon Sep 2, 2026
Fixed for opencode2 launch via #46713
You can try the desktop beta here: https://github.com/anomalyco/opencode-beta