opencode 2.0 leaves Windows terminal in raw mode after /exit, killing zellij sessions

kraso · ghdev · 2026-10-13

A detailed issue report: on Windows, opencode's TUI never restores terminal state on /exit, leaving the console in raw mode with mouse reporting enabled. On ConPTY stacks (Alacritty + zellij-windows) this can nondeterministically take down the whole zellij session or leak the alternate screen. Root cause: all teardown paths delegate to @opentui, which restores the terminal during process teardown—a ConPTY race—with no SIGTERM handler or exit-time restore. The V1 report and fix were closed during the 2.0 migration, but the teardown code is structurally identical, so the bug persists.

Original post →

More from coding & agent

coding & agent channel →