Skip to content

Title: (OpenCode-Desktop) Open Project no longer detects manually created git worktrees as workspaces, and stale workspace entries cannot be removed on macOS #21554

@matiasBarrera98

Description

@matiasBarrera98

Description

I'm seeing two related problems with manually managed git worktrees in OpenCode Desktop on macOS.

The project has workspaces enabled.

  1. If I create a git worktree manually outside of OpenCode and then open that folder in OpenCode Desktop using Open Project, OpenCode no longer detects it as a worktree and does not add it as a workspace.
  2. If I later delete that worktree manually, the corresponding workspace entry can remain in OpenCode Desktop and I can no longer remove that workspace from the app.

This used to work before, so this appears to be a regression in workspace/worktree detection and cleanup.

Expected behavior

  • When opening a manually created git worktree via Open Project, OpenCode Desktop should detect it as a worktree and add it as a workspace
  • If a worktree no longer exists on disk, OpenCode Desktop should either automatically remove the stale workspace entry or allow the user to remove it manually

Actual behavior

  • Open Project no longer detects manually created git worktrees as workspaces
  • After deleting a worktree manually, a stale workspace entry can remain
  • That stale workspace can become undeletable from the app

Possibly related:

Plugins

No response

OpenCode version

1.4.0

Steps to reproduce

  1. Enable workspaces for the project
  2. Open a git repo in OpenCode Desktop on macOS
  3. Create a git worktree manually outside of OpenCode, for example:
    git worktree add ../my-feature -b my-feature
  4. In OpenCode Desktop, use Open Project and select that manually created worktree folder
  5. Observe that OpenCode does not detect it as a worktree / workspace the way it used to
  6. Delete that worktree manually outside of OpenCode
  7. Return to OpenCode Desktop
  8. Observe that the workspace entry may still remain in the UI
  9. Try to remove that workspace from OpenCode Desktop
  10. Observe that the workspace cannot be removed

Screenshot and/or share link

No response

Operating System

macOS 26.2

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions