You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running convex dev with --start through Bun's script runner, pressing Ctrl+C stops the Convex dev process but does not always stop the command started via --start.
In my case, the package script is:
{
"scripts": {
"dev": "convex dev --start 'next dev --turbopack'"
}
}
Running bun run dev can leave the Next.js dev server running in the background after Ctrl+C, which leaves orphaned processes around and can cause memory leaks or stale dev servers on the same port.
Steps To Reproduce
Add a package script like:
{
"scripts": {
"dev": "convex dev --start 'next dev --turbopack'"
}
}
Run:
bun run dev
Wait for both Convex and Next.js to start.
Press Ctrl+C.
Expected Behavior
Both processes should shut down cleanly:
convex dev should exit
the --start command and its child processes should also exit
Actual Behavior
convex dev exits
next dev --turbopack can continue running in the background
Screen.Recording.2026-04-12.at.18.22.23.mp4
Impact
orphaned dev server processes
memory usage continues growing after Convex exits
port conflicts on the next run
confusing local dev behavior because Convex is stopped but Next is still alive
Environment
OS: macOS
Invocation: bun run dev
Script: convex dev --start 'next dev --turbopack'
Framework: Next.js dev server with Turbopack
Notes
After further testing, I can only reproduce this when Convex is invoked via Bun's script runner.
Running Convex directly, for example:
bunx convex dev --start 'next dev --turbopack'
shuts down correctly on Ctrl+C in my setup.
So this appears to be specifically about the bun run invocation path rather than convex dev --start being broken in all invocation modes.
Summary
When running
convex devwith--startthrough Bun's script runner, pressingCtrl+Cstops the Convex dev process but does not always stop the command started via--start.In my case, the package script is:
{ "scripts": { "dev": "convex dev --start 'next dev --turbopack'" } }Running
bun run devcan leave the Next.js dev server running in the background afterCtrl+C, which leaves orphaned processes around and can cause memory leaks or stale dev servers on the same port.Steps To Reproduce
Add a package script like:
{ "scripts": { "dev": "convex dev --start 'next dev --turbopack'" } }Run:
Wait for both Convex and Next.js to start.
Press
Ctrl+C.Expected Behavior
Both processes should shut down cleanly:
convex devshould exit--startcommand and its child processes should also exitActual Behavior
convex devexitsnext dev --turbopackcan continue running in the backgroundScreen.Recording.2026-04-12.at.18.22.23.mp4
Impact
Environment
bun run devconvex dev --start 'next dev --turbopack'Notes
After further testing, I can only reproduce this when Convex is invoked via Bun's script runner.
Running Convex directly, for example:
bunx convex dev --start 'next dev --turbopack'shuts down correctly on
Ctrl+Cin my setup.So this appears to be specifically about the
bun runinvocation path rather thanconvex dev --startbeing broken in all invocation modes.Here are some verbose logs from the failing
bun runpath: https://gist.github.com/brandon-julio-t/4b276c6bd8e3fb04ce502a51297ab3b5Maybe relevant issues:
npxnpm/cli#8164