[Bug] Terminal mouse/focus escape sequences leak into input on WSL2 resize
Bug Description
Terminal mouse/focus escape sequences dump into input buffer on window resize (WSL2)
Environment: WSL2 (Linux 6.18 / Windows Terminal)
During a session, resizing the terminal window (also seen on subprocess exit / suspend-resume) causes mouse-tracking and focus-reporting escape sequences (e.g. [<35;88;12M, [I, [O) to be printed literally into the prompt input. The input becomes unusable — every mouse movement/scroll injects more garbage. The TUI is not disabling/re-syncing mouse and focus tracking modes (?1000/?1003/?1006, ?1004) on terminal state changes. Does not reproduce on native Linux/macOS terminals — appears WSL2-specific.
Workaround: Blind-typing reset or printf '\e[?1000l\e[?1002l\e[?1003l\e[?1006l\e[?1004l' restores input, confirming it's a tracking-mode cleanup issue.
Expected: Terminal tracking modes should be re-asserted/cleaned correctly across resize, subprocess transitions, and suspend/resume. Related open issues: #67300, #10375, #50032.
Environment Info
- Platform: linux
- Terminal: windows-terminal
- Version: 2.1.195
- Feedback ID: 3774594a-0970-4618-84d0-8ec8214c2e60
Errors
[]