Skip to content

Terminal left in raw mode on exit (Alacritty, Ubuntu 24.04, zsh, v1.17.9) #34397

Closed as not planned

Description

@Dreeoo

Summary
On exit (both Ctrl+C and Ctrl+D), opencode returns to the shell but the TTY stays in raw mode — no echo, can't type. A second Ctrl+C resets the line discipline and restores input. stty sane also fixes it.

Environment

  • opencode 1.17.9
  • Ubuntu 24.04.4 LTS (kernel 6.17.0-1025-oem, x86_64)
  • Alacritty (Wayland session)
  • zsh
  • TERM=xterm-256color, COLORTERM=truecolor
  • No tmux, no SSH

Repro

  1. Launch opencode
  2. Exit via Ctrl+C or Ctrl+D
  3. Shell is unresponsive (no echo) until a 2nd Ctrl+C or stty sane

Expected
termios restored, cursor shown, alt-screen exited on quit.

Activity

  1. github-actions commented on Jun 29, 2026

    @github-actions
    Contributor

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

  2. Dreeoo commented on Jun 29, 2026

    @Dreeoo
    Author

    Duplicate of #17081 (POSIX raw mode not restored on exit). Consolidating there.

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