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
{{ message }}
Repository navigation
v0.2.119 picks linux-arm64-musl variant on Debian (glibc) arm64 even when only linux-arm64 is installed #306
On node:22-slim (Debian 12 bookworm, aarch64, GLIBC 2.36), running query() from @anthropic-ai/claude-agent-sdk@0.2.119 fails immediately with:
Error: Container exited with code 1: /app/node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/claude. Please ensure Claude Code is installed via native installer or specify a valid path with...
The musl variant was never installed — npm correctly resolved linux-arm64. The runtime variant-resolution logic in the SDK appears to misdetect libc on Debian arm64 and request the musl binary that isn't on disk. Looks like a regression from the v0.2.113 native-binary refactor.
@anthropic-ai/claude-agent-sdk@0.2.76 (pre-0.2.113 native-binary refactor) runs fine in the identical image.
Reproduction
docker run --rm node:22-slim sh -c ' mkdir /tmp/p && cd /tmp/p && echo "{\"name\":\"p\",\"version\":\"1.0\",\"dependencies\":{\"@anthropic-ai/claude-agent-sdk\":\"^0.2.119\"}}" > package.json && npm install 2>&1 | tail -3 && echo --- && ls -d node_modules/@anthropic-ai/claude-agent-sdk-* && echo --- && uname -m && ldd --version | head -1'
Output:
added N packages, and audited N+1 packages in Ns
---
node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64
---
aarch64
ldd (Debian GLIBC 2.36-9+deb12u13) 2.36
Then call query({ prompt: '...', options: { systemPrompt: { type: 'preset', preset: 'claude_code' } } }) from a script inside the same container — process exits with the error above pointing at the missing musl variant.
Diagnostic — npm install resolves correctly; runtime selector does not
So npm's optionalDependencies platform matching does the right thing. The bug is in the SDK's runtime variant-selector — it chooses linux-arm64-musl despite only linux-arm64 being installed on a glibc system.
Workaround attempt
About to try pathToClaudeCodeExecutable (sdk.d.ts:1438) pointed at the globally-installed @anthropic-ai/claude-code binary in the same image. Will follow up here if/when it bypasses the broken auto-detection.
Environment
SDK: @anthropic-ai/claude-agent-sdk@0.2.119
Base image: node:22-slim (Debian 12 bookworm)
Arch: aarch64 (arm64)
libc: GLIBC 2.36
Node: v22
npm: 10.9.7
Last known good: @anthropic-ai/claude-agent-sdk@0.2.76
Reacted by jessy836, HyeonCheol Yun and Nizar Selander
Activity
Revert SDK 0.2.119 bump - upstream variant-detection bug picks linux-…
docs(devcontainer): add README with musl SDK troubleshooting
qing-ant commentedon May 4, 2026
Duplicate of #296 — same musl/glibc runtime selector bug, different arch (arm64 here, x64 in #296). Draft PR #305 addresses both.
Generated by Claude Code
runner: add deliver_final_turn flag to gate final-turn Telegram deliv…
Re-apply SDK 0.2.119 with libc workaround and excludeDynamicSections