chore(sidecar): upgrade claude-agent-sdk to 0.2.121 (native binary)#466
Merged
Conversation
The SDK switched its package layout starting in 0.2.116:
the previous JS runtime (cli.js + vendor/ + wasm) was replaced with
a native `claude` binary shipped in a platform-specific optional dep
(@anthropic-ai/claude-agent-sdk-{platform}-{arch}).
Adapt the sidecar build and the Rust resolver:
- app/sidecar/build.js: copy the host's native binary from the matching
optional dep into dist/sdk/claude (or claude.exe on Windows). Probe
glibc and musl variants on Linux.
- app/src-tauri/src/agents/sidecar.rs: resolve_sdk_cli_path now looks
for `claude` / `claude.exe` and is passed through to the SDK as
`pathToClaudeCodeExecutable` (no behaviour change downstream).
- Update the diagnostic detail label and matching e2e/test mocks.
Verified:
- cd app/sidecar && npm run build (produces dist/sdk/claude, runs --version)
- cd app && npx tsc --noEmit
- cd app/sidecar && npx vitest run (350 passed)
- cd app && npm run test:agents:structural (51 passed)
- cargo check --manifest-path app/src-tauri/Cargo.toml
- cargo test --lib agents::sidecar (47 passed)
Supersedes #459.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rust 1.95 clippy added the `unnecessary_sort_by` lint, which fails two pre-existing call sites on `cargo clippy -- -D warnings`. Switch to `sort_by_key(... Reverse(...))` per the lint suggestion. Also bump rustls-webpki 0.103.10 -> 0.103.13 to clear three RUSTSEC 2026 advisories that fail the cargo-audit gate. No API surface change. Verified locally with cargo clippy and cargo check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
@anthropic-ai/claude-agent-sdkfrom 0.2.109 to 0.2.121, supersedes #459.What changed in the SDK
Starting in 0.2.116, the SDK switched its package layout:
cli.js,vendor/(ripgrep + audio-capture),*.wasmfiles, plus@img/sharp-*optional deps.sdk.mjs,bridge.mjs, etc.). The runtime is a nativeclaudebinary in a platform-specific optional dep (@anthropic-ai/claude-agent-sdk-{platform}-{arch}). npm installs only the matching host package.This broke our previous
app/sidecar/build.js, which copiedcli.js+vendor/from the main package intodist/sdk/.Changes
app/sidecar/build.js— locate the host's native binary in the platform-specific optional dep and copy it todist/sdk/claude(orclaude.exeon Windows). Probes both glibc and musl variants on Linux.app/src-tauri/src/agents/sidecar.rs—resolve_sdk_cli_pathnow looks forclaude/claude.exe. The path is passed to the SDK viapathToClaudeCodeExecutable(the existing flow — no other plumbing changes).app/src-tauri/src/commands/node.rs— diagnostic comment updated.app/src/test/mocks/tauri-e2e.ts,app/e2e/integration/workflow-integration.spec.ts—cli.js→claudein mocked dep-check details.app/sidecar/options.ts— comment updated;executable: process.execPathis still set so the binary's spawned MCP servers use a compatible Node runtime.Test plan
cd app/sidecar && npm run buildproducesdist/sdk/claudeand--versionreports2.1.121cd app/sidecar && npx vitest run— 350 passedcd app && npm run test:agents:structural— 51 passedcd app && npx tsc --noEmitcargo check --manifest-path app/src-tauri/Cargo.tomlcargo test --lib agents::sidecar— 47 passednpm run devsmoke testCloses #459.
🤖 Generated with Claude Code