it's frustrating that TIOCWINSZ is an ioctl and not an escape sequence. it makes sense, because the oldest terminals didn't even have a concept of size, but it means that when the system is running under a serial console it has no way to check the window size and needs to be told explicitly, which we don't wish to do because propagating it would be a pain and it's a very narrow use-case