Expose external Agent Client Protocol agents as optional OpenCode subagents.
Use this when you want the orchestrator to delegate to software-connected tools such as Claude Code ACP, Gemini ACP, or another ACP-compatible coding agent.
Each acpAgents entry creates a lightweight wrapper subagent. The wrapper can
only call acp_run, which:
initialize.session/new.session/prompt.session/update agent_message_chunk text.The wrapper is sandboxed from normal local tools such as bash, edit,
task, webfetch, grep, and glob.
Add acpAgents to ~/.config/opencode/oh-my-opencode-slim.jsonc or a
project-local .opencode/oh-my-opencode-slim.jsonc file:
{
"acpAgents": {
"claude-research": {
"command": "claude-code-acp",
"args": [],
"description": "Claude Code subscription agent for deep research",
"wrapperModel": "openai/gpt-5.6-luna",
"permissionMode": "ask",
"timeoutMs": 300000
},
"gemini-acp": {
"command": "gemini",
"args": ["--experimental-acp"],
"description": "Gemini CLI through ACP"
}
}
}
Restart OpenCode after changing config. Then call the generated agent directly:
@claude-research investigate this bug and summarize the likely cause
Or let the orchestrator delegate to it when its routing prompt matches the task.
| Option | Type | Default | Description |
|---|---|---|---|
command |
string | - | ACP executable. Put flags in args, not here. |
args |
string[] | [] |
Arguments for the ACP command. |
env |
object | {} |
Extra environment variables for the subprocess. |
cwd |
string | current session directory | Working directory override. ACP paths should be absolute. |
description |
string | generated | Role text shown to OpenCode and the orchestrator. |
prompt |
string | generated | Full prompt for the wrapper subagent. Usually unnecessary. |
orchestratorPrompt |
string | generated | Exact routing block injected into the orchestrator prompt. |
wrapperModel |
string | fixer default | Cheap OpenCode model used by the wrapper. |
permissionMode |
ask | allow | reject |
ask |
How ACP permission requests are answered. |
timeoutMs |
integer | 300000 |
Timeout for one ACP run. |
permissionvspermissionMode: These are separate concepts.
permission(on normal custom, built-in, and preset agents) provides SDK-enforced, expressive per-tool rules with pattern support, acceptingask/allow/deny. See Agent Permissions.permissionMode(ACP agents only) controls how the plugin answers the external ACP subprocess's permission requests, with simplerask/allow/rejectoptions.
ACP agents may advertise authMethods during initialization and may require
authentication before session/new. The bridge attempts the first advertised
auth method if the agent reports an auth-required error.
Some agents still require manual setup first. For example, run the external agent's login command in your terminal before using the wrapper:
claude /login
Use the command required by your ACP server.
acp_run.acp_run can only be called by the matching wrapper agent.env.acpAgents key name matches your
@agent name.