Skip to content

fix(runtime): create node symlink in bundled bun directory (ELECTRON-1EY)#310

Merged
piorpua merged 1 commit into
mainfrom
fix/bundled-node-symlink
May 20, 2026
Merged

fix(runtime): create node symlink in bundled bun directory (ELECTRON-1EY)#310
piorpua merged 1 commit into
mainfrom
fix/bundled-node-symlink

Conversation

@piorpua
Copy link
Copy Markdown
Contributor

@piorpua piorpua commented May 20, 2026

Summary

  • Create a node symlink (Unix) / copy (Windows) pointing to the bundled bun binary during runtime extraction
  • Ensures #!/usr/bin/env node shebangs in npm packages resolve correctly even when no standalone Node.js is installed on the host
  • Fixes ELECTRON-1EY: users upgrading from v1.9.25 to v2.0.5 could not send messages in Claude Code mode ("Failed to send message. Please try again.")

Root Cause

The v2.0.5 architecture migrated agent spawning from the frontend (which used Electron's built-in Node.js) to the backend (aioncore), which uses the bundled bun runtime to execute bun x @agentclientprotocol/claude-agent-acp. That package contains scripts with #!/usr/bin/env node shebangs. On hosts without a system Node.js installation, env cannot find node, the process exits with code 127, and the ACP handshake never completes (502 Bad Gateway).

Since bun is a fully Node-compatible runtime, adding a nodebun symlink in the bundled runtime directory (which is already at the front of PATH) resolves the issue without requiring users to install Node.js.

Test plan

  • extract_happy_path_creates_bun_and_bunx_and_node verifies the symlink is created
  • Full workspace test suite passes (5575 tests)
  • Manual verification on a machine without Node.js installed — confirm Claude Code agent starts successfully

…1EY)

Users without a standalone Node.js installation cannot use Claude Code
agent because `@agentclientprotocol/claude-agent-acp` (or its transitive
deps) contains scripts with `#!/usr/bin/env node` shebangs. When the
bundled bun directory is on PATH but has no `node` entry, `env` fails
with "No such file or directory" and the agent process exits 127 before
the ACP handshake completes.

Create a `node` symlink (Unix) / copy (Windows) pointing to the bundled
`bun` binary during extraction. Since bun is a Node-compatible runtime,
shebang-based invocations resolve correctly without requiring a system
Node installation.
@piorpua piorpua merged commit c0ad26b into main May 20, 2026
5 checks passed
@piorpua piorpua deleted the fix/bundled-node-symlink branch May 20, 2026 06:58
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