Bug Description
Resizing the terminal window in --tui mode causes ghost/duplicate copies of UI elements (composer, status bar, etc.) at regular intervals. The old content is not cleared before the new frame is drawn.
This is the same root cause as #5474, which was fixed for the CLI (prompt_toolkit) in PR #16527, but the TUI (Ink) path was not addressed.
Steps to Reproduce
hermes --tui
- Start a conversation
- Drag terminal window to resize
- Scroll up — observe duplicate composer/status bar copies at intervals corresponding to previous terminal heights
Expected Behavior
Terminal should re-render cleanly after resize with no ghost copies.
Actual Behavior
Multiple copies of the composer appear at positions from previous terminal heights. Each resize creates a new ghost. Spacing between ghosts reflects the terminal height at the time of each resize.
Affected Component
TUI (Ink/React terminal UI) — ui-tui/ and ui-tui/packages/hermes-ink/
Operating System
macOS (Terminal.app)
Hermes Version
v0.11.0 (2026.4.23)
Root Cause Analysis
The CLI fix in bb00b78 forces erase_screen + cursor_goto(0,0) + renderer.reset() on every resize via prompt_toolkit's renderer. The Ink TUI has a similar handleResize in ink.tsx that calls resetFramesForAltScreen() and sets needsEraseBeforePaint, but the erase may not be reaching the terminal reliably, or the diff system's renderFrameSlice using LF (\n) for row advancement in alt-screen mode causes terminal scrolling that pushes content off-screen.
Key files:
ui-tui/packages/hermes-ink/src/ink/ink.tsx — handleResize (line ~435)
ui-tui/packages/hermes-ink/src/ink/log-update.ts — renderFrameSlice uses LF which scrolls in alt-screen
Related Issues
Bug Description
Resizing the terminal window in
--tuimode causes ghost/duplicate copies of UI elements (composer, status bar, etc.) at regular intervals. The old content is not cleared before the new frame is drawn.This is the same root cause as #5474, which was fixed for the CLI (prompt_toolkit) in PR #16527, but the TUI (Ink) path was not addressed.
Steps to Reproduce
hermes --tuiExpected Behavior
Terminal should re-render cleanly after resize with no ghost copies.
Actual Behavior
Multiple copies of the composer appear at positions from previous terminal heights. Each resize creates a new ghost. Spacing between ghosts reflects the terminal height at the time of each resize.
Affected Component
TUI (Ink/React terminal UI) —
ui-tui/andui-tui/packages/hermes-ink/Operating System
macOS (Terminal.app)
Hermes Version
v0.11.0 (2026.4.23)
Root Cause Analysis
The CLI fix in bb00b78 forces
erase_screen + cursor_goto(0,0) + renderer.reset()on every resize via prompt_toolkit's renderer. The Ink TUI has a similarhandleResizeinink.tsxthat callsresetFramesForAltScreen()and setsneedsEraseBeforePaint, but the erase may not be reaching the terminal reliably, or the diff system'srenderFrameSliceusing LF (\n) for row advancement in alt-screen mode causes terminal scrolling that pushes content off-screen.Key files:
ui-tui/packages/hermes-ink/src/ink/ink.tsx—handleResize(line ~435)ui-tui/packages/hermes-ink/src/ink/log-update.ts—renderFrameSliceuses LF which scrolls in alt-screenRelated Issues