diff options
| author | Matt Silverlock <[email protected]> | 2025-12-20 12:46:48 -0500 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-20 11:49:23 -0600 |
| commit | 8f6c8844d742b56858823e57388e8149f665cb7a (patch) | |
| tree | 7113743b383c1f8a6329531ef214c8e47d3c7b64 /packages/web/src/content/docs/config.mdx | |
| parent | da6e0e60c0ca42d54595553fc1ab70f62be6e3b9 (diff) | |
| download | opencode-8f6c8844d742b56858823e57388e8149f665cb7a.tar.gz opencode-8f6c8844d742b56858823e57388e8149f665cb7a.zip | |
feat: support configuring a default_agent across all API/user surfaces (#5843)
Co-authored-by: observerw <[email protected]>
Diffstat (limited to 'packages/web/src/content/docs/config.mdx')
| -rw-r--r-- | packages/web/src/content/docs/config.mdx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index 302d79d17..5ba22ff2d 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -194,6 +194,23 @@ You can also define agents using markdown files in `~/.config/opencode/agent/` o --- +### Default agent + +You can set the default agent using the `default_agent` option. This determines which agent is used when none is explicitly specified. + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "default_agent": "plan" +} +``` + +The default agent must be a primary agent (not a subagent). This can be a built-in agent like `"build"` or `"plan"`, or a [custom agent](/docs/agents) you've defined. If the specified agent doesn't exist or is a subagent, OpenCode will fall back to `"build"` with a warning. + +This setting applies across all interfaces: TUI, CLI (`opencode run`), desktop app, and GitHub Action. + +--- + ### Sharing You can configure the [share](/docs/share) feature through the `share` option. |
