Skip to content

chore(desktop): remove Claude binary from build pipeline#1487

Merged
Kitenite merged 1 commit into
mainfrom
kitenite/remove-binary-from-build
Feb 14, 2026
Merged

chore(desktop): remove Claude binary from build pipeline#1487
Kitenite merged 1 commit into
mainfrom
kitenite/remove-binary-from-build

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 14, 2026

Summary

  • Stop downloading and bundling the Claude Code binary during build/package steps
  • The SDK resolves the Claude binary at runtime, so bundling is unnecessary
  • Chat is now tolerant to a missing binary — won't crash, just lets the SDK handle resolution

Changes

  • apps/desktop/package.json: Removed download:claude from prebuild and prepackage hooks
  • apps/desktop/electron-builder.ts: Commented out the Claude binary extraResources entry
  • apps/desktop/.../agent-execution.ts: getClaudeBinaryPath() returns null when binary doesn't exist; pathToClaudeCodeExecutable is omitted so the SDK resolves it on its own
  • bun.lock: Version bump reflected

Test Plan

  • bun run typecheck passes in apps/desktop
  • bun run build in apps/desktop succeeds without downloading the Claude binary
  • AI chat works when Claude Code is installed globally (SDK resolves it)
  • AI chat surfaces a graceful error when Claude Code is not installed at all (no crash)

Summary by CodeRabbit

  • Refactor
    • Updated binary resolution to occur at runtime instead of during the build process, simplifying the build workflow and enabling more flexible deployment scenarios.
    • Removed pre-download steps from build scripts for improved build efficiency.
    • Enhanced error handling for cases where the binary may not be available at runtime.

The Claude Code binary is no longer bundled into the app. The SDK
resolves the binary at runtime instead. The chat gracefully handles
a missing binary by omitting pathToClaudeCodeExecutable and letting
the SDK find it on its own.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

These changes shift Claude binary handling from build-time bundling to runtime resolution. The electron-builder configuration no longer bundles the platform-specific binary, the build scripts no longer download it, and runtime code now validates binary existence before use.

Changes

Cohort / File(s) Summary
Build Configuration
apps/desktop/electron-builder.ts, apps/desktop/package.json
Removed build-time binary bundling: commented out extraResources entry that packaged Claude Code binary, and removed download:claude step from prebuild and prepackage scripts.
Runtime Resolution
apps/desktop/src/lib/trpc/routers/ai-chat/utils/session-manager/agent-execution.ts
Added nullable getClaudeBinaryPath() function that validates binary existence at runtime with existsSync, returning null if missing; conditional spread ensures pathToClaudeCodeExecutable is only passed when binary is available.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 No more binaries packed in the build so tight,
Runtime shall find them—or gracefully yield null's light!
From bundle to fetch, we hop with delight,
Existence checked thrice, keeping all systems right! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: removing the Claude binary from the build pipeline, which is the primary objective of this pull request.
Description check ✅ Passed The PR description covers the key sections from the template including Summary, Changes, and Test Plan, providing clear context about what was changed and why.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/remove-binary-from-build

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
apps/desktop/electron-builder.ts (1)

59-65: Remove the commented-out block instead of leaving dead config.

Commented-out code adds noise. If this needs to be restored, it's recoverable from git history. Consider removing it entirely or replacing with just the comment on line 59.

♻️ Suggested diff
-		// Claude Code binary - no longer bundled; the SDK resolves it at runtime
-		// {
-		// 	// biome-ignore lint/suspicious/noTemplateCurlyInString: electron-builder variable interpolation
-		// 	from: "resources/bin/${platform}-${arch}",
-		// 	to: "bin",
-		// 	filter: ["**/*"],
-		// },

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 14, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app
  • ✅ Streams Fly.io app

Thank you for your contribution! 🎉

@Kitenite Kitenite merged commit 944712d into main Feb 14, 2026
15 checks passed
@Kitenite Kitenite deleted the kitenite/remove-binary-from-build branch February 14, 2026 06:50
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