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
bug: mouse garbling after inactivity — missing SIGTSTP handler #20506
When opencode is suspended via external SIGTSTP (e.g., code-server terminal management during inactivity, job control), mouse escape sequences appear as garbled text in the shell. The bottom of the TUI display gets cut off.
This is distinct from #20458 (post-exit garbling) and #3199 (in-session fragmentation).
Root Cause
Neither @opentui/core nor opencode register a SIGTSTP handler. When SIGTSTP arrives from an external source, the process is suspended by the kernel with zero cleanup:
Mouse tracking remains enabled
Raw mode remains on
Shell receives mouse events as garbled escape sequences
The correct cleanup pattern already exists in the manual suspend keybind (app.tsx), which calls renderer.suspend() → disableMouse() → setRawMode(false) before suspending. But this only runs from the TUI command palette — an external SIGTSTP bypasses it.
Activity
fix(tui): handle external SIGTSTP to prevent mouse garbling on suspend
fix(tui): handle external SIGTSTP to prevent mouse garbling on suspend
fix(tui): handle external SIGTSTP to prevent mouse garbling on suspend
github-actions commentedon Jul 4, 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.