Skip to content

Commit 12685fb

Browse files
JustYanniccclaude
andcommitted
fix: use system claude binary instead of SDK-bundled cli.js
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) <noreply@anthropic.com>
1 parent a75a9b4 commit 12685fb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

apps/server/src/provider/Layers/ClaudeAdapter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,9 +2237,7 @@ function makeClaudeAdapter(options?: ClaudeAdapterLiveOptions) {
22372237
const queryOptions: ClaudeQueryOptions = {
22382238
...(input.cwd ? { cwd: input.cwd } : {}),
22392239
...(input.model ? { model: input.model } : {}),
2240-
...(providerOptions?.binaryPath
2241-
? { pathToClaudeCodeExecutable: providerOptions.binaryPath }
2242-
: {}),
2240+
pathToClaudeCodeExecutable: providerOptions?.binaryPath ?? "claude",
22432241
...(effectiveEffort ? { effort: effectiveEffort } : {}),
22442242
...(permissionMode ? { permissionMode } : {}),
22452243
...(permissionMode === "bypassPermissions"

0 commit comments

Comments
 (0)