From e2ace0d8b5d054a7e97a18323b77deb3464bbe5e Mon Sep 17 00:00:00 2001 From: Debug Agent Date: Mon, 1 Jun 2026 19:45:19 +0200 Subject: [PATCH] docs(acp): clarify mcp_config is a shared field, not ACP-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ACPAgentSettings now accepts mcp_config (its MCP servers are forwarded to the ACP subprocess at session creation — see software-agent-sdk). Document on ACP_SETTINGS_KEYS that mcp_config is deliberately excluded from this ACP-exclusive allow-list: it is shared with the OpenHands agent variant, so clients must handle it per-variant (like llm/agent_context) rather than stripping it when switching agent kinds. Part of OpenHands/agent-canvas#993. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/models/acp.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/models/acp.ts b/src/models/acp.ts index a951597..488e6a2 100644 --- a/src/models/acp.ts +++ b/src/models/acp.ts @@ -90,9 +90,16 @@ export function getAcpProvider(key: string | null | undefined): ACPProviderInfo } /** - * Allow-list of fields that travel on an `ACPAgent` settings payload. - * Mirrors `openhands.sdk.settings.model.ACPAgentSettings`'s field set. - * Clients filter ACP-only fields out when switching to a non-ACP variant. + * Allow-list of the `acp_*`-prefixed fields that travel on an `ACPAgent` + * settings payload. Mirrors `openhands.sdk.settings.model.ACPAgentSettings`'s + * ACP-exclusive field set. Clients filter these out when switching to a + * non-ACP variant. + * + * Deliberately excludes `mcp_config`: it is also a valid `ACPAgent` field (its + * MCP servers are forwarded to the ACP subprocess at session creation), but it + * is **shared** with the OpenHands agent variant — so it must NOT be stripped + * when switching agent kinds. Treat `mcp_config` like `llm`/`agent_context` + * (shared, handled explicitly per variant), not as an ACP-only field. */ export const ACP_SETTINGS_KEYS: readonly string[] = [ 'acp_command',