You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
daemon: fix spawn ENOTDIR for bundled claude in packaged app
In the packaged .app the SDK resolves its `claude` SEA binary via
createRequire relative to sdk.mjs — which lives INSIDE app.asar. The
resolved path runs THROUGH app.asar (a file), so child_process.spawn
of it throws `spawn ENOTDIR`. electron-builder asarUnpacks the binary
to Resources/app.asar.unpacked/, but the SDK doesn't know to look
there. Surfaced now because this was the first packaged build to
exercise sendPrompt → spawn end-to-end (dev has no asar; node-datachannel
dodges it because .node dlopen goes through Electron's patched fs).
Fix keeps packaging knowledge in the Electron layer where it belongs:
the menubar computes the asar.unpacked binary path (it owns the
asarUnpack glob + knows app.isPackaged) and passes it via
DaemonOptions.claudeExecutablePath → RouterDeps → SessionLoopOptions →
pathToClaudeCodeExecutable. The daemon stays electron-agnostic and just
forwards it; dev/tests pass undefined → the SDK resolves its platform
package itself (no asar, real path).
Needs a menubar .dmg re-release (daemon code, not OTA).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments