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: Ctrl+C interruption in opencode causes terminal corruption with ANSI escape sequences #5990
When using opencode CLI, pressing Ctrl+C (intended as Esc) interrupts the session, leading to terminal corruption. After interruption, cursor/mouse movements display corrupted ANSI escape sequences (e.g., [^[[H for cursor home, [^[[2J for clear screen). The screen remains with opencode content, but keyboard partially loses control.
Upon closing and reopening the terminal, opencode is no longer in PATH (even though set persistently), requiring manual re-addition.
Steps to Reproduce
Start opencode in CMD or PowerShell.
During session, press Ctrl+C to interrupt.
Observe terminal corruption (ANSI escape codes on cursor/mouse input).
Close and reopen terminal.
opencode command not found.
Environment
OS: Windows 11 Home (build 10.0.26220)
Terminal: CMD / PowerShell 7.5.4
opencode version: 1.0.186
PATH includes opencode via setx
Expected Behavior
Ctrl+C should cleanly exit without corrupting terminal or affecting PATH persistence.
Actual Behavior
Terminal corrupted with ANSI escapes, PATH changes not applied after restart.
Additional Notes
Issue may relate to signal handling or terminal integration on Windows. PATH persistence via setx works in normal cases.
Activity
github-actions commentedon Dec 22, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Dec 22, 2025
There is an upstream bug in bun that we hope to get fixed