Skip to content

fix: use system claude binary instead of SDK-bundled cli.js

87cad84
Select commit
Loading
Failed to load commit list.
Closed

fix: use system claude binary in packaged Electron app #1188

fix: use system claude binary instead of SDK-bundled cli.js
87cad84
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Correctness Check completed Mar 18, 2026 in 6m 52s

3 issues identified (58 code objects reviewed).

• Merge Base: b04132d
• Head: 87cad84

Details

File Path Comments Posted
apps/web/src/index.css
apps/web/src/components/Icons.tsx 0
packages/contracts/src/providerRuntime.ts 0
packages/contracts/src/provider.test.ts 0
packages/shared/src/model.test.ts 0
apps/server/src/provider/Layers/ProviderService.test.ts 0
packages/contracts/src/model.ts 0
apps/web/src/components/chat/ProviderModelPicker.tsx 1
apps/server/src/provider/Layers/ClaudeAdapter.test.ts 0
apps/server/src/provider/Services/ProviderHealth.ts 0
apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts 0
apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts 1
apps/web/src/components/chat/ProviderHealthBanner.tsx 0
apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts 0
packages/shared/src/model.ts 0
apps/server/src/provider/Layers/ProviderService.ts 1
apps/web/src/composerDraftStore.ts 0
apps/web/src/components/chat/CodexTraitsPicker.tsx 0
apps/web/src/components/chat/CompactComposerControlsMenu.tsx 0
apps/server/src/provider/Layers/ClaudeAdapter.ts 0
apps/server/src/orchestration/Layers/ProviderCommandReactor.ts 0
apps/web/src/components/ChatView.tsx 0

Filtered Issues Details

apps/server/src/provider/Layers/ClaudeAdapter.ts
  • line 2205: The change at line 2205 always sets pathToClaudeCodeExecutable to "claude" as a fallback when providerOptions?.binaryPath is undefined. Previously, when binaryPath wasn't provided, the option was omitted entirely, allowing the SDK to use its built-in default (a cli.js relative to the SDK package). Now, setting it to "claude" assumes the binary is available in the system PATH, which will cause ENOENT failures in environments where Claude Code isn't installed globally but the SDK's bundled CLI would have been used. The SDK's fallback logic in query() only triggers when pathToClaudeCodeExecutable is falsy—providing "claude" bypasses this entirely. [ Out of scope (triage) ]
apps/server/src/provider/Layers/ProviderService.ts
  • line 210: In the "adopt-existing" session recovery path (line 210), upsertSessionBinding is called without preserving modelOptions and providerOptions from input.binding.runtimePayload. When an existing active session is adopted, the binding is overwritten without these persisted options, losing them for any future recovery attempts. [ Out of scope ]