Pressing Ctrl+C in input field outputs ANSI escape sequences/garbled text #4289

Closed
opened 2026-02-16 17:43:18 -05:00 by yindo · 2 comments
Owner

Originally created by @nibaijing on GitHub (Jan 6, 2026).

Originally assigned to: @kommander on GitHub.

Description

Environment:

Application: opencode (Sisyphus)

Shell: Windows PowerShell

OS: Windows 11

Model: gemini-1.5-flash-8b

Description: When attempting to use the Ctrl+C keyboard shortcut within the opencode input field (specifically while using the Sisyphus interface), the terminal outputs a long string of garbled ANSI escape codes (e.g., [555;20;24M...) instead of copying text or sending an interrupt signal.

Steps to Reproduce:

Open opencode in a Windows PowerShell terminal.

Navigate to the input/chat box.

Press Ctrl+C.

Observe the garbled text outputting at the command prompt.

Expected Behavior: The shortcut should either copy the selected text or clear the current input line without printing raw terminal escape sequences.

Actual Behavior: A long string of numeric ANSI codes is printed to the terminal, making the interface difficult to use and cluttering the command line.

Image

Plugins

oh-my-opencode

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @nibaijing on GitHub (Jan 6, 2026). Originally assigned to: @kommander on GitHub. ### Description Environment: Application: opencode (Sisyphus) Shell: Windows PowerShell OS: Windows 11 Model: gemini-1.5-flash-8b Description: When attempting to use the Ctrl+C keyboard shortcut within the opencode input field (specifically while using the Sisyphus interface), the terminal outputs a long string of garbled ANSI escape codes (e.g., [555;20;24M...) instead of copying text or sending an interrupt signal. Steps to Reproduce: Open opencode in a Windows PowerShell terminal. Navigate to the input/chat box. Press Ctrl+C. Observe the garbled text outputting at the command prompt. Expected Behavior: The shortcut should either copy the selected text or clear the current input line without printing raw terminal escape sequences. Actual Behavior: A long string of numeric ANSI codes is printed to the terminal, making the interface difficult to use and cluttering the command line. <img width="1164" height="584" alt="Image" src="https://github.com/user-attachments/assets/82865880-e834-4d4d-98e2-31af1fb36e50" /> ### Plugins oh-my-opencode ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the windowsopentuibug labels 2026-02-16 17:43:18 -05:00
yindo closed this issue 2026-02-16 17:43:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 6, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6912: Ctrl+C does not disable mouse tracking, causing raw escape sequences to flood terminal (Windows) - Same symptoms with raw escape sequences appearing on Windows
  • #6189: In the Windows system, pressing Ctrl+C will automatically exit the terminal - Related Windows Ctrl+C behavior issue
  • #5181: Input sometimes starts to only show ASCII escape codes - Similar issue with ASCII/ANSI escape codes appearing in input

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 6, 2026): This issue might be a duplicate of existing issues. Please check: - #6912: Ctrl+C does not disable mouse tracking, causing raw escape sequences to flood terminal (Windows) - Same symptoms with raw escape sequences appearing on Windows - #6189: In the Windows system, pressing Ctrl+C will automatically exit the terminal - Related Windows Ctrl+C behavior issue - #5181: Input sometimes starts to only show ASCII escape codes - Similar issue with ASCII/ANSI escape codes appearing in input Feel free to ignore if none of these address your specific case.
Author
Owner

@Hona commented on GitHub (Feb 12, 2026):

ctrl+c handling is now in as of 1.1.60

@Hona commented on GitHub (Feb 12, 2026): ctrl+c handling is now in as of 1.1.60
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4289