Skip to content

WSL2 Ubuntu-26.04 terminal crashes after /exit #30133

Closed as not planned
Closed as not planned

Description

@Handsome1337

Description

When I exit opencode in TUI (ctrl + c or /exit - doesn't matter), terminal crashes and starts some sort of mouse tracking. And it doesn't listen for keyboard events properly so when I type it sends me same things.

Plugins

No response

OpenCode version

1.15.13

Steps to reproduce

No response

Screenshot and/or share link

Desktop.2026.05.31.-.21.18.05.02.mp4

Operating System

Ubuntu-26.04 from WSL2 on WIndows 11

Terminal

xterm-256color

Activity

  1. github-actions commented on May 31, 2026

    @github-actions
    Contributor

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

  2. krflorian commented on Jul 20, 2026

    @krflorian

    the same is happening for me:

    Environment:

    • OpenCode version: v3.12.3
    • OS: Windows with WSL (Ubuntu)
    • Terminal: Windows Terminal
    • Shell: WSL bash/zsh

    Description:
    After closing OpenCode, the terminal continuously outputs escape sequences like:
    35;112;43M35;111;42M35;110;41M...
    This does not stop even with Ctrl+C. Running reset fixes it.

    Root cause (suspected):
    OpenCode enables mouse tracking (SGR mouse reporting) for its UI. When the
    process exits via window close or abnormal termination, the disable sequence
    (\x1b[?1000l) is not sent to the terminal. With Windows Terminal + WSL, the
    raw mouse sequences are then fed into WSL's stdin as keyboard input.

    Steps to reproduce:

    1. Open Windows Terminal with a WSL pane
    2. Launch OpenCode from Windows (not from within WSL)
    3. Close OpenCode abruptly (Ctrl+C or close window)
    4. Observe terminal flooding with M35;... sequences

    Expected: Terminal state is reset on exit
    Workaround: Run reset in the affected terminal pane

  3. github-actions commented on Sep 19, 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