[Windows] CTRL_C_EVENT not handled by bun (umbrella issue) #7074
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows
Description
This is to collect issues that are reporting ANSI escape sequences after CTRL+C in some windows terminals and shell, where it sends a CTRL_C_EVENT which is not handled by bun.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows
Activity
github-actions commentedon Jan 6, 2026
This umbrella issue appropriately collects ANSI escape sequence issues related to CTRL_C handling. Additional related issues found:
All of these appear to stem from improper CTRL_C_EVENT and signal handling on Windows. The umbrella issue structure is good for tracking the root cause.
Hona commentedon Jan 6, 2026
on windows bun, the ctrl+c sigint gets sent to all process+childprocess, so the bun run wrapper instantly kills its child.
i need to check what happens with the published app too...
i have a bun wip branch that is a poc fixing this, but it janky.
not sure its something opentui/opencode can handle as a workaround if its parent process is killing it
val-2 commentedon Jan 8, 2026
Is this issue for collecting reports until the Bun team fixes it or are temporary workarounds in OpenCode also accepted?
Hona commentedon Jan 8, 2026
I have submitted a PR to the Bun team resolving this for us
Hona commentedon Jan 8, 2026
oven-sh/bun#25876
I am seeing about adding tests.
Also need to investigate the wider impact of this change.
So there's more for me to do on this PR.
Hoping for guidance from the Bun team tho.
carljuneau commentedon Jan 15, 2026
Thanks for doing this! I press Ctrl+C out of habit and get kicked out 4-5x a day. Ugh.
tnglemongrass commentedon Feb 5, 2026
Any progress on this?
I noticed that it only appears after update check, and that
autoupdate: falsedoesn't properly skip it currently.With that PR +
autoupdate: falseCtrl+C just works as expected.I'd be happy if someone could look into it.
Hona commentedon Feb 6, 2026
Yes, early next week a beta build will be running a bun fork which fixes the root cause :)
xiongxingplus commentedon Feb 6, 2026
Come on, boss!
Hona commentedon Feb 12, 2026
ctrl+c handling is now in as of 1.1.60
carljuneau commentedon Feb 13, 2026
Works for me now. Thanks!
alMubarmij commentedon Mar 6, 2026