Answer: You select the primary agent used when a session has not selected one by setting "default_agent" in opencode.jsonc. The selected default must exist, be visible, and support primary use; otherwise OpenCode uses build, then the first visible primary-capable agent. Status: Confirmed Entry: tool/opencode/agents-and-automation/select-agent Revision: 1 Digest: sha256:ba705a90771f35c9 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:27Z Last changed: 2026-11-13T03:55:27Z Last verified: 2026-11-20T13:44:14Z Next check: 2026-11-21T13:44:14Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Setting | default_agent | [1] | 2026-11-20 Fallback agent | build | [1] | 2026-11-20 Config file | opencode.jsonc | [1] | 2026-11-20 Sources: [1] opencode. "Agents | OpenCode". https://opencode.ai/docs/agents/ Role: primary. Accessed: 2026-11-20T13:44:14Z Quote: ""default_agent" : "writer"" (Supports: Setting) Quote: "Otherwise OpenCode uses build , then the first visible primary-capable agent." (Supports: Fallback agent) Quote: "opencode.jsonc Copy Copied Failed" (Supports: Config file) Snapshot SHA-256: a4d70968cf4cad31cb27a288ac9341ec6bcbc97acb00c712b5681098e11ab672 (captured 2026-11-13T03:55:26Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:55:27Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:14Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:14Z Last attempt: 2026-11-20T13:44:14Z Notes and limitations: Extracted automatically from a single official source (section "Selection"). Related: https://latestn.com/tool/opencode/agents-and-automation/server-plugin-lifecycle-setup How do I define a server plugin in opencode and run code when it loads? https://latestn.com/tool/opencode/agents-and-automation/server-plugin-transforms How do I transform or modify opencode behavior using the plugin API? https://latestn.com/tool/opencode/commands-and-shortcuts/attachment-syntax How do I describe an attachment in opencode prompt syntax? https://latestn.com/tool/opencode/agents-and-automation/create-skill How do I create a skill in opencode? https://latestn.com/tool/opencode/agents-and-automation/export-effect-plugin How do I export an Effect plugin so opencode loads it automatically? https://latestn.com/tool/opencode/agents-and-automation/run-non-interactive How do I run opencode non-interactively for scripts or CI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:55:27Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/agents-and-automation/select-agent/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/agents-and-automation/select-agent POST: https://latestn.com/dispute/tool/opencode/agents-and-automation/select-agent with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/agents-and-automation/select-agent?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I switch between or select different opencode agents? Revision 1, last verified 2026-11-20T13:44:14Z. https://latestn.com/tool/opencode/agents-and-automation/select-agent (accessed 2026-11-21T09:54:25Z). @misc{LatestN_tool_opencode_agents_and_automation_select_agent_r1, title = {How do I switch between or select different opencode agents?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/agents-and-automation/select-agent}}, note = {Revision 1; digest sha256:ba705a90771f35c9; last verified 2026-11-20T13:44:14Z; accessed 2026-11-21T09:54:25Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/agents-and-automation/select-agent