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
A folder that no longer exists gets turned into a new project #57988
A folder that no longer exists gets turned into a new project. In my case it was the folder of a deleted workspace (see the related report about deleting such workspaces). It was still in the app's "recently closed" list, and after an app restart the service created a new non-git project for it.
Environment
OpenCode Desktop 2.1.2 (arm64), macOS 27.0.1
What I saw
The app restarted at 19:39:16. At 19:39:19 a new project row appeared for <parent>/.worktrees/<name> (the deleted folder), with vcs = null and no sessions.
At the same time the service answered GET /api/vcs/status and GET /api/vcs/diff with 404 several times, and started watchers on the parent folders.
The project shows up in GET /api/project. Its time_active was updated again at the next launch.
The path was still in the app state: drafts.sqlite, row opencode.global.dat / server, recentlyClosed.local.
Expected
No project is created for a directory that doesn't exist. Missing paths in "recently closed" are dropped or shown as missing.
Actual
A project for a missing folder is created and kept.
Thanks for the detailed report. I reproduced this with the server API on 2.1.2, and it still happens on the latest dev (248bfbe).
What I did (the script is below):
Started opencode serve with a fresh data directory.
Sent GET /api/vcs/status and GET /api/vcs/diff for a .worktrees/<name> folder that doesn't exist. Both correctly return 404 LocationNotFoundError.
Checked GET /api/project: it now lists a project for that missing folder (no vcs, no sessions).
Restarted the server: the project is still listed.
So the 404 is right, but the service saves the project before it notices the folder is missing, and it keeps it afterwards. That fits what you saw after the app restarted with the deleted workspace still in "recently closed". I only tested the server side; I didn't check the Desktop "recently closed" handling.
Activity
opencode-agent commentedon Oct 22, 2026
Thanks for the detailed report. I reproduced this with the server API on 2.1.2, and it still happens on the latest
dev(248bfbe).What I did (the script is below):
opencode servewith a fresh data directory.GET /api/vcs/statusandGET /api/vcs/difffor a.worktrees/<name>folder that doesn't exist. Both correctly return 404LocationNotFoundError.GET /api/project: it now lists a project for that missing folder (novcs, no sessions).So the 404 is right, but the service saves the project before it notices the folder is missing, and it keeps it afterwards. That fits what you saw after the app restarted with the deleted workspace still in "recently closed". I only tested the server side; I didn't check the Desktop "recently closed" handling.
Related issues:
Reproduction script (repro.sh)
Run it:
bash repro.sh