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
{{ message }}
Repository navigation
tui: Linux x64 segfault in bundled Bun 1.4.2 (FFI stack), OpenCode 2.0.22 #53214
OpenCode's TUI crashed during an active session on 2026-10-04 with Segmentation fault at address 0x0 in the bundled Bun runtime. The shell reported segmentation fault (core dumped) opencode.
The last visible assistant message said it would check whether the World Bank API was reachable. The actual request/tool invocation is not visible, so this is context, not a confirmed trigger.
After the crash, sequences such as 35;1;38M35;6;39M... appeared at the shell prompt, consistent with terminal mouse reporting remaining enabled. Expected behavior: the session continues without a native crash and terminal input is restored on exit.
OpenCode version
2.0.22, inferred from the crash arguments: --user-agent=opencode/latest/2.0.22/cli.
Operating System
Linux x64; crash header reports kernel 7.0.0 and glibc 2.43. CPU flags: sse42 popcnt avx avx2 avx512. Distribution and terminal emulator have not been confirmed.
Steps to reproduce
No minimal reproducer or repeatability established. This report is based on one captured crash during an interactive session, approximately 159 seconds after process start. Plugins and installation method are unknown.
The partial FFI stack does not establish whether the fault is in Bun or a native dependency. Related Linux service-crash report: #50246; no matching stack/root cause has been established.
Thanks for the detailed crash report and the decoded stack.
The last frames are in Bun's FFI call path (ffiCall / operationFFICallSlowPath). In the TUI, that usually means a call into the native terminal renderer (OpenTUI). We can't tell what triggered it from a single crash, so a few more details would help:
Does it still happen on the latest release? Since 2.0.22, the bundled OpenTUI has been upgraded a few times and newer builds use a newer Bun. Please update and run opencode --version.
Has it happened again? If it has, please share the new bun.report link and anything that seems to correlate with it.
What were you doing at that moment? For example resizing the terminal or window, scrolling or clicking with the mouse, switching tabs or panes, or just waiting while a tool ran.
Environment: your distro, your terminal emulator (plus tmux/zellij if you use one), how you installed OpenCode, and any plugins or MCP servers you have enabled.
A core dump backtrace (coredumpctl info / coredumpctl gdb), if one was captured.
The mouse-reporting sequences at the prompt come from the process being killed by the segfault: it never got the chance to restore the terminal. Running reset fixes the terminal afterwards.
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
Related reports, ordered by likelihood (none is clearly the same crash):
I'm closing this for now as not planned because we haven't heard back. The crash happened once on 2.0.22 with no reproducer. The trace stops in Bun's FFI call path, but it doesn't show what triggered the crash, and without that we can't reproduce it or tell whether it's still there in current builds. Since 2.0.22, the bundled OpenTUI and Bun have both been updated.
If it happens again, please reopen this issue or comment here with:
the output of opencode --version
the new bun.report link
what you were doing at the time (for example resizing the window, using the mouse, or waiting while a tool ran)
your distro, terminal emulator and install method, plus any plugins or MCP servers you use
a core dump backtrace, if you have one
In the meantime, you can follow #54228 and #50246, which cover related Bun 1.4.2 segfaults on Linux. Thanks for the detailed report.
Activity
github-actions commentedon Oct 4, 2026
This issue might be a duplicate of existing issues. Please check:
opencodejr commentedon Oct 27, 2026
Thanks for the detailed crash report and the decoded stack.
The last frames are in Bun's FFI call path (
ffiCall/operationFFICallSlowPath). In the TUI, that usually means a call into the native terminal renderer (OpenTUI). We can't tell what triggered it from a single crash, so a few more details would help:opencode --version.coredumpctl info/coredumpctl gdb), if one was captured.The mouse-reporting sequences at the prompt come from the process being killed by the segfault: it never got the chance to restore the terminal. Running
resetfixes the terminal afterwards.You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
Related reports, ordered by likelihood (none is clearly the same crash):
FFICallHost.cpp:101frame. There it was the native renderer crashing during a terminal resize.0x0segfault during long sessions, with a different stack.opencodejr commentedon Oct 30, 2026
I'm closing this for now as not planned because we haven't heard back. The crash happened once on 2.0.22 with no reproducer. The trace stops in Bun's FFI call path, but it doesn't show what triggered the crash, and without that we can't reproduce it or tell whether it's still there in current builds. Since 2.0.22, the bundled OpenTUI and Bun have both been updated.
If it happens again, please reopen this issue or comment here with:
opencode --versionIn the meantime, you can follow #54228 and #50246, which cover related Bun 1.4.2 segfaults on Linux. Thanks for the detailed report.