diff options
| author | Sewer. <[email protected]> | 2026-01-07 04:29:17 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-06 22:29:17 -0600 |
| commit | fd7b7eacd3c2da70021ec3ed4905d072abd20b56 (patch) | |
| tree | 6b47bd4b38caad9e88dc474d6e8fed90999ad6c8 /packages/web/src/content | |
| parent | eaa0826e7fa3aa5a52d670dad0dce92108843700 (diff) | |
| download | opencode-fd7b7eacd3c2da70021ec3ed4905d072abd20b56.tar.gz opencode-fd7b7eacd3c2da70021ec3ed4905d072abd20b56.zip | |
Added: Ability to hide subagents from primary agents system prompt. (#4773)
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Diffstat (limited to 'packages/web/src/content')
| -rw-r--r-- | packages/web/src/content/docs/agents.mdx | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/agents.mdx b/packages/web/src/content/docs/agents.mdx index f3f0b52eb..3dfd16e7d 100644 --- a/packages/web/src/content/docs/agents.mdx +++ b/packages/web/src/content/docs/agents.mdx @@ -510,6 +510,62 @@ The `mode` option can be set to `primary`, `subagent`, or `all`. If no `mode` is --- +### Hidden + +Hide a subagent from the `@` autocomplete menu with `hidden: true`. Useful for internal subagents that should only be invoked programmatically by other agents via the Task tool. + +```json title="opencode.json" +{ + "agent": { + "internal-helper": { + "mode": "subagent", + "hidden": true + } + } +} +``` + +This only affects user visibility in the autocomplete menu. Hidden agents can still be invoked by the model via the Task tool if permissions allow. + +:::note +Only applies to `mode: subagent` agents. +::: + +--- + +### Task permissions + +Control which subagents an agent can invoke via the Task tool with `permission.task`. Uses glob patterns for flexible matching. + +```json title="opencode.json" +{ + "agent": { + "orchestrator": { + "mode": "primary", + "permission": { + "task": { + "*": "deny", + "orchestrator-*": "allow", + "code-reviewer": "ask" + } + } + } + } +} +``` + +When set to `deny`, the subagent is removed from the Task tool description entirely, so the model won't attempt to invoke it. + +:::tip +Rules are evaluated in order, and the **last matching rule wins**. In the example above, `orchestrator-planner` matches both `*` (deny) and `orchestrator-*` (allow), but since `orchestrator-*` comes after `*`, the result is `allow`. +::: + +:::tip +Users can always invoke any subagent directly via the `@` autocomplete menu, even if the agent's task permissions would deny it. +::: + +--- + ### Additional Any other options you specify in your agent configuration will be **passed through directly** to the provider as model options. This allows you to use provider-specific features and parameters. |
