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
Custom primary agents fail silently in web UI #29468
Custom primary agents defined in opencode.json (or .opencode/agents/*.md) appear in the web UI dropdown but cannot process chat messages. Submitting a message produces an error sound with no visible error or console output. Built-in agents (build, plan) work normally.
Tested and confirmed on v1.15.7 through v1.15.10. Even a minimal custom agent with no prompt, no model, and no permissions fails the same way.
OpenCode version
v1.15.10 (also reproduced on v1.15.7, v1.15.8, v1.15.9)
Operating System
Windows 11
Terminal
Windows Terminal (for CLI tests). Issue is in the web UI (opencode web).
Steps to reproduce
Create an opencode.json with a custom primary agent:
{
"agent": {
"my-agent": {
"mode": "primary",
"description": "Test custom agent"
}
}
}
Run opencode web and open the browser
Select the custom agent from the dropdown
Type a message and submit
Expected: agent processes the message and responds
Actual: error sound plays, no response, no console errors
Additional bugs found during investigation
GET /agent?workspace=X crashes with a 500 error
GET /agent?directory=X filters response to only native:true (built-in) agents, excluding all custom agents
The SPA calls GET /agent?directory=&workspace=, triggering both issues
A workaround for the /agent endpoint issues is to strip directory and workspace params at the proxy layer
Notes
The affected API endpoint (/agent) correctly returns the custom agent with mode:"primary" and native:false
The client-side filter (mode !== "subagent" && !hidden) correctly includes the agent in the dropdown
The failure happens server-side during session creation
Overriding the built-in plan agent with a custom prompt also fails (the built-in prompt is used regardless)
Custom primary agents work correctly in CLI/TUI mode
Activity
github-actions commentedon Jul 26, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.