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 server message 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
npx invocation 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.
summary
running link cli through
bunxproduces 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
actual behavior
started development servermessage to stdout.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
fetchmethod. when invoked throughbunx, 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.0bunxnpxinvocation exits normallysuggested resolution
could the bundle/export shape be adjusted so bun does not interpret ordinary cli execution as a server entrypoint? alternatively, documenting that
bunxis currently unsupported would prevent agents and users from encountering a command that returns valid output but never exits.