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
new workspace always branches from the current head #39778
creating a new workspace (worktree) always branches from the current head of the project checkout.
the branch chip in the new session bar is display only. there is no way to pick the base branch before creating the workspace.
git worktree add --no-checkout -b <branch> <dir> is invoked with no start point, so whatever branch you happen to be sitting on becomes the base. if you are on a feature branch, the new workspace silently inherits it.
expected behavior
the branch chip should be clickable
clicking it should list local and remote branches with search
in new workspace mode the selected branch becomes the base ref for git worktree add
with no selection the workspace should branch from the repo default branch, not the current head
in local or existing workspace mode selecting a branch should check it out
This issue might be a duplicate of or related to existing issues. Please check:
[FEATURE]: Configurable worktree creation — base ref, branch naming, repo-relative path #33332: Configurable worktree creation — base ref, branch naming, repo-relative path — this feature request covers the same underlying problem (worktree always branching from HEAD with no way to select a base ref) and proposes a design to address it, including a clickable branch UI and baseRef config option.
Since this was filed, the desktop app's new-session bar has gained a base-branch picker. In New Workspace mode the branch chip now shows from <branch>. Clicking it opens a searchable branch list, and the branch you pick is used as the start point when the worktree is created. So on a current v2 build you should be able to choose the base branch.
Two parts of your request work differently today:
With no branch selected, a new workspace starts from the project checkout's current branch, not the repo's default branch.
In Local or existing-workspace mode the chip only shows the branch; you can't use it to check out a different one.
That's how it's designed right now, so I'm treating these as a feature request. Maintainers will consider them.
Closing as completed. Since #44906, New Workspace has a "from " picker, and the worktree is created from the branch you choose. #60263 and #60579 made the picker easier to reach. Without a choice, the base is still the current HEAD. Defaulting to the repo's default branch, or checking out the chosen branch in Local mode, would be new feature requests. The blank-picker bug is tracked in #51072.
Activity
github-actions commentedon Jul 31, 2026
This issue might be a duplicate of or related to existing issues. Please check:
baseRefconfig option.opencodejr commentedon Oct 28, 2026
Thanks for the detailed write-up, @ProdigyRahul!
Since this was filed, the desktop app's new-session bar has gained a base-branch picker. In New Workspace mode the branch chip now shows
from <branch>. Clicking it opens a searchable branch list, and the branch you pick is used as the start point when the worktree is created. So on a current v2 build you should be able to choose the base branch.Two parts of your request work differently today:
That's how it's designed right now, so I'm treating these as a feature request. Maintainers will consider them.
Related issues:
from <branch>picker sometimes shows up blank in New WorkspaceIf you still can't pick a base branch on a current v2 build, please reply with your
opencode --versionand a screenshot.neriousy commentedon Nov 13, 2026
Closing as completed. Since #44906, New Workspace has a "from " picker, and the worktree is created from the branch you choose. #60263 and #60579 made the picker easier to reach. Without a choice, the base is still the current HEAD. Defaulting to the repo's default branch, or checking out the chosen branch in Local mode, would be new feature requests. The blank-picker bug is tracked in #51072.