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
WSL2 Ubuntu-26.04 terminal crashes after /exit #30133
When I exit opencode in TUI (ctrl + c or /exit - doesn't matter), terminal crashes and starts some sort of mouse tracking. And it doesn't listen for keyboard events properly so when I type it sends me same things.
Description:
After closing OpenCode, the terminal continuously outputs escape sequences like:
35;112;43M35;111;42M35;110;41M...
This does not stop even with Ctrl+C. Running reset fixes it.
Root cause (suspected):
OpenCode enables mouse tracking (SGR mouse reporting) for its UI. When the
process exits via window close or abnormal termination, the disable sequence
(\x1b[?1000l) is not sent to the terminal. With Windows Terminal + WSL, the
raw mouse sequences are then fed into WSL's stdin as keyboard input.
Steps to reproduce:
Open Windows Terminal with a WSL pane
Launch OpenCode from Windows (not from within WSL)
Close OpenCode abruptly (Ctrl+C or close window)
Observe terminal flooding with M35;... sequences
Expected: Terminal state is reset on exit Workaround: Run reset in the affected terminal pane
Activity
github-actions commentedon May 31, 2026
This issue might be a duplicate of existing issues. Please check:
fix: TUI leaves terminal in mouse-reporting/raw mode; keystrokes / mo…
krflorian commentedon Jul 20, 2026
the same is happening for me:
Environment:
Description:
After closing OpenCode, the terminal continuously outputs escape sequences like:
35;112;43M35;111;42M35;110;41M...
This does not stop even with Ctrl+C. Running
resetfixes it.Root cause (suspected):
OpenCode enables mouse tracking (SGR mouse reporting) for its UI. When the
process exits via window close or abnormal termination, the disable sequence
(\x1b[?1000l) is not sent to the terminal. With Windows Terminal + WSL, the
raw mouse sequences are then fed into WSL's stdin as keyboard input.
Steps to reproduce:
Expected: Terminal state is reset on exit
Workaround: Run
resetin the affected terminal panegithub-actions commentedon Sep 19, 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.