Repository navigation
Description
Description
OpenCode Desktop 2.0.29 uses Build instead of my configured custom primary agent when the composer’s agent picker is hidden.
My global configuration contains:
{
"default_agent": "agent"
}The running V2 server lists agent as a visible primary agent, but the native app uses Build. Enabling Settings → Preferences → Show agent allows manual selection.
Expected: a new session without an explicit agent choice should use the configured default_agent, regardless of whether the picker is visible. Existing sessions should retain their previously selected agent.
Source evidence in v2.0.29:
https://github.com/anomalyco/opencode/blob/042d0832f5f3a73eaa039a58a7d565776f6d4290/packages/app/src/providers/models/selection.tsx
The GUI initializes its selection from the first agent in the list and resolves the active agent using:
pickAgent(scope()?.agent ?? durable()?.agent ?? (agentsVisible() ? store.current : "build"))This explicitly falls back to Build when the picker is hidden rather than honoring default_agent.
The setting’s description also states: “Switch between agents in the composer. When hidden, defaults to Build agent.”
https://github.com/anomalyco/opencode/blob/v2.0.29/packages/app/src/runtime/i18n/en.ts
Related: #50269 concerns automatic picker visibility. This report concerns picker visibility changing the selected default agent.
Workaround: enable Show agent and select the intended agent manually.
Plugins
No response
OpenCode version
Native desktop app: 2.0.29 Connected V2 server: 2.0.29 Separately installed Homebrew CLI: 2.0.27
Steps to reproduce
Suggested minimal reproduction based on the observed behavior and release source; not independently tested in a clean environment:
-
Configure a custom primary agent as the default:
{ "$schema": "https://opencode.ai/config.json", "default_agent": "agent", "agents": { "agent": { "mode": "primary", "system": "You are the configured primary agent." } } } -
Load the configuration and open the native desktop app connected to the V2 server.
-
Leave Settings → Preferences → Show agent disabled.
-
Create a new session without explicitly selecting an agent.
-
Send a prompt and inspect which agent runs.
-
Compare with enabling Show agent and manually selecting
agent.
Expected: the new session uses agent.
Observed in my setup: the native app uses Build instead.
Screenshot and/or share link
No response
Operating System
macOS 27.0 (build 26A428), Apple silicon / arm64
Terminal
N/A — native Electron desktop app. Diagnostic shell: /bin/zsh.
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the detailed report and for pointing to the exact source lines. I think this is a duplicate of #53944, which reported the same thing on Desktop 2.0.25: new sessions start on
buildand ignore the configureddefault_agent, while the CLI/TUI uses it correctly. That issue was closed in favour of #50269, which is still open.Possible duplicates and related issues, ordered from most to least likely:
default_agentis ignored and new sessions always start onbuild.default_agentfor new sessions); already closed as a duplicate of desktop: cannot select or default an agent (no picker, default_agent ignored) #53944.default_agentproblem in the Web UI on v1.You're right that this is more than picker visibility. On current
dev, the app never readsdefault_agent. When the picker is hidden it falls back tobuild, and when it's shown it starts on the first agent in the list. I've noted this so that fixing #50269 also covers usingdefault_agentfor new sessions. Until then, your workaround (turn on Show agent and pick the agent manually) is the way to go.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Dante-dan commentedon Oct 15, 2026
I traced the new-session fallback on
dev: it never readsdefault_agent, and hiding the picker forcesbuild. I’ll fix the default selection independently of the picker-visibility work in #50269, preserving explicit choices and existing sessions. The configured agent will still be validated against visible primary agents, with the existing fallback when unavailable.opencode-agent commentedon Oct 15, 2026
Closing this as a duplicate of #53944. It's been a day since the duplicate note and there's been no reply saying how this is different. That issue covers the same problem: the desktop app ignores
default_agentand starts new sessions onbuild. It was closed in favour of #50269, which is still open.You showed that the app never reads
default_agent: it falls back tobuildwhen the picker is hidden, and to the first agent in the list when it's shown. That's useful context for #50269, since fixing picker visibility alone wouldn't solve it. Until it's fixed, turn on Settings → Preferences → Show agent and pick your agent manually.If you think this should stay open, reply here.