Skip to content

fix: background workers not spawning in compiled binary#44

Merged
encrypted-soul merged 1 commit intoworkstream-labs:mainfrom
aman7625:fix/binary-issue
Mar 19, 2026
Merged

fix: background workers not spawning in compiled binary#44
encrypted-soul merged 1 commit intoworkstream-labs:mainfrom
aman7625:fix/binary-issue

Conversation

@aman7625
Copy link
Contributor

What

  • When installed via the install script (compiled binary), ws run reports success but agents never start - they remain stuck in queued status forever
  • Added a buildBgArgs() helper that detects compiled vs source mode and spawns [process.execPath, ...] for compiled binaries, ["bun", Bun.main, ...] for source

Why

  • The background workers are spawned using ["bun", Bun.main, "run", ...]. In a compiled binary, Bun.main points to the binary itself, so it tries to run bun /usr/local/bin/ws run ... - which silently fails since you can't pass a compiled Bun binary through bun

Test plan

  • bun test passes
  • Tested manually with ws CLI
  • Tested by building both a broken and fixed binary locally with bun build --compile --target bun-darwin-arm64 and comparing both behaviours.

@encrypted-soul encrypted-soul merged commit 6e88bed into workstream-labs:main Mar 19, 2026
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.

2 participants