Greetings!
TUI AI agents (such as gemini-cli) seem to exercise escape sequences heavily to render their UI's. I tend to use gemini-cli inside tmux inside ChromeOS Terminal. After a few minutes of using the thing, my ChromeOS terminal gets messed up somehow permanently, rendering certain letters wrong, spilling text from one tmux pane to the other, etc.
For example, right now, here's two different ChromeOS terminal views, both connected to the exact same tmux session:
In the first one, I did try to detach from tmux and run `reset` in the bare terminal, and upon reattaching, the problem persists.
I hacked a quick Python program to send random escape codes to stdout and that, too, seems to have a similar effect. Even after typing `reset`, sending a reset sequence, etc.
I'm curious- is there any reliable way to get hterm's state consistent again, short of closing the tab and logging in again. And, is there a way I could be helpful in debugging exactly escape codes these AI TUI's are sending to so reliably mess up hterm; and fixing it?
Thanks!
Ivo