Description
When adding projects in the desktop app, two different local directories that point to the same Git repository are merged into a single project. One directory becomes the main project worktree, and the other directory is shown/treated as a sandbox.
This is unexpected. In the desktop app, each added directory should appear as an independent project, even if both directories use the same Git remote or represent different branches of the same repository.
Plugins
OpenCode version
1.15.12
Steps to reproduce
- Clone the same Git repository into two different local directories.
- Checkout a different branch in each directory.
- Open the desktop app.
- Add the first directory as a project.
- Add the second directory as another project.
Actual Behavior
The desktop app merges both directories into one project.
The first added directory becomes the main project, while the second directory is treated as a sandbox of that project.
Expected Behavior
The desktop app should show both directories as separate projects.
Projects in the desktop app should be distinguished by their local directory path, not only by Git repository identity, remote URL, or shared Git metadata.
Why This Matters
It is common to keep multiple checkouts of the same repository in different directories, especially when working on multiple branches at the same time.
Treating one checkout as a sandbox makes it harder to manage them independently in the desktop app.
Suggested Fix
The app could use git worktree list to distinguish linked Git worktrees from separate clones/checkouts.
Proposed behavior:
- If two directories are part of the same
git worktree setup, merging them into one project with sandboxes makes sense.
- If two directories are separate clones or separate local checkouts of the same remote repository, they should be shown as two independent projects.
- In other words, sharing the same Git remote should not be enough to merge projects. The merge should only happen when Git reports the directories as linked worktrees of the same repository.
This would preserve the current sandbox behavior for real Git worktrees while avoiding accidental merging of unrelated local directories.
Screenshot and/or share link
Operating System
window 10
Terminal
Windows Terminal
Description
When adding projects in the desktop app, two different local directories that point to the same Git repository are merged into a single project. One directory becomes the main project worktree, and the other directory is shown/treated as a sandbox.
This is unexpected. In the desktop app, each added directory should appear as an independent project, even if both directories use the same Git remote or represent different branches of the same repository.
Plugins
OpenCode version
1.15.12
Steps to reproduce
Actual Behavior
The desktop app merges both directories into one project.
The first added directory becomes the main project, while the second directory is treated as a sandbox of that project.
Expected Behavior
The desktop app should show both directories as separate projects.
Projects in the desktop app should be distinguished by their local directory path, not only by Git repository identity, remote URL, or shared Git metadata.
Why This Matters
It is common to keep multiple checkouts of the same repository in different directories, especially when working on multiple branches at the same time.
Treating one checkout as a sandbox makes it harder to manage them independently in the desktop app.
Suggested Fix
The app could use
git worktree listto distinguish linked Git worktrees from separate clones/checkouts.Proposed behavior:
git worktreesetup, merging them into one project with sandboxes makes sense.This would preserve the current sandbox behavior for real Git worktrees while avoiding accidental merging of unrelated local directories.
Screenshot and/or share link
Operating System
window 10
Terminal
Windows Terminal