Repository navigation
Description
Summary
In the opencode v2 desktop app (macOS), opening New Workspace (新建工作区) from the project dropdown shows an empty / missing from <branch> base-branch picker. The picker only renders after toggling the selection in the dropdown a few times. This makes it impossible to know or change which branch a new workspace will be created from until you fiddle with the dropdown.
Environment
- opencode version: v2.0.12 (CLI
opencode --version); desktop v2 app - OS: Darwin 27.0.0 (arm64), macOS
- Terminal: N/A — desktop app
- Shell: /bin/zsh
- Install/channel: latest (desktop)
- Active plugins: none found in
~/.config/opencode/opencode.json
Reproduction
- Open the v2 desktop app on macOS.
- Select a normal git project (e.g.
eva-evolve) from the project dropdown. - Choose 新建工作区 / New Workspace.
- Observe the right side of the bar (
<project> / + 新建工作区): thefrom <branch>control does not appear / is blank. - Switch the selection in the dropdown (move off and back onto New Workspace) a few times.
- The
from <branch>control eventually appears.
Expected Behavior
Selecting New Workspace should immediately render the from <branch> picker, populated with the resolved default base branch (e.g. from main), without needing repeated toggling.
Actual Behavior
On entering New Workspace from the project dropdown, the from <branch> control is missing/empty and only shows up after switching back and forth in the dropdown several times (reproducible every time on this setup). No error is surfaced in the UI.
Additional Context
-
Frequency: reproducible every time; the control appears only after a few dropdown toggles.
-
Project state: standard git repository (
eva-evolve), HEAD onmain, multiple local branches, remotesoriginandupstreamconfigured, and many existing worktrees under~/.local/share/opencode/worktree/.... -
Server logs (
~/.local/share/opencode/log/opencode.log) show that when the project is opened, the server runs the branch listing for the picker, e.g.:command=git args="[\"--no-optional-locks\", \"-c\", \"core.autocrlf=false\", ..., \"for-each-ref\", \"--ignore-case\", \"--sort=refname\", \"--sort=-committerdate\", \"--format=%(refname:short)\", \"--count=50\", \"refs/heads\", \"refs/remotes\"]" cwd=/Users/secret/Documents/GitHub/eva-evolveThis suggests the branch data is fetched asynchronously and the control simply does not re-render once it arrives (or renders empty while the request is in flight).
-
Also seen in the same log, for context on how the project is resolved:
level=WARN message="worktree discovery failed" directory=/Users/secret/Documents/GitHub strategy=git error=Worktree.DirectoryUnavailableError -
The
for-each-refresult for this repo includes bareoriginandupstreamentries alongsideorigin/main,main, etc.:
origin, origin/main, main, feat/tooltip-system, ...(not sure if this is related, but it is unusual). -
Possibly related: new workspace always branches from the current head #39778 (
new workspace always branches from the current head) and V2 UI does not support workspaces #39614 (V2 UI does not support workspaces). -
Workaround: toggle the project dropdown selection a few times until the
from <branch>control appears.
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report. I wasn't able to reproduce this here: it needs the desktop app on macOS, and the sandbox I run in only has a headless Linux environment without the desktop or web UI. A maintainer with the desktop app will need to check it.
In the meantime, it would help to know whether it still happens on the latest desktop release, since the New Session project/worktree picker has changed several times since v2.0.12.
Related issues, for context: