Skip to content

fix(desktop): re-export every claude sdk function in the bundle - #691

Merged
nixuuu merged 1 commit into
devfrom
fix/desktop-sdk-exports
Nov 14, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/desktop-sdk-exports

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026

Copy link
Copy Markdown
Member

Problem

Every scheduled Release since 2026-11-13 23:42 failed in the three desktop packaging jobs:

error: No matching export in "desktop-native:@anthropic-ai/claude-agent-sdk" for import "getSessionInfo"

The desktop sidecar bundle resolves @anthropic-ai/claude-agent-sdk to a shim that loads the packaged module from node_modules at runtime. The shim listed its exports by hand (query, forkSession, getSessionMessages, createSdkMcpServer), and rewind (apps/worker/src/providers/claude/rewind.ts) started importing getSessionInfo. PR CI doesn't package desktop, so the break only surfaced in Release, and nightly stopped publishing.

Fix

The build reads the real module's export names and the shim re-exports all of them, so a newly used SDK function can't break the bundle again.

Verification

I bundled src/sidecars/worker.ts with the shim:

  • the old list fails with the same error as Release;
  • the generated list (37 names) bundles cleanly.

Format, lint and desktop typecheck are clean. The Release run on dev after merge is the end-to-end check.

Fixes: #655

The desktop sidecar bundle replaces the Claude Agent SDK with a shim that
loads the packaged module at runtime, but listed its exports by hand. Rewind
started importing getSessionInfo, so every desktop package failed with
"No matching export" and nightly releases stopped publishing. The shim now
re-exports every name the real module exports.

Fixes: #655
@nixuuu
nixuuu merged commit a773be6 into dev Nov 14, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/desktop-sdk-exports branch November 14, 2026 08:23
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