Problem
When resizing the terminal window, the classic CLI (non-TUI, Rich + prompt_toolkit based) does not reflow or re-render the conversation history to fit the new dimensions. This causes multiple visible artifacts:
- Ghost/overlapping lines -- previous content remains at the old width
- Broken table borders -- Rich tables are rendered at the stale width
- Accumulated blank separator lines -- after each resize, extra blank lines pile up
- Distorted scrollback -- when scrolling back through conversation history after a resize, formatting is misaligned
- Status bar duplication -- the prompt/status area can appear as duplicate rows
In contrast, competitor tools handle this smoothly:
- Claude Code -- uses full-screen alternate buffer with SIGWINCH-triggered complete re-render
- Opencode -- recalculates layout on resize events, content reflows seamlessly
- Both give an uninterrupted reading experience regardless of window size changes
Expected Behavior
Resizing the terminal should trigger a complete re-render of the entire conversation history and all active display elements (tables, messages, status bar) to fit the new viewport dimensions -- matching the smooth experience of opencode and Claude Code.
Additional Context
This issue is a tracking feature request that addresses the root cause. There are currently 34+ individual bug reports covering specific manifestations of this problem:
A comprehensive reflow solution would resolve all of these individual bugs.
Environment
- macOS 26.4.1
- Terminal: default (also reproduced in various terminal emulators)
- Hermes Agent version: latest (main branch)
Suggested Approach
Investigate implementing a SIGWINCH signal handler that triggers a full re-render of the CLI display buffer, possibly by:
- Capturing the current conversation state
- Clearing the screen
- Re-rendering all content at the new terminal dimensions
- Preserving scrollback position where possible
For the Ink-based TUI mode (--tui), leverage React's re-render cycle with proper viewport dimensions.
Problem
When resizing the terminal window, the classic CLI (non-TUI, Rich + prompt_toolkit based) does not reflow or re-render the conversation history to fit the new dimensions. This causes multiple visible artifacts:
In contrast, competitor tools handle this smoothly:
Expected Behavior
Resizing the terminal should trigger a complete re-render of the entire conversation history and all active display elements (tables, messages, status bar) to fit the new viewport dimensions -- matching the smooth experience of opencode and Claude Code.
Additional Context
This issue is a tracking feature request that addresses the root cause. There are currently 34+ individual bug reports covering specific manifestations of this problem:
A comprehensive reflow solution would resolve all of these individual bugs.
Environment
Suggested Approach
Investigate implementing a SIGWINCH signal handler that triggers a full re-render of the CLI display buffer, possibly by:
For the Ink-based TUI mode (--tui), leverage React's re-render cycle with proper viewport dimensions.