Skip to content

fix(desktop): add opencode to default_agent_args for ACP support - #3706

Open
Chukwuebuka-2003 wants to merge 1 commit into
block:mainfrom
Chukwuebuka-2003:fix/opencode-acp-argument
Open

fix(desktop): add opencode to default_agent_args for ACP support#3706
Chukwuebuka-2003 wants to merge 1 commit into
block:mainfrom
Chukwuebuka-2003:fix/opencode-acp-argument

Conversation

@Chukwuebuka-2003

Copy link
Copy Markdown

Summary

The default_agent_args function was missing the opencode command identity. When a user selects the built-in OpenCode harness without specifying custom arguments, the agent launches without the required acp argument. This causes the ACP initialize to time out after 60 seconds.

Fixes #3660

Root cause

default_agent_args in desktop/src-tauri/src/managed_agents/discovery.rs maps command names to their default ACP arguments. OpenCode needs ["acp"] like Goose, but it was not listed — so normalize_agent_args returned an empty arg list when no user-defined args were stored on the record.

Normalization path when args are empty and no custom harness definition exists:

normalize_agent_args("opencode", []) → default_agent_args("opencode") → None → returns []

Fix

Added "opencode" => Some(vec!["acp".to_string()]) to default_agent_args.

Testing

cargo check --workspace   # compiles cleanly

The default_agent_args function was missing the opencode command, so when a user selects the OpenCode harness without specifying custom arguments, the agent launches without the required 'acp' argument. This caused the ACP initialize to time out after 60 seconds.

Fixes block#3660

Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
@Chukwuebuka-2003
Chukwuebuka-2003 requested a review from a team as a code owner July 30, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opencode acp not working

1 participant