Description
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.
Description
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
Environment
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.