Mouse tracking mode not reset after SSH session dies with broken pipe #12359
Issue DescriptionWhen an SSH session terminates abruptly (broken pipe / remote host closes connection), Ghostty leaves mouse tracking mode enabled. Subsequent cursor movement emits raw coordinate escape sequences to the shell instead of being suppressed. Expected BehaviorMouse tracking mode is reset to disabled after the SSH session ends. No escape sequences emitted on cursor move. Actual BehaviorRaw mouse tracking sequences appear in the terminal: These are Reproduction Steps
Ghostty LogsNo response Ghostty VersionOS Version InformationMacOS Version 26.2 (25C56) (Linux only) Display ServerNone (Linux only) Desktop Environment/Window ManagerNo response Minimal Ghostty Configurationtheme = Catppuccin Frappe
font-family = Maple Mono NF
font-size = 14
font-feature = +cv02
command = /bin/zsh --login --interactiveAdditional Relevant ConfigurationNo response I acknowledge that:
|
Replies: 1 comment
|
The program is responsible for turning off mouse tracking mode, Ghostty has no way of knowing when to do it. Since the ssh connection was abruptly dropped, the program never got a chance to turn it off, so it wasn't turned off; the only real solution here would be for ssh to reset a bunch of terminal state on exit1. Run Footnotes |
The program is responsible for turning off mouse tracking mode, Ghostty has no way of knowing when to do it. Since the ssh connection was abruptly dropped, the program never got a chance to turn it off, so it wasn't turned off; the only real solution here would be for ssh to reset a bunch of terminal state on exit1. Run
reset(or press Reset in the context menu).Footnotes
Or your shell, when it reaches a prompt; a few like fish do indeed do this. ↩