Original Reddit post

ok- found this by tracing the pty, one person’s testing. When you resize the window, Claude Code emits nothing. No event, no repaint request. The terminal moves the rows, and the app redraws on your next keystroke. It also never uses the alternate screen and never addresses absolute rows mid-turn, so what you see is the terminal’s reflow, not the app’s. Two things follow if you build anything around the terminal. First, do not wait for a resize signal from the app; it is not coming. Watch SIGWINCH yourself. Second, a pty read can split a multi-byte character. The box-drawing U+2500 is three bytes and Claude Code writes it constantly. Treat a partial trailing rune like a partial escape sequence and buffer it, or you get U+FFFD and a shifted row. For contrast: Kimi Code CLI clears the screen AND the scrollback on every resize step. I counted 21 clears in one dragged resize. Same event, opposite philosophy, and your tooling has to survive both. submitted by /u/Green-Winter9648

Originally posted by u/Green-Winter9648 on r/ClaudeCode