Terminal state not restored when exiting with ctrl+c on windows (git bash) #7654

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

Originally created by @Yashxp1 on GitHub (Jan 26, 2026).

Originally assigned to: @kommander on GitHub.

Description

https://github.com/user-attachments/assets/1f87e971-62bf-4d1a-ae60-99bff03146a4

Environment

  • OS: Windows 11
  • Shell: Git Bash (bash / MINGW64)

Steps to Reproduce

  1. Run opencode from Git Bash
  2. Enter a query and let it start running
  3. Exit the app using Ctrl + C

Expected Behavior

  • The app exits cleanly
  • The terminal state is restored normally

Actual Behavior

  • After exiting with Ctrl + C, the terminal starts printing weird characters (ANSI escape sequences)
  • The terminal tab begins flickering even after the app has exited
  • The issue persists until the terminal tab is completely closed (or manually reset)

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Git bash

Originally created by @Yashxp1 on GitHub (Jan 26, 2026). Originally assigned to: @kommander on GitHub. ### Description https://github.com/user-attachments/assets/1f87e971-62bf-4d1a-ae60-99bff03146a4 ## Environment - **OS:** Windows 11 - **Shell:** Git Bash (bash / MINGW64) ## Steps to Reproduce 1. Run `opencode` from Git Bash 2. Enter a query and let it start running 3. Exit the app using `Ctrl + C` ## Expected Behavior - The app exits cleanly - The terminal state is restored normally ## Actual Behavior - After exiting with `Ctrl + C`, the terminal starts printing weird characters (ANSI escape sequences) - The terminal tab begins flickering even after the app has exited - The issue persists until the terminal tab is completely closed (or manually reset) ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal Git bash
yindo added the windowsopentuibug labels 2026-02-16 18:07:50 -05:00
yindo closed this issue 2026-02-16 18:07:50 -05:00
Author
Owner

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

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

  • #8159: Bug: Ctrl+C causes terminal UI rendering overlap on Windows Terminal (v1.1.16)
  • #6912: Ctrl+C does not disable mouse tracking, causing raw escape sequences to flood terminal (Windows)
  • #10265: Ctrl+C during response causes terminal to print endless garbage and become unresponsive
  • #10538: Ctrl-C doesn't clear the input on Windows, it crashes
  • #6189: In the Windows system, pressing Ctrl+C will automatically exit the terminal

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

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #8159: Bug: Ctrl+C causes terminal UI rendering overlap on Windows Terminal (v1.1.16) - #6912: Ctrl+C does not disable mouse tracking, causing raw escape sequences to flood terminal (Windows) - #10265: Ctrl+C during response causes terminal to print endless garbage and become unresponsive - #10538: Ctrl-C doesn't clear the input on Windows, it crashes - #6189: In the Windows system, pressing Ctrl+C will automatically exit the terminal Feel free to ignore if none of these address your specific case.
Author
Owner

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

this is fixed as of 1.1.60

@Hona commented on GitHub (Feb 12, 2026): this is fixed 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#7654