Skip to content

v0.32.2

Choose a tag to compare

@DavidsonGomes DavidsonGomes released this 24 Apr 23:13
· 12 commits to main since this release

EvoNexus v0.32.2 — Fix Claude binary resolution on glibc Linux VPS

Patch release working around a bug in @anthropic-ai/claude-agent-sdk (v0.2.104+) that broke the in-dashboard chat on production Linux VPS installs with no local repro on macOS. If your EvoNexus chat started returning Error: Claude Code native binary not found at .../claude-agent-sdk-linux-x64-musl/claude out of nowhere after a restart or redeploy, this is for you.

What's New

Root cause

The SDK's auto-discovery function (sdk.mjs) tries the -musl platform package before glibc on every Linux host, regardless of the host's actual libc:

// simplified from sdk.mjs
const candidates = platform === 'linux'
  ? [`claude-agent-sdk-linux-${arch}-musl`, `claude-agent-sdk-linux-${arch}`]
  : [`claude-agent-sdk-${platform}-${arch}`];
for (const pkg of candidates) { try { return require.resolve(...); } catch {} }

On Ubuntu/Debian VPS installs where both sibling packages ended up in node_modules (common with pnpm, happens with npm too depending on lockfile state), the SDK spawned the musl binary. Because the musl dynamic loader (/lib/ld-musl-x86_64.so.1) doesn't exist on glibc, the kernel returned ENOENT — which the SDK reported as "native binary not found" (misleading; the file does exist, just can't be executed).

Upstream tracking: anthropics/claude-agent-sdk-typescript#296.

Fix in chat-bridge.js

Added resolveClaudeExecutable() that:

  1. Honors CLAUDE_CODE_EXECUTABLE env var if set (explicit override for exotic setups)
  2. Probes /lib and /usr/lib for ld-musl-* to detect the host's actual libc
  3. Reorders the candidate platform packages (glibc-first on glibc hosts, musl-first on Alpine)
  4. Passes the resolved absolute path via queryOptions.pathToClaudeCodeExecutable so the SDK skips its own discovery
  5. Falls back to the SDK default if nothing resolves — preserves macOS development flow where node_modules may not have the linux-specific sibling packages

Pin to exact SDK version

dashboard/terminal-server/package.json now pins @anthropic-ai/claude-agent-sdk to exact 0.2.119 (was ^0.2.104). Stops silent minor drift on fresh npm install from picking up a regression before upstream lands a proper libc-aware fix.

Upgrading

cd /path/to/evo-nexus
git pull
cd dashboard/terminal-server && npm install
sudo systemctl restart evo-nexus

Once upstream ships the libc-aware fix (see issue #296), we'll drop the workaround and just bump the SDK.


Full Changelog: v0.32.1...v0.32.2