From 67fece1176d59481f00308ce801d17a474923006 Mon Sep 17 00:00:00 2001 From: Teknium Date: Mon, 13 Apr 2026 03:39:05 -0700 Subject: [PATCH] feat(cli): show notification when iteration budget is reached Displays a dim warning after the response panel when the agent hit its max iterations, so the user knows the response may be incomplete. --- cli.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cli.py b/cli.py index 5951327d0..04fb3890b 100644 --- a/cli.py +++ b/cli.py @@ -7842,6 +7842,17 @@ class HermesCLI: sys.stdout.write("\a") sys.stdout.flush() + # Notify when iteration budget was hit + if result and not result.get("completed") and not result.get("interrupted"): + _api_calls = result.get("api_calls", 0) + if _api_calls >= getattr(self.agent, "max_iterations", 90): + _max_iter = getattr(self.agent, "max_iterations", 90) + _cprint( + f"\n{_DIM}⚠ Iteration budget reached " + f"({_api_calls}/{_max_iter}) — " + f"response may be incomplete{_RST}" + ) + # Speak response aloud if voice TTS is enabled # Skip batch TTS when streaming TTS already handled it if self._voice_tts and response and not use_streaming_tts: