Skip to content

Bug: Ctrl+C causes serialization issues in CLI TUI version #9183

Closed

Description

@wang543851600

Bug Description

When pressing Ctrl+C in the CLI TUI version (not desktop), it causes serialization issues resulting in garbled characters or terminal state corruption.

Version

  • OpenCode CLI: v1.1.25
  • Platform: Windows

Expected Behavior

Ctrl+C should interrupt the current input or copy selected text without corrupting the terminal state.

Actual Behavior

Pressing Ctrl+C produces garbled characters or ECH sequences (\x1b[X) in the terminal, causing display issues.

Steps to Reproduce

  1. Start opencode CLI
  2. Type some text in the input
  3. Press Ctrl+C to cancel
  4. Observe garbled characters or corrupted display

Additional Context

  • This is the CLI/TUI version using @opentui/solid, not the desktop version using ghostty-web
  • A related fix for the desktop version exists in commit 9111005 but it only addresses ghostty-web serialization, not the CLI TUI
  • The CLI TUI uses @opentui/solid for rendering

Suggested Fix

The CLI version likely needs similar serialization fixes in the TUI component to properly handle control characters (like Ctrl+C / 0x03) during terminal state serialization.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 18, 2026
  2. ValadaresX commented on Jan 19, 2026

    @ValadaresX

    +1, I’m seeing the same behavior on Windows with OpenCode CLI v1.1.25 (CLI/TUI using @opentui/solid, not the desktop/ghostty-web).
    Ctrl+C intermittently results in garbled output / escape sequences like \x1b[X and sometimes corrupts the terminal state.
    It doesn’t happen every time, but it reproduces with noticeable frequency during normal usage.

  3. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions