- Try ioctl on stdin/stdout/stderr, then /dev/tty, then os/shutil - Add SIGWINCH handler to re-render on terminal resize - Clamp scroll position after resize Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>