From 12685fbd8c36209afbac728b2fd76179a1876fe8 Mon Sep 17 00:00:00 2001 From: JustYannicc <52761674+JustYannicc@users.noreply.github.com> Date: Wed, 18 Mar 2026 10:39:06 +0100 Subject: [PATCH] fix: use system claude binary instead of SDK-bundled cli.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The claude-agent-sdk bundles its own cli.js inside node_modules. In the packaged Electron app this file lives inside the asar archive, where child_process.spawn cannot execute it — causing the Claude Code process to exit with code 1 immediately after session start. Default pathToClaudeCodeExecutable to "claude" (resolved via PATH) so the adapter uses the system-installed binary, matching how the Codex adapter already defaults to "codex". Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/server/src/provider/Layers/ClaudeAdapter.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/server/src/provider/Layers/ClaudeAdapter.ts b/apps/server/src/provider/Layers/ClaudeAdapter.ts index 673f08620..3e841e6f9 100644 --- a/apps/server/src/provider/Layers/ClaudeAdapter.ts +++ b/apps/server/src/provider/Layers/ClaudeAdapter.ts @@ -2237,9 +2237,7 @@ function makeClaudeAdapter(options?: ClaudeAdapterLiveOptions) { const queryOptions: ClaudeQueryOptions = { ...(input.cwd ? { cwd: input.cwd } : {}), ...(input.model ? { model: input.model } : {}), - ...(providerOptions?.binaryPath - ? { pathToClaudeCodeExecutable: providerOptions.binaryPath } - : {}), + pathToClaudeCodeExecutable: providerOptions?.binaryPath ?? "claude", ...(effectiveEffort ? { effort: effectiveEffort } : {}), ...(permissionMode ? { permissionMode } : {}), ...(permissionMode === "bypassPermissions"