Skip to content

Terminal raw mode not restored after abnormal exit — input broken, Ctrl-like behavior #30920

Closed as not planned

Description

@sunny198305

Description

When opencode gets stuck during the "thinking" phase and I press Esc twice to abort, the program exits abnormally and leaves the terminal in raw mode. After this happens:

  1. Every keypress is interpreted as if Ctrl is held down (e.g., pressing C triggers Ctrl+C)
  2. Chinese characters and most other keys cannot be typed
  3. The issue persists across all applications in the same terminal window
  4. Only restarting PowerShell (or running reset / stty sane) restores normal input

Plugins

No response

OpenCode version

OpenCode 1.15.13

Steps to reproduce

  1. Run opencode
  2. Wait for the model to start "thinking" (or get stuck)
  3. Press Esc twice
  4. Try typing in the terminal — characters are either interpreted as control sequences or cannot be input at all

Screenshot and/or share link

No response

Operating System

No response

Terminal

windows powershell

Activity

  1. github-actions commented on Jun 5, 2026

    @github-actions
    Contributor

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

    If your issue is distinct (e.g. specific to the Esc-twice abort path or the Ctrl-like key behavior), feel free to clarify and a maintainer will follow up.

  2. sunny198305 commented on Jun 5, 2026

    @sunny198305
    Author
  3. github-actions commented on Aug 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions