diff --git a/packages/server/src/server/agent/providers/claude-agent.ts b/packages/server/src/server/agent/providers/claude-agent.ts index 5f56c7e7f..935583581 100644 --- a/packages/server/src/server/agent/providers/claude-agent.ts +++ b/packages/server/src/server/agent/providers/claude-agent.ts @@ -224,6 +224,10 @@ function applyRuntimeSettingsToClaudeOptions( }, signal: spawnOptions.signal, stdio: ["pipe", "pipe", "pipe"], + // Bypass cmd.exe on Windows: the SDK passes --mcp-config with inline JSON + // containing double quotes, which cmd.exe mangles (strips quotes, breaks parsing). + // The command is always a resolved binary path, so shell routing is unnecessary. + shell: false, }); if (typeof options.stderr === "function") { child.stderr?.on("data", (chunk: Buffer | string) => {