-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Open
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows
Description
Description
OpenCodeCLI Bug Report
🐛 Bug Description
When using the Ctrl+C keyboard shortcut in the terminal, neither the copy operation works nor does the program exit normally. Instead, a large amount of garbled text is output to the terminal. This garbled text continues to increase as the mouse wheel is scrolled, severely affecting the terminal user experience.
🎯 Expected Behavior
When Ctrl+C is pressed, the program should be able to:
- Copy operation: Execute copy when text is selected
- Interrupt operation: Press the shortcut twice to exit CLI state
- Clear output: Maintain clear and readable terminal output
❌ Actual Behavior
Ctrl+Cdoes not trigger the copy function- The program cannot exit normally
- Large amount of garbled characters appears in the terminal (see screenshot below)
- Garbled text continues to increase with mouse wheel scrolling
🖥️ Environment Information
- Operating System: Windows 11 (version not specified)
- OpenCodeCLI Version: v1.1.48 (latest version)
- Terminal Type: PowerShell
- PowerShell Version: [To be supplemented, can be viewed via
$PSVersionTable.PSVersion]
🔍 Preliminary Analysis
This issue may be related to the following factors:
- Signal Handling Issue: OpenCodeCLI may not properly handle the
SIGINTsignal on Windows - Terminal Control Sequences: The program may be outputting ANSI escape sequences that are not correctly parsed
- Encoding Issue: Mismatch between terminal character encoding and program output encoding
- PowerShell Compatibility: The program may not have been adequately tested in PowerShell environment
📝 Additional Information
Impact Scope:
- This issue still exists in the latest version (1.1.48)
- Affects basic terminal interaction operations (copy, interrupt)
- Reduces tool usability and user experience
Testing Suggestions:
- Suggest testing in other terminal environments (CMD, Windows Terminal, Git Bash) to see if it reproduces
- Suggest testing on different operating systems (macOS, Linux) to determine if it's a Windows-specific issue
🚀 GitHub Issue Submission Suggestion
When submitting to GitHub, suggested title:
[Bug] Ctrl+C triggers garbled text and cannot properly interrupt program on Windows 11 PowerShell
Tag suggestions: bug, windows, terminal, priority: high
Document created: 2026-02-03
OpenCodeCLI Version: 1.1.48
Plugins
oh-my-opencode
OpenCode version
OpenCodeCLI Version: v1.1.48
Steps to reproduce
💡 Steps to Reproduce
- Open PowerShell terminal on Windows 11 system
- Launch OpenCodeCLI (version 1.1.48)
- Press the
Ctrl+Ckeyboard shortcut while the program is running - Observe garbled text output in the terminal
Screenshot and/or share link
📸 Related Screenshot
Operating System
Windows 11
Terminal
PowerShell
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows