From eb537b5db4e8982274fb1c668360da694b95dba9 Mon Sep 17 00:00:00 2001 From: Teknium Date: Sat, 21 Mar 2026 06:28:47 -0700 Subject: [PATCH] fix(cli): prevent multiple reasoning boxes from rendering Added a check to suppress further reasoning rendering once the response box is open, preventing potential overlap of reasoning boxes during late thinking blocks. This enhances the user experience by maintaining a clean output in the CLI. --- cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli.py b/cli.py index 8f3edd063..2058103d8 100755 --- a/cli.py +++ b/cli.py @@ -1473,9 +1473,15 @@ class HermesCLI: Opens a dim reasoning box on first token, streams line-by-line. The box is closed automatically when content tokens start arriving (via _stream_delta → _emit_stream_text). + + Once the response box is open, suppress any further reasoning + rendering — a late thinking block (e.g. after an interrupt) would + otherwise draw a reasoning box inside the response box. """ if not text: return + if getattr(self, "_stream_box_opened", False): + return # Open reasoning box on first reasoning token if not getattr(self, "_reasoning_box_opened", False):