Skip to content

[Bug]: OpenCode: custom agents from agent config key not enumerated (only default build shown) #7853

Description

@fxbenard

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Add custom primary agents to ~/.config/opencode/opencode.jsonc:
    {
    "agent": {
    "complex": { "description": "Reasoning", "mode": "primary", "model": "opencode-go/glm-5.2", "prompt": "..." },
    "routine": { "description": "Standard tasks", "mode": "primary", "model": "opencode-go/deepseek-v4-pro", "prompt": "..." },
    "simple": { "description": "Quick answers", "mode": "primary", "model": "opencode/deepseek-v4-flash-free", "prompt": "..." }
    }
    }
  2. Launch T3 Code (desktop), select the OpenCode harness.
  3. Open the agent picker / Agents panel.

Expected behavior

complex, routine, simple (plus built-ins build/plan) are listed and selectable, exactly as in the native opencode TUI, where opencode → Tab cycles all three correctly.

Actual behavior

Only build is shown. Custom agents are invisible to T3.

Impact

Major degradation or frequent failure

Version or commit

T3 0.0.33 (stable) and 0.0.34-nightly; OpenCode 1.18.21

Environment

macOS Tahoe, Apple Silicon, T3 desktop app

Logs or stack traces

Related: #5952 (OpenCode Agents panel enumeration).
Also tested with mode: "all" for custom agents → same result (only build).
Native opencode TUI confirms the agents are valid/loadable (Tab shows all three), so this is a T3-side SDK/UI enumeration gap for OpenCode custom agents.

Screenshots, recordings, or supporting files

No response

Workaround

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions