Skip to content

chore(sidecar): upgrade claude-agent-sdk to 0.2.121 (native binary)#466

Merged
hbanerjee74 merged 3 commits into
mainfrom
chore/upgrade-claude-agent-sdk
Apr 28, 2026
Merged

chore(sidecar): upgrade claude-agent-sdk to 0.2.121 (native binary)#466
hbanerjee74 merged 3 commits into
mainfrom
chore/upgrade-claude-agent-sdk

Conversation

@hbanerjee74

Copy link
Copy Markdown
Contributor

Summary

Upgrades @anthropic-ai/claude-agent-sdk from 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:

  • Before: main package shipped cli.js, vendor/ (ripgrep + audio-capture), *.wasm files, plus @img/sharp-* optional deps.
  • After: main package ships only JS modules (sdk.mjs, bridge.mjs, etc.). The runtime is a native claude binary 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 copied cli.js + vendor/ from the main package into dist/sdk/.

Changes

  • app/sidecar/build.js — locate the host's native binary in the platform-specific optional dep and copy it to dist/sdk/claude (or claude.exe on Windows). Probes both glibc and musl variants on Linux.
  • app/src-tauri/src/agents/sidecar.rsresolve_sdk_cli_path now looks for claude / claude.exe. The path is passed to the SDK via pathToClaudeCodeExecutable (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.tscli.jsclaude in mocked dep-check details.
  • app/sidecar/options.ts — comment updated; executable: process.execPath is still set so the binary's spawned MCP servers use a compatible Node runtime.

Test plan

  • cd app/sidecar && npm run build produces dist/sdk/claude and --version reports 2.1.121
  • cd app/sidecar && npx vitest run — 350 passed
  • cd app && npm run test:agents:structural — 51 passed
  • cd app && npx tsc --noEmit
  • cargo check --manifest-path app/src-tauri/Cargo.toml
  • cargo test --lib agents::sidecar — 47 passed
  • Manual npm run dev smoke test
  • CI passes (Linux + Windows)

Closes #459.

🤖 Generated with Claude Code

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>
hbanerjee74 and others added 2 commits April 28, 2026 20:35
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>
@hbanerjee74 hbanerjee74 merged commit 57e5d56 into main Apr 28, 2026
17 checks passed
@hbanerjee74 hbanerjee74 deleted the chore/upgrade-claude-agent-sdk branch April 28, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant