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
desktop: cannot select or default an agent (no picker, default_agent ignored) #53944
On the OpenCode desktop app (2.0.25, Windows), there is no way to select or default a primary agent. New sessions always start on build, default_agent is ignored, and no agent picker is available. The terminal client on the same machine, server, and config works correctly, so this is isolated to the desktop client.
Environment
opencode version: desktop app 2.0.25.0; CLI + background service 2.0.25
Open a project that defines a custom primary agent and sets default_agent (project opencode.jsonc with "default_agent": "myagent" plus .opencode/agent/myagent.md, mode: primary).
In the desktop app, open a new session in that project.
The session starts on build, not myagent.
Try to switch agents: no selector in the toolbar; Ctrl+P has no "List agents"; Shift+Tab only moves focus.
Expected
New sessions honor default_agent, and an agent picker is available to switch primary agents.
Actual
New sessions always start on build. default_agent is ignored (project and global config). There is no UI to change the agent.
Additional Context
The terminal client (opencode 2.0.25), same server and config, works: it honors default_agent and offers the agent picker (<leader>a / Shift+Tab).
GET /api/agent lists the custom agent as a visible primary alongside Build, Plan, scout.
A session created via POST /api/session has an empty agent field — the default is applied client-side, and the desktop client doesn't apply it.
Server and desktop UI are both 2.0.25 (no version skew).
Thanks for the detailed report. I reproduced this with the web UI from opencode serve, which is built from the same client code as the desktop app (packages/app), on 2.0.25 and on the latest v2 (0621ea9d9).
Setup: a project with "default_agent": "myagent" in opencode.jsonc and .opencode/agent/myagent.md (mode: primary).
The TUI starts on Myagent, as you described.
GET /api/agent lists myagent as a visible primary agent, and POST /api/session creates a session with no agent.
In the app, the composer has no agent control, and Ctrl+P has no agent entry.
Sending a message runs it as Build, and the session is saved with agent: build.
Activity
rore commentedon Oct 8, 2026
Looks like a duplicate of - #50269 - closing.
opencode-agent commentedon Oct 8, 2026
Thanks for the detailed report. I reproduced this with the web UI from
opencode serve, which is built from the same client code as the desktop app (packages/app), on 2.0.25 and on the latestv2(0621ea9d9).Setup: a project with
"default_agent": "myagent"inopencode.jsoncand.opencode/agent/myagent.md(mode: primary).Myagent, as you described.GET /api/agentlistsmyagentas a visible primary agent, andPOST /api/sessioncreates a session with noagent.Ctrl+Phas no agent entry.Build, and the session is saved withagent: build.From the code, there seem to be two causes:
nativefield the v2 API doesn't return, so it never finds one. This part is the same as app: project-local custom agents never make the composer agent picker visible (native flag missing from public Agent.Info) #50269.build, and it never readsdefault_agent.Turning on Show agent should at least bring the picker back. I haven't checked whether that also makes new sessions start on your default agent.
Related: #50269 (hidden picker), #37225 (
default_agentignored in the v2 TUI), #45873 (same symptom in the v1 web UI).2362 commentedon Oct 15, 2026
still reproduces on desktop 2.0.29 (Windows)