diff --git a/cli.py b/cli.py index cbb718b18..46167a774 100644 --- a/cli.py +++ b/cli.py @@ -14874,6 +14874,17 @@ class HermesCLI: style=style, full_screen=False, mouse_support=False, + # Erase the live bottom chrome (status bar, input box, separator + # rules) on exit instead of freezing a final copy into scrollback. + # Without this, prompt_toolkit's render_as_done teardown repaints + # the chrome one last time and leaves it stranded above the exit + # summary — so a dead status bar + empty prompt sit between the + # conversation transcript and the "Resume this session" block, and + # stack with the next session's UI on resume (#38252). The actual + # conversation transcript is printed through patch_stdout into + # normal scrollback and is unaffected; only the managed chrome is + # erased. Applies to every exit path (/exit, /quit, EOF, Ctrl+C). + erase_when_done=True, **({'cursor': _STEADY_CURSOR} if _STEADY_CURSOR is not None else {}), ) _disable_prompt_toolkit_cpr_warning(app)