Summary
getMcpConfigForManifest returns a resolved mcp_config that still carries the entire platform_overrides map (including other platforms' commands/env). The runtime config handed to the host is meant to be the resolved config, not the full override map.
Mechanism
src/shared/config.ts:114-128 — result = { ...baseConfig } shallow-copies, then the override branch overwrites command/args/env, but never removes result.platform_overrides. The returned object retains the full block.
Reproduction (executed)
Base config with darwin + win32 overrides, resolved on darwin → output has the correct command but still includes platform_overrides: { darwin: …, win32: … }.
Suggested fix
Drop the field after resolving:
delete result.platform_overrides;
(or construct result from explicit fields instead of spreading the whole base config).
Environment: current main (70fe3b3).
Summary
getMcpConfigForManifestreturns a resolvedmcp_configthat still carries the entireplatform_overridesmap (including other platforms' commands/env). The runtime config handed to the host is meant to be the resolved config, not the full override map.Mechanism
src/shared/config.ts:114-128—result = { ...baseConfig }shallow-copies, then the override branch overwritescommand/args/env, but never removesresult.platform_overrides. The returned object retains the full block.Reproduction (executed)
Base config with
darwin+win32overrides, resolved ondarwin→ output has the correctcommandbut still includesplatform_overrides: { darwin: …, win32: … }.Suggested fix
Drop the field after resolving:
(or construct
resultfrom explicit fields instead of spreading the whole base config).Environment: current
main(70fe3b3).