anomalyco / anomalyco/opencode

Desktop shows the primary worktree branch for manually opened worktrees

Open
#42,976 1 comment 0 reactions 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Aug 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

When a Git worktree created with git worktree add is opened in Desktop, the session is correctly bound to that directory but the new-session context shows the branch of the primary worktree.

This happens because the UI falls back to the aggregated project root when the workspace selector is unavailable.

Plugins

No response

OpenCode version

No response

Steps to reproduce
  1. Create a secondary worktree with git worktree add.
  2. Open that worktree with Desktop's Open Folder action.
  3. Open a new session.
  4. Observe that the displayed branch belongs to the primary worktree instead of the opened worktree.
Screenshot and/or share link

No response

Operating System

macOS

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.