bunx hangs after link-cli commands by implicitly starting a development server
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- build-system, cli
Research direction
Reproduce the issue with bunx @stripe/link-cli auth status --format json, then inspect the bundled entrypoint and its default export shape. Compare the Bun and npx/Node behavior; done means the command exits normally after printing only the expected JSON response under Bun.
Written by the indexing model from the issue text.
Description
summary
running link cli through bunx produces the expected command output, then bun implicitly starts a development server and keeps the process alive indefinitely. this prevents agent tool calls from resolving, leaving conversations stalled until tools timeout.
reproduction
bunx @stripe/link-cli auth status --format json
actual behavior
- link cli prints the valid json response.
- bun prints a
started development servermessage to stdout. - the process remains alive until it is manually killed or an external timeout fires.
this also contaminates structured stdout, so callers expecting only json cannot parse the result reliably.
expected behavior
once the command prints its response, the process should exit normally, matching the behavior under npx/node.
likely cause
link cli's bundled entrypoint appears to have a default export containing a fetch method. when invoked through bunx, bun interprets that export as a server entrypoint and automatically starts its development server, even though the user invoked a normal cli command.
idk why bun does this; it's annoying, but 🤷
environment
@stripe/link-cli:0.16.0- runtime: bun via
bunx - equivalent
npxinvocation exits normally
suggested resolution
could the bundle/export shape be adjusted so bun does not interpret ordinary cli execution as a server entrypoint? alternatively, documenting that bunx is currently unsupported would prevent agents and users from encountering a command that returns valid output but never exits.
- Dominant language
- TypeScript
- Stars
- 789
- Forks
- 119
- Avg merge
- 13h 36m
- Merged PRs (30d)
- 70
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stripe/link-cli
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·