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
Problem Description
The OpenCode TUI version randomly freezes during normal use. The interface becomes completely unresponsive, but keyboard input is buffered—characters typed during the freeze appear all at once after recovery. Freezes last from seconds to minutes and occur unpredictably.
Key findings:
A friend with identical software configuration (same Node.js version, same API key) does not experience the issue.
OpenCode Web (opencode web) runs smoothly without freezes.
The problem persists even in a fresh Ubuntu 24.04 installation.
Tried Solutions (Ineffective)
1.Reinstalling WSL2 and Ubuntu (fresh 24.04 install)
Changing terminals (Windows Terminal, VS Code terminal, native wsl)
Disabling IPv6
Increasing WSL2 memory limit (.wslconfig with 8GB)
Testing with the same API key on a friend's machine (no issues there)
Final Solution (Effective)
Downgrading to Node.js LTS (v22.22.1) completely resolved the issue:
bash
nvm install 22
nvm alias default 22
npm install -g opencode-ai
After this change, OpenCode runs smoothly without freezes, and no new crash dumps appear in wsl-crashes.
Root Cause Hypothesis
Node.js v25.8's JIT compiler, on certain CPUs (including AMD Ryzen 5 5500), generates illegal instructions (SIGILL).
OpenCode executing these instructions triggers a SIGILL from the Linux kernel.
The WSL2 kernel crashes, and the Windows WSL service automatically restarts the VM.
During the restart, the TUI freezes, but Windows terminal input buffering preserves typed characters.
After recovery, buffered input is "replayed," giving the illusion of input buffering.
The friend's CPU (likely newer or with a different instruction set) does not trigger this JIT bug
Recommendations
1.Document that WSL2 users should prefer Node.js LTS versions (v20/v22).
2.Consider a startup check to warn users if a non-LTS Node.js version is detected.
3.Improve error handling to gracefully recover from illegal instructions instead of crashing.
Plugins
not
OpenCode version
1.2.27
Steps to reproduce
1.Install Node.js v25.8.0 and OpenCode in WSL2.
2.Configure any model (e.g., China Unicom GLM-5).
3.Start a conversation and send several messages.
4.Wait for a random freeze (may occur after 2–3 messages or 10+).
If your issue is distinct (e.g., specifically caused by Node.js v25 JIT/SIGILL rather than other root causes), please clarify how it differs from the above.
Thanks for the references. I’ve looked through them, but my problem is specifically caused by Node.js v25.8’s JIT compiler generating illegal instructions (SIGILL) on my AMD CPU, which leads to WSL2 kernel crashes. This was confirmed by WinDbg analysis of the crash dumps. Switching to Node.js v22 LTS completely resolved the issue. The other linked issues don’t mention this JIT-related root cause.
I submitted this issue to help others who might encounter the same problem, especially those using similar hardware (MAXSUN B450M + Ryzen 5 5500). The other linked issues do not mention this specific JIT-related cause.
Activity
github-actions commentedon Mar 18, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct (e.g., specifically caused by Node.js v25 JIT/SIGILL rather than other root causes), please clarify how it differs from the above.
BHQM-123 commentedon Mar 18, 2026
Thanks for the references. I’ve looked through them, but my problem is specifically caused by Node.js v25.8’s JIT compiler generating illegal instructions (SIGILL) on my AMD CPU, which leads to WSL2 kernel crashes. This was confirmed by WinDbg analysis of the crash dumps. Switching to Node.js v22 LTS completely resolved the issue. The other linked issues don’t mention this JIT-related root cause.
I submitted this issue to help others who might encounter the same problem, especially those using similar hardware (MAXSUN B450M + Ryzen 5 5500). The other linked issues do not mention this specific JIT-related cause.
Hope this helps!╮(╯▽╰)╭
xiangyangy commentedon Apr 15, 2026
环境信息
┌──────────┬──────────────────────────────────────┐
│ 项目 │ 值 │
├──────────┼──────────────────────────────────────┤
│ OS │ Windows 11 + WSL2 (Ubuntu 24.04 LTS) │
├──────────┼──────────────────────────────────────┤
│ 内核 │ 5.15.167.4-microsoft-standard-WSL2 │
├──────────┼──────────────────────────────────────┤
│ 终端 │ Windows Terminal │
├──────────┼──────────────────────────────────────┤
│ opencode │ 1.4.6 (npm, Bun-compiled binary) │
├──────────┼──────────────────────────────────────┤
│ Node.js │ v22.22.1 │
└──────────┴──────────────────────────────────────┘
具体表现
已排查内容
根因判断
opencode 使用 Bun 编译(JSC 引擎),Bun 在 WSL2 下的 TTY 交互存在兼容性问题,与 Node.js 运行时不同。参考
https://github.com/oven-sh/bun/issues/7632。
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.